remove weave-local-pods ipset which no longer used by weave-npc
This commit is contained in:
1 parent
d00e7335bb
commit
d351b9f020
1 file changed
+11
@@ -186,6 +186,17 @@ func createBaseRules(ipt *iptables.IPTables, ips ipset.Interface) error {
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// delete `weave-local-pods` ipset which is no longer used by weave-npc
|
||||||
|
weaveLocalPodExist, err := ipsetExist(ips, npc.LocalIpset)
|
||||||
|
if err != nil {
|
||||||
|
common.Log.Errorf("Failed to destroy ipset '%s'", npc.LocalIpset)
|
||||||
|
} else if weaveLocalPodExist {
|
||||||
|
common.Log.Debugf("Destroying ipset '%s'", npc.LocalIpset)
|
||||||
|
if err := ips.Destroy(npc.LocalIpset); err != nil {
|
||||||
|
common.Log.Errorf("Failed to destroy ipset '%s'", npc.LocalIpset)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user