-
Notifications
You must be signed in to change notification settings - Fork 18.7k
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
Daemon to support network restore and Macvlan driver exits experimental #23524
Conversation
ping @crosbymichael PTAL |
Signed-off-by: Alessandro Boch <[email protected]>
Quick question: is it possible that I run a daemon, initialize a Swarm, change my daemon config to add |
@icecrime Need to think about it. But existing validation logic would have same issue. |
@aboch no. I added a check I think you should do a similar check for |
@icecrime @mavenugo Ah, then the same would work with the new check. I just tested the scenario depicted by @icecrime:
daemon start fails with:
|
@aboch The scenario I was mentioning was about hot-reloading the configuration, not restarting the daemon! |
@icecrime Verified the config reload leads to the same validation:
|
It should be |
LOL, I didn't realize the same error message was being printed in different places... Will take care of it shortly |
@mavenugo @icecrime Thanks, PTAL, the inner compatibility check is now a property of the config and same function is used for validation in the two paths. Follows the daemon logs for two hot reloads after the swarm init: In the first one the json config specifies the live restore. In the second one it specifies the cluster store config:
|
Windows failure is genuine. |
Thanks @mlaventure. Updated. |
Signed-off-by: Lei Jitang <[email protected]>
Signed-off-by: Lei Jitang <[email protected]>
LGTM 👍 |
One failure on janky (related?):
|
@icecrime
Let me look at it closer |
Hopefully it's unrelated. @crosbymichael will be testing the PR tonight. |
LGTM |
Ping test failure in ci, not sure if related. I would prefer |
Weird failure in docker-py:
|
The failure in docker-py is legitimate, but @aboch is aware and will fix in a followup PR. Amazing that docker-py suite caught it :-) |
Yes, it is a genuine failure, good docker-py test. |
👏 |
Thanks guys - really appreciate this. |
@@ -120,3 +121,13 @@ func (config *Config) GetAllRuntimes() map[string]types.Runtime { | |||
config.reloadLock.Unlock() | |||
return rts | |||
} | |||
|
|||
func (config *Config) isSwarmCompatible() error { | |||
if config.IsValueSet("cluster-store") || config.IsValueSet("cluster-advertise") { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why did you change this code from config.ClusterStore != ""
to config.IsValueSet("cluster-store")
?
As I know, config.IsValueSet()
checks only configs which were set in the configuration file.
So this code always returns false
even if using --cluster-store
option.
@ncoolz Thank you for spotting this. In my initial diff I was looking for the config parameter value and tested with that, later I moved to the IsValueSet(), that is a mistake. Please let me know if you can push a patch to fix this, otherwise I will take care of it. Thanks again. |
@aboch I will send a PR immediately. Thank you. |
Thanks @ncoolz! |
|
This PR brings: