[kube-proxy/ipvs] Avoid unbinding multiple times for multiport svc

pull/564/head
Laurent Bernaille 2018-12-08 23:47:59 +01:00
parent b2c169d27c
commit 0f9d30dd27
1 changed files with 3 additions and 0 deletions

View File

@ -1651,6 +1651,9 @@ func (proxier *Proxier) cleanLegacyService(activeServices map[string]bool, curre
klog.V(4).Infof("Unbinding address %s", addr)
if err := proxier.netlinkHandle.UnbindAddress(addr, DefaultDummyDevice); err != nil {
klog.Errorf("Failed to unbind service addr %s from dummy interface %s: %v", addr, DefaultDummyDevice, err)
} else {
// In case we delete a multi-port service, avoid trying to unbind multiple times
delete(legacyBindAddrs,addr)
}
}
}