Skip to content

Commit

Permalink
fix lost vendor
Browse files Browse the repository at this point in the history
Signed-off-by: bobz965 <zhangbingbing2_yewu@cmss.chinamobile.com>
  • Loading branch information
zbb88888 committed Mar 2, 2024
1 parent eafd1bd commit 72125cb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
3 changes: 2 additions & 1 deletion pkg/controller/pod.go
Original file line number Diff line number Diff line change
Expand Up @@ -1149,8 +1149,9 @@ func (c *Controller) handleDeletePod(key string) error {
return err
}
for _, port := range ports {
klog.Infof("clean migrate options for vm lsp %s", port.Name)
if err := c.OVNNbClient.CleanLogicalSwitchPortMigrateOptions(port.Name); err != nil {
err = fmt.Errorf("failed to clean migrate options for lsp %s, %v", port.Name, err)
err = fmt.Errorf("failed to clean migrate options for vm lsp %s, %v", port.Name, err)
klog.Error(err)
return err
}
Expand Down
5 changes: 2 additions & 3 deletions pkg/ovs/ovn-nb-logical_switch_port.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ func buildLogicalSwitchPort(lspName, ip, mac, podName, namespace string, portSec

// addresses is the first element of addresses
lsp.Addresses = []string{strings.TrimSpace(strings.Join(addresses, " "))}

lsp.ExternalIDs["vendor"] = util.CniTypeName
if portSecurity {
if len(vips) != 0 {
addresses = append(addresses, vipList...)
Expand Down Expand Up @@ -864,7 +864,7 @@ func (c *OVNNbClient) GetLogicalSwitchPortMigrateOptions(lspName string) (*ovnnb
return lsp, splits[0], splits[1], nil
}
}
return nil, "", "", nil
return lsp, "", "", nil
}

func (c *OVNNbClient) ResetLogicalSwitchPortMigrateOptions(lspName, srcNodeName, targetNodeName string, migratedFail bool) error {
Expand All @@ -891,7 +891,6 @@ func (c *OVNNbClient) ResetLogicalSwitchPortMigrateOptions(lspName, srcNodeName,
lsp.Options["requested-chassis"] = targetNodeName
}
delete(lsp.Options, "activation-strategy")
klog.Infof("reset migrator logical switch port %s options: %v", lspName, lsp.Options)
if err := c.UpdateLogicalSwitchPort(lsp, &lsp.Options); err != nil {
err = fmt.Errorf("failed to reset options for migrator logical switch port %s: %v", lspName, err)
klog.Error(err)
Expand Down

0 comments on commit 72125cb

Please sign in to comment.