From 1961331149fca3c7132fdf69cb25c48ecb46e316 Mon Sep 17 00:00:00 2001 From: wujixin <599230270@qq.com> Date: Wed, 8 Nov 2023 10:19:26 +0800 Subject: [PATCH] fix: gc delete multus ip cr and lsp setting when enable keep vm ip (#3378) Signed-off-by: wujixin Co-authored-by: wujixin --- pkg/controller/gc.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/controller/gc.go b/pkg/controller/gc.go index fc4d37156d0..8240d95a58a 100644 --- a/pkg/controller/gc.go +++ b/pkg/controller/gc.go @@ -779,7 +779,7 @@ func (c *Controller) getVMLsps() []string { if network.Multus != nil && network.Multus.NetworkName != "" { items := strings.Split(network.Multus.NetworkName, "/") if len(items) != 2 { - continue + items = []string{vm.GetNamespace(), items[0]} } provider := fmt.Sprintf("%s.%s.ovn", items[1], items[0]) vmLsp := ovs.PodNameToPortName(vm.Name, ns.Name, provider)