Skip to content

Commit 4f1bdd7

Browse files
committed
remove lsp when gw nodes change (#5591)
Signed-off-by: Mengxin Liu <[email protected]> (cherry picked from commit 9691549)
1 parent 2aee1e3 commit 4f1bdd7

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

pkg/controller/external_gw.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -127,9 +127,10 @@ func (c *Controller) removeExternalGateway() error {
127127
// provider network, underlay vlan control the external gateway switch
128128
klog.Infof("should keep provider network underlay vlan external gateway switch %s", c.config.ExternalGatewaySwitch)
129129
lrpName := fmt.Sprintf("%s-%s", c.config.ClusterRouter, c.config.ExternalGatewaySwitch)
130-
klog.Infof("delete logical router port %s", lrpName)
131-
if err := c.OVNNbClient.DeleteLogicalRouterPort(lrpName); err != nil {
132-
klog.Errorf("failed to delete lrp %s, %v", lrpName, err)
130+
lspName := fmt.Sprintf("%s-%s", c.config.ExternalGatewaySwitch, c.config.ClusterRouter)
131+
klog.Infof("delete logical patch port lsp %s lrp %s", lspName, lrpName)
132+
if err := c.OVNNbClient.RemoveLogicalPatchPort(lspName, lrpName); err != nil {
133+
klog.Errorf("failed to remove logical patch port %s/%s, %v", lspName, lrpName, err)
133134
return err
134135
}
135136
}

0 commit comments

Comments
 (0)