diff --git a/libnetwork/bitseq/sequence.go b/libnetwork/bitseq/sequence.go index 0069d495b7..4bd0f3ca5d 100644 --- a/libnetwork/bitseq/sequence.go +++ b/libnetwork/bitseq/sequence.go @@ -326,7 +326,6 @@ func (h *Handle) set(ordinal, start, end uint64, any bool, release bool, serial } h.Lock() // Acquire the lock back } - logrus.Debugf("Received set for ordinal %v, start %v, end %v, any %t, release %t, serial:%v curr:%d \n", ordinal, start, end, any, release, serial, h.curr) if serial { curr = h.curr } @@ -466,8 +465,8 @@ func (h *Handle) Unselected() uint64 { func (h *Handle) String() string { h.Lock() defer h.Unlock() - return fmt.Sprintf("App: %s, ID: %s, DBIndex: 0x%x, bits: %d, unselected: %d, sequence: %s", - h.app, h.id, h.dbIndex, h.bits, h.unselected, h.head.toString()) + return fmt.Sprintf("App: %s, ID: %s, DBIndex: 0x%x, Bits: %d, Unselected: %d, Sequence: %s Curr:%d", + h.app, h.id, h.dbIndex, h.bits, h.unselected, h.head.toString(), h.curr) } // MarshalJSON encodes Handle into json message diff --git a/libnetwork/ipam/allocator.go b/libnetwork/ipam/allocator.go index d1a91c077f..c5e797aae6 100644 --- a/libnetwork/ipam/allocator.go +++ b/libnetwork/ipam/allocator.go @@ -526,6 +526,7 @@ func (a *Allocator) ReleaseAddress(poolID string, address net.IP) error { return types.InternalErrorf("could not find bitmask in datastore for %s on address %v release from pool %s: %v", k.String(), address, poolID, err) } + defer logrus.Debugf("Released address PoolID:%s, Address:%v Sequence:%s", poolID, address, bm.String()) return bm.Unset(ipToUint64(h)) } @@ -537,6 +538,7 @@ func (a *Allocator) getAddress(nw *net.IPNet, bitmask *bitseq.Handle, prefAddres base *net.IPNet ) + logrus.Debugf("Request address PoolID:%v %s Serial:%v PrefAddress:%v ", nw, bitmask.String(), serial, prefAddress) base = types.GetIPNetCopy(nw) if bitmask.Unselected() <= 0 {