Browse Source

Adjust warnings for transient LB endpoint conds

Add debug and error logs to notify when a load balancing sandbox
is not found.  This can occur in normal operation during removal.

Signed-off-by: Chris Telfer <ctelfer@docker.com>
Chris Telfer 7 years ago
parent
commit
ac0aa6485b
1 changed files with 2 additions and 8 deletions
  1. 2 8
      libnetwork/service_linux.go

+ 2 - 8
libnetwork/service_linux.go

@@ -95,15 +95,12 @@ func (n *network) addLBBackend(ip net.IP, lb *loadBalancer) {
 	}
 	ep, sb, err := n.findLBEndpointSandbox()
 	if err != nil {
-		logrus.Errorf("error in addLBBackend for %s/%s for %v", n.ID(), n.Name(), err)
+		logrus.Errorf("addLBBackend %s/%s: %v", n.ID(), n.Name(), err)
 		return
 	}
 	if sb.osSbox == nil {
 		return
 	}
-	if n.ingress && !sb.ingress {
-		return
-	}
 
 	eIP := ep.Iface().Address()
 
@@ -181,15 +178,12 @@ func (n *network) rmLBBackend(ip net.IP, lb *loadBalancer, rmService bool, fullR
 	}
 	ep, sb, err := n.findLBEndpointSandbox()
 	if err != nil {
-		logrus.Errorf("error in rmLBBackend for %s/%s for %v", n.ID(), n.Name(), err)
+		logrus.Debugf("rmLBBackend for %s/%s: %v -- probably transient state", n.ID(), n.Name(), err)
 		return
 	}
 	if sb.osSbox == nil {
 		return
 	}
-	if n.ingress && !sb.ingress {
-		return
-	}
 
 	eIP := ep.Iface().Address()