diff --git a/manager/allocator/network.go b/manager/allocator/network.go index 38871fa0e7..0420ec9a82 100644 --- a/manager/allocator/network.go +++ b/manager/allocator/network.go @@ -387,6 +387,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()