Merge pull request #80942 from gongguan/fix_ipvs_svc_del

fix ipvs_svc deletion
This commit is contained in:
Kubernetes Prow Robot 2019-08-13 02:27:54 -07:00 committed by GitHub
commit 12a085f917
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1771,25 +1771,6 @@ func (proxier *Proxier) cleanLegacyService(activeServices map[string]bool, curre
continue
}
if _, ok := activeServices[cs]; !ok {
rsList, _ := proxier.ipvs.GetRealServers(svc)
// If we still have real servers graceful termination is not done
if len(rsList) > 0 {
continue
}
// Applying graceful termination to all real servers
for _, rs := range rsList {
uniqueRS := GetUniqueRSName(svc, rs)
// If RS is already in the graceful termination list, no need to add it again
if proxier.gracefuldeleteManager.InTerminationList(uniqueRS) {
continue
}
klog.V(5).Infof("Using graceful delete to delete: %v", uniqueRS)
if err := proxier.gracefuldeleteManager.GracefulDeleteRS(svc, rs); err != nil {
klog.Errorf("Failed to delete destination: %v, error: %v", uniqueRS, err)
}
}
klog.V(4).Infof("Delete service %s", svc.String())
if err := proxier.ipvs.DeleteVirtualServer(svc); err != nil {
klog.Errorf("Failed to delete service %s, error: %v", svc.String(), err)