Fixed the svc id generation scheme while pruning services

This commit is contained in:
Diptanu Choudhury
2016-06-07 08:14:11 -07:00
parent 8c931a12ee
commit 3932eb8c7b

View File

@@ -1303,7 +1303,7 @@ func (c *Client) syncConsul() {
if taskState.State == structs.TaskStateRunning {
if tr, ok := ar.tasks[taskName]; ok {
for _, service := range tr.task.Services {
svcIdentifier := fmt.Sprintf("%s-%s", ar.alloc.ID, tr.task.Name)
svcIdentifier := consul.GenerateServiceIdentifier(ar.alloc.ID, tr.task.Name)
services[service.ID(svcIdentifier)] = struct{}{}
}
}