Merge pull request #22299 from thaJeztah/fix-label-reload

fix reloading of daemon labels from config
This commit is contained in:
Tibor Vass 2016-04-25 12:06:57 -04:00
commit bee093802d
2 changed files with 3 additions and 3 deletions

View File

@ -1498,7 +1498,7 @@ func (daemon *Daemon) initDiscovery(config *Config) error {
func (daemon *Daemon) Reload(config *Config) error {
daemon.configStore.reloadLock.Lock()
defer daemon.configStore.reloadLock.Unlock()
if config.IsValueSet("label") {
if config.IsValueSet("labels") {
daemon.configStore.Labels = config.Labels
}
if config.IsValueSet("debug") {

View File

@ -320,7 +320,7 @@ func TestDaemonReloadLabels(t *testing.T) {
}
valuesSets := make(map[string]interface{})
valuesSets["label"] = "foo:baz"
valuesSets["labels"] = "foo:baz"
newConfig := &Config{
CommonConfig: CommonConfig{
Labels: []string{"foo:baz"},
@ -345,7 +345,7 @@ func TestDaemonReloadNotAffectOthers(t *testing.T) {
}
valuesSets := make(map[string]interface{})
valuesSets["label"] = "foo:baz"
valuesSets["labels"] = "foo:baz"
newConfig := &Config{
CommonConfig: CommonConfig{
Labels: []string{"foo:baz"},