-
Notifications
You must be signed in to change notification settings - Fork 5k
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
Sort nodes before creating consul catalog config #478
Sort nodes before creating consul catalog config #478
Conversation
@keis: great 👍 |
e3cf89d
to
8e0f255
Compare
oops 😓 tests should work now I'm still trying figure out why the deep equal check is not working, I tried writing the json blobs to disk and they are the exact same to the checksum. I saw you where changing some other stuff in the area so maybe I'll wait for that and see if that changes anything. |
hum this is weird, it's only failing on docker 1.10 😓 |
The watch of consul can return for various reasons and not of all of them require a reload of the config. The order of nodes provided by consul is not stable so to ensure a identical config is generated for an identical server set the nodes needs to be sorted before creating the config.
8e0f255
to
7030526
Compare
Some random timing issue with the integration tests I think. |
@keis :
I made a fix on that. The deepEquals is made earlier, and the entrypoints from defaultEntryPoints are added to the configuration BEFORE the deepEquals now. You can test the PR using image |
LGTM |
LGTM 🐯 |
Hmm. that did still not fix it :'( but writing even more json to the disk I found that the "old" config also have
|
I noticed traefik was reload constantly from config changes when nothing had actually changed and while I got to the point where the config produced is the same it is still reloading. Any ideas?
The watch of consul can return for various reasons and not of all of
them require a reload of the config. The order of nodes provided by
consul is not stable so to ensure a identical config is generated for an
identical server set the nodes needs to be sorted before creating the
config.