Skip to content

Commit

Permalink
fix: lost gc lsp in previous pr (#3493)
Browse files Browse the repository at this point in the history
Signed-off-by: bobz965 <zhangbingbing2_yewu@cmss.chinamobile.com>
  • Loading branch information
bobz965 committed Dec 6, 2023
1 parent 1d89ea2 commit d4addde
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pkg/controller/gc.go
Original file line number Diff line number Diff line change
Expand Up @@ -361,6 +361,11 @@ func (c *Controller) markAndCleanLSP() error {
}

klog.Infof("gc logical switch port %s", lsp.Name)
if err := c.OVNNbClient.DeleteLogicalSwitchPort(lsp.Name); err != nil {
klog.Errorf("failed to delete lsp %s: %v", lsp.Name, err)
return err
}
klog.Infof("gc ip %s", lsp.Name)
ipCr, err := c.config.KubeOvnClient.KubeovnV1().IPs().Get(context.Background(), lsp.Name, metav1.GetOptions{})
if err != nil {
if k8serrors.IsNotFound(err) {
Expand Down

0 comments on commit d4addde

Please sign in to comment.