ignore no such address error when unbind ip for IPVS service

pull/6/head
m1093782566 2018-01-23 18:44:28 +08:00
parent 5edcb692df
commit a073a058dc
1 changed files with 5 additions and 2 deletions

View File

@ -51,6 +51,8 @@ import (
utilipvs "k8s.io/kubernetes/pkg/util/ipvs"
utilsysctl "k8s.io/kubernetes/pkg/util/sysctl"
utilexec "k8s.io/utils/exec"
"golang.org/x/sys/unix"
)
const (
@ -1702,8 +1704,9 @@ func (proxier *Proxier) cleanLegacyService(atciveServices map[string]bool, curre
for _, addr := range unbindIPAddr.UnsortedList() {
err := proxier.netlinkHandle.UnbindAddress(addr, DefaultDummyDevice)
if err != nil {
glog.Errorf("Failed to unbind service from dummy interface, error: %v", err)
// Ignore no such address error when try to unbind address
if err != nil && err != unix.ENXIO {
glog.Errorf("Failed to unbind service addr %s from dummy interface %s: %v", addr, DefaultDummyDevice, err)
}
}
}