Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lib/config, lib/discover: Support new discovery cluster (ref #4618) #4647

Closed
wants to merge 1 commit into from

Conversation

calmh
Copy link
Member

@calmh calmh commented Jan 5, 2018

Purpose

This adds one new feature, that discovery servers can have ?nolookup to
be used only for announces. The default set of discovery servers is
changed to:

  • discovery.s.n used for lookups. This is dual stack load balanced over
    all discovery servers, and returns both IPv4 and IPV6 results when they
    exist.

  • discovery-v4.s.n used for announces. This has IPv4 addresses only and
    the discovery servers will update the unspecified address with the IPv4
    source address, as usual.

  • discovery-v6.s.n which is exactly the same for IPv6.

Testing

Works for me in manual testing...

[SYNO4] 2018/01/05 14:51:21.131470 main.go:812: INFO: Using discovery server https://discovery-v4.syncthing.net/v2/?nolookup&id=LYXKCHX-VI3NYZR-ALCJBHF-WMZYSPK-QG6QJA3-MPFYMSO-U56GTUK-NA2MIAW
[SYNO4] 2018/01/05 14:51:21.131563 main.go:812: INFO: Using discovery server https://discovery-v6.syncthing.net/v2/?nolookup&id=LYXKCHX-VI3NYZR-ALCJBHF-WMZYSPK-QG6QJA3-MPFYMSO-U56GTUK-NA2MIAW
[SYNO4] 2018/01/05 14:51:21.131647 main.go:812: INFO: Using discovery server https://discovery.syncthing.net/v2/?noannounce&id=LYXKCHX-VI3NYZR-ALCJBHF-WMZYSPK-QG6QJA3-MPFYMSO-U56GTUK-NA2MIAW
...
[SYNO4] 2018/01/05 14:51:22.136859 cache.go:91: DEBUG: negative cache entry for ITZRNXE-YNROGBZ-HXTH5P7-VK5NYE5-QHRQGE2-7JQ6VNJ-KZUEDIU-5PPR5AM at global@https://discovery-v4.syncthing.net/v2/ valid until 2018-01-05 14:52:21.131634 +0100 CET m=+62.325603657 or 2018-01-05 15:51:21.131654 +0100 CET m=+3602.325623251
[SYNO4] 2018/01/05 14:51:22.136885 cache.go:91: DEBUG: negative cache entry for ITZRNXE-YNROGBZ-HXTH5P7-VK5NYE5-QHRQGE2-7JQ6VNJ-KZUEDIU-5PPR5AM at global@https://discovery-v6.syncthing.net/v2/ valid until 2018-01-05 14:52:21.131663 +0100 CET m=+62.325632091 or 2018-01-05 15:51:21.131664 +0100 CET m=+3602.325633396
[SYNO4] 2018/01/05 14:51:22.290133 cache.go:100: DEBUG: lookup for ITZRNXE-YNROGBZ-HXTH5P7-VK5NYE5-QHRQGE2-7JQ6VNJ-KZUEDIU-5PPR5AM at global@https://discovery.syncthing.net/v2/
[SYNO4] 2018/01/05 14:51:22.290154 cache.go:101: DEBUG:   addresses: [kcp://83.233.120.154:22020 kcp://[2001:7a0:8003:32::11]:22020 tcp://83.233.120.154:22000 tcp://[2001:7a0:8003:32::11]:22000]

Compatibility

There is no protocol changes for the new stuff. We will retain the DNS records for discovery-v4-4 and discovery-v6-4 (same certificate as the new cluster) so clients using the old method will still work (forever), just using wastefully twice as many lookups as necessary and getting red flags for discovery-v[46]-[23] once those are removed in the future.

…g#4618)

This adds one new feature, that discovery servers can have ?nolookup to
be used only for announces. The default set of discovery servers is
changed to:

- discovery.s.n used for lookups. This is dual stack load balanced over
  all discovery servers, and returns both IPv4 and IPV6 results when they
  exist.

- discovery-v4.s.n used for announces. This has IPv4 addresses only and
  the discovery servers will update the unspecified address with the IPv4
  source address, as usual.

- discovery-v6.s.n which is exactly the same for IPv6.
@AudriusButkevicius
Copy link
Member

@st-review mergw

@st-review
Copy link

I'm sorry, @AudriusButkevicius. I'm afraid I don't know what you mean. I know how to don't, lgtm, merge, prevent, rebuild, squash, stop.

@AudriusButkevicius
Copy link
Member

@st-review merge

@st-review
Copy link

👌 Merged as 992bb0a. Thanks, @calmh!

@st-review st-review closed this Jan 5, 2018
st-review pushed a commit that referenced this pull request Jan 5, 2018
This adds one new feature, that discovery servers can have ?nolookup to
be used only for announces. The default set of discovery servers is
changed to:

- discovery.s.n used for lookups. This is dual stack load balanced over
  all discovery servers, and returns both IPv4 and IPV6 results when they
  exist.

- discovery-v4.s.n used for announces. This has IPv4 addresses only and
  the discovery servers will update the unspecified address with the IPv4
  source address, as usual.

- discovery-v6.s.n which is exactly the same for IPv6.

GitHub-Pull-Request: #4647
@st-review st-review added the pr-merged Legacy label used in the past for pull requests merged to the main tree label Jan 15, 2018
@calmh calmh deleted the discosrv branch January 15, 2018 13:47
@calmh calmh restored the discosrv branch November 1, 2018 06:06
@st-review st-review added the frozen-due-to-age Issues closed and untouched for a long time, together with being locked for discussion label Apr 30, 2019
@syncthing syncthing locked and limited conversation to collaborators Apr 30, 2019
@calmh calmh deleted the discosrv branch March 23, 2020 07:13
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
frozen-due-to-age Issues closed and untouched for a long time, together with being locked for discussion pr-merged Legacy label used in the past for pull requests merged to the main tree
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants