mirror of
https://github.com/kemko/nomad.git
synced 2026-01-02 08:25:43 +03:00
Fixed the svc id generation scheme while pruning services
This commit is contained in:
@@ -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{}{}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user