Skip to content

Commit

Permalink
nm not managed only in the change provide nic name case (#2754)
Browse files Browse the repository at this point in the history
  • Loading branch information
bobz965 authored and zhangzujian committed May 5, 2023
1 parent 635c57b commit 5eef52a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
2 changes: 2 additions & 0 deletions pkg/daemon/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ func InitOVSBridges() (map[string]string, error) {
return nil, fmt.Errorf("failed to check vendor of port %s: %v", port, err)
}
if ok {
klog.Infof("config provider nic %s on bridge %s", port, brName)
if _, err = configProviderNic(port, brName); err != nil {
return nil, err
}
Expand Down Expand Up @@ -303,6 +304,7 @@ func ovsInitProviderNetwork(provider, nic string, exchangeLinkName, macLearningF
}

// add host nic to the external bridge
klog.Infof("config provider nic %s on bridge %s", nic, brName)
mtu, err := configProviderNic(nic, brName)
if err != nil {
errMsg := fmt.Errorf("failed to add nic %s to external bridge %s: %v", nic, brName, err)
Expand Down
6 changes: 0 additions & 6 deletions pkg/daemon/ovs.go
Original file line number Diff line number Diff line change
Expand Up @@ -729,12 +729,6 @@ func configProviderNic(nicName, brName string) (int, error) {
return 0, fmt.Errorf("failed to get routes on nic %s: %v", nicName, err)
}

// set link unmanaged by NetworkManager
if err = nmSetManaged(nicName, false); err != nil {
klog.Errorf("failed set device %s unmanaged by NetworkManager: %v", nicName, err)
return 0, err
}

for _, addr := range addrs {
if addr.IP.IsLinkLocalUnicast() {
// skip 169.254.0.0/16 and fe80::/10
Expand Down

0 comments on commit 5eef52a

Please sign in to comment.