fix inconsistency in updating hns policy

pull/58/head
delulu 2018-09-07 17:52:34 +08:00
parent c1ad6e961a
commit 524de768bb
1 changed files with 7 additions and 8 deletions

View File

@ -517,7 +517,7 @@ func CleanupLeftovers() (encounteredError bool) {
func (svcInfo *serviceInfo) cleanupAllPolicies(endpoints []*endpointsInfo) {
Log(svcInfo, "Service Cleanup", 3)
if svcInfo.policyApplied {
// Skip the svcInfo.policyApplied check to remove all the policies
svcInfo.deleteAllHnsLoadBalancerPolicy()
// Cleanup Endpoints references
for _, ep := range endpoints {
@ -525,7 +525,6 @@ func (svcInfo *serviceInfo) cleanupAllPolicies(endpoints []*endpointsInfo) {
}
svcInfo.policyApplied = false
}
}
func (svcInfo *serviceInfo) deleteAllHnsLoadBalancerPolicy() {