Skip to content

Commit

Permalink
fix issue 2916 (#2917)
Browse files Browse the repository at this point in the history
  • Loading branch information
liuzhen21 committed Jun 9, 2023
1 parent 517d379 commit 3a8e13e
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions pkg/controller/gc.go
Expand Up @@ -734,6 +734,19 @@ func (c *Controller) getVmLsps() []string {
vmLsp := ovs.PodNameToPortName(vm.Name, ns.Name, provider)
vmLsps = append(vmLsps, vmLsp)
}

for _, network := range vm.Spec.Template.Spec.Networks {
if network.Multus != nil && network.Multus.NetworkName != "" {
items := strings.Split(network.Multus.NetworkName, "/")
if len(items) != 2 {
continue
}
provider := fmt.Sprintf("%s.%s.ovn", items[1], items[0])
vmLsp := ovs.PodNameToPortName(vm.Name, ns.Name, provider)
vmLsps = append(vmLsps, vmLsp)
}
}

}
}
}
Expand Down

0 comments on commit 3a8e13e

Please sign in to comment.