-
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
improve daemon config reload; log active configuration #36019
Conversation
a6993a4
to
2e17680
Compare
daemon/reload.go
Outdated
return err | ||
} | ||
return nil | ||
return daemon.reloadNetworkDiagnosticPort(conf, attributes) |
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.
I would not change this, otherwise if later you'll want to add another call, say daemon.reloadFooBar
, you have to revert this back. Just a nipick of course.
LGTM |
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.
LGTM 🐮
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.
LGTM 👍
2e17680
to
3dbb3e6
Compare
Signed-off-by: Sebastiaan van Stijn <[email protected]>
When succesfully reloading the daemon configuration, print a message in the logs with the active configuration: INFO[2018-01-15T15:36:20.901688317Z] Got signal to reload configuration, reloading from: /etc/docker/daemon.json INFO[2018-01-14T02:23:48.782769942Z] Reloaded configuration: {"mtu":1500,"pidfile":"/var/run/docker.pid","data-root":"/var/lib/docker","exec-root":"/var/run/docker","group":"docker","deprecated-key-path":"/etc/docker/key.json","max-concurrent-downloads":3,"max-concurrent-uploads":5,"shutdown-timeout":15,"debug":true,"hosts":["unix:///var/run/docker.sock"],"log-level":"info","swarm-default-advertise-addr":"","metrics-addr":"","log-driver":"json-file","ip":"0.0.0.0","icc":true,"iptables":true,"ip-forward":true,"ip-masq":true,"userland-proxy":true,"disable-legacy-registry":true,"experimental":false,"network-control-plane-mtu":1500,"runtimes":{"runc":{"path":"docker-runc"}},"default-runtime":"runc","oom-score-adjust":-500,"default-shm-size":67108864,"default-ipc-mode":"shareable"} Signed-off-by: Sebastiaan van Stijn <[email protected]>
3dbb3e6
to
8378dcf
Compare
relates to:
docker info
such as --init #31381 Expose daemon config state through thedocker info
such as --initWhen reloading the daemon configuration file, log the active configuration after successfully reloading. Also do a small refactor, and move reload-related functions to
reload_XX.go
filesNote that configuration reloading is currently not an atomic operation; this is something we need to address: it's currently possible that only "half" of the configuration changes are loaded (which is not desirable).