Browse Source

Log HNS policylist removal failures

Signed-off-by: Trapier Marshall <tmarshall@mirantis.com>
Trapier Marshall 4 years ago
parent
commit
556cb3ae81
1 changed files with 6 additions and 2 deletions
  1. 6 2
      libnetwork/service_windows.go

+ 6 - 2
libnetwork/service_windows.go

@@ -131,12 +131,16 @@ func (n *network) rmLBBackend(ip net.IP, lb *loadBalancer, rmService bool, fullR
 
 		if policyLists, ok := lbPolicylistMap[lb]; ok {
 			if policyLists.ilb != nil {
-				policyLists.ilb.Delete()
+				if _, err := policyLists.ilb.Delete(); err != nil {
+					logrus.Errorf("Failed to remove HNS ILB policylist %s: %s", policyLists.ilb.ID, err)
+				}
 				policyLists.ilb = nil
 			}
 
 			if policyLists.elb != nil {
-				policyLists.elb.Delete()
+				if _, err := policyLists.elb.Delete(); err != nil {
+					logrus.Errorf("Failed to remove HNS ELB policylist %s: %s", policyLists.elb.ID, err)
+				}
 				policyLists.elb = nil
 			}
 			delete(lbPolicylistMap, lb)