Skip to content

Commit

Permalink
allocator: Remove deleted networks from the unallocated set
Browse files Browse the repository at this point in the history
This looks like an oversight. Networks may have been kept in this set
forever after deletion.

Signed-off-by: Aaron Lehmann <[email protected]>
  • Loading branch information
aaronlehmann committed Mar 8, 2017
1 parent e4762bc commit 5f52c14
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions manager/allocator/network.go
Original file line number Diff line number Diff line change
Expand Up @@ -351,6 +351,8 @@ func (a *Allocator) doNetworkAlloc(ctx context.Context, ev events.Event) {
if err := nc.nwkAllocator.Deallocate(n); err != nil {
log.G(ctx).WithError(err).Errorf("Failed during network free for network %s", n.ID)
}

delete(nc.unallocatedNetworks, n.ID)
case state.EventCreateService:
s := v.Service.Copy()

Expand Down

0 comments on commit 5f52c14

Please sign in to comment.