diff --git a/manager/allocator/network.go b/manager/allocator/network.go index 675f13c79f..05e2d085ff 100644 --- a/manager/allocator/network.go +++ b/manager/allocator/network.go @@ -402,6 +402,9 @@ func (a *Allocator) doNetworkAlloc(ctx context.Context, ev events.Event) { return a.commitAllocatedService(ctx, batch, s) }); err != nil { log.G(ctx).WithError(err).Errorf("Failed to commit allocation during update for service %s", s.ID) + nc.unallocatedServices[s.ID] = s + } else { + delete(nc.unallocatedServices, s.ID) } case state.EventDeleteService: s := v.Service.Copy()