mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Merge pull request #19737 from calavera/fix_reload_docs
Remove cluster storage advertise from reload.
This commit is contained in:
commit
7992b353c0
3 changed files with 6 additions and 10 deletions
|
@ -1539,13 +1539,12 @@ func (daemon *Daemon) initDiscovery(config *Config) error {
|
||||||
// daemon according to those changes.
|
// daemon according to those changes.
|
||||||
// This are the settings that Reload changes:
|
// This are the settings that Reload changes:
|
||||||
// - Daemon labels.
|
// - Daemon labels.
|
||||||
// - Cluster discovery (reconfigure and restart).
|
|
||||||
func (daemon *Daemon) Reload(config *Config) error {
|
func (daemon *Daemon) Reload(config *Config) error {
|
||||||
daemon.configStore.reloadLock.Lock()
|
daemon.configStore.reloadLock.Lock()
|
||||||
defer daemon.configStore.reloadLock.Unlock()
|
|
||||||
|
|
||||||
daemon.configStore.Labels = config.Labels
|
daemon.configStore.Labels = config.Labels
|
||||||
return daemon.reloadClusterDiscovery(config)
|
daemon.configStore.reloadLock.Unlock()
|
||||||
|
|
||||||
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (daemon *Daemon) reloadClusterDiscovery(config *Config) error {
|
func (daemon *Daemon) reloadClusterDiscovery(config *Config) error {
|
||||||
|
|
|
@ -437,7 +437,7 @@ func TestDaemonDiscoveryReload(t *testing.T) {
|
||||||
&discovery.Entry{Host: "127.0.0.1", Port: "5555"},
|
&discovery.Entry{Host: "127.0.0.1", Port: "5555"},
|
||||||
}
|
}
|
||||||
|
|
||||||
if err := daemon.Reload(newConfig); err != nil {
|
if err := daemon.reloadClusterDiscovery(newConfig); err != nil {
|
||||||
t.Fatal(err)
|
t.Fatal(err)
|
||||||
}
|
}
|
||||||
ch, errCh = daemon.discoveryWatcher.Watch(stopCh)
|
ch, errCh = daemon.discoveryWatcher.Watch(stopCh)
|
||||||
|
@ -469,7 +469,7 @@ func TestDaemonDiscoveryReloadFromEmptyDiscovery(t *testing.T) {
|
||||||
&discovery.Entry{Host: "127.0.0.1", Port: "5555"},
|
&discovery.Entry{Host: "127.0.0.1", Port: "5555"},
|
||||||
}
|
}
|
||||||
|
|
||||||
if err := daemon.Reload(newConfig); err != nil {
|
if err := daemon.reloadClusterDiscovery(newConfig); err != nil {
|
||||||
t.Fatal(err)
|
t.Fatal(err)
|
||||||
}
|
}
|
||||||
stopCh := make(chan struct{})
|
stopCh := make(chan struct{})
|
||||||
|
|
|
@ -888,7 +888,4 @@ if there are conflicts, but it won't stop execution.
|
||||||
The list of currently supported options that can be reconfigured is this:
|
The list of currently supported options that can be reconfigured is this:
|
||||||
|
|
||||||
- `debug`: it changes the daemon to debug mode when set to true.
|
- `debug`: it changes the daemon to debug mode when set to true.
|
||||||
- `label`: it replaces the daemon labels with a new set of labels.
|
- `labels`: it replaces the daemon labels with a new set of labels.
|
||||||
- `cluster-store`: it reloads the discovery store with the new address.
|
|
||||||
- `cluster-store-opts`: it uses the new options to reload the discovery store.
|
|
||||||
- `cluster-advertise`: it modifies the address advertised after reloading.
|
|
||||||
|
|
Loading…
Reference in a new issue