Add EnableTagDrift logic to command/agent/local.go

This commit is contained in:
Shawn Cook 2015-08-18 14:03:48 -07:00
parent 3a740ac07b
commit 854ff1eb41
1 changed files with 6 additions and 1 deletions

View File

@ -379,7 +379,12 @@ func (l *localState) setSyncState() error {
}
// If our definition is different, we need to update it
l.logger.Printf("[ERR] services: %v", service)
if existing.EnableTagDrift {
l.logger.Printf("[DEBUG] Tag drift enabled.")
existing.Tags = service.Tags
} else {
l.logger.Printf("[DEBUG] Tag drift disabled.")
}
equal := reflect.DeepEqual(existing, service)
l.serviceStatus[id] = syncStatus{inSync: equal}
}