Skip to content

Commit

Permalink
[VM Agent] Bugfix: antrea-agent failed to delete ExternalNode
Browse files Browse the repository at this point in the history
The issue is seen on a RHEL 8.4 VM on azure cloud, which is configured with
dhclient to manage the network interface. The root cause is antrea-agent fails
to recover the IP/Routes from host internal interface to uplink after
ExternalNode is deleted, because the added IP/Routes is deleted or conflicted
with dhclient configuration. Then in the continuous retry with ExternalNode
deletion, antrea-agent is blocking at the precheck on the existentance of host
internal interface always returns true as the uplink's name is already
recovered.

Signed-off-by: wenyingd <[email protected]>
  • Loading branch information
wenyingd committed Jul 3, 2023
1 parent f32f796 commit be722d5
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions pkg/agent/externalnode/external_node_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -588,6 +588,16 @@ func (c *ExternalNodeController) removeOVSPortsAndFlows(interfaceConfig *interfa
}
}()

// This is for issue #5111 (https://github.com/antrea-io/antrea/issues/5111), which may happen if an error occurs
// when moving the configuration back from host internal interface to uplink. This logic is run in the second
// try after the error is returned, at this time the host internal interface is already deleted, and the uplink's
// name is recovered. So the ips and routes in "adapterConfig" are actually read from the uplink and no need to
// move the configurations back. The issue was seen on VM with RHEL 8.4 on azure cloud.
if !hostInterfaceExists(uplinkIfName) {
klog.InfoS("Uplink is not existing on the host, return")
return nil
}

// Wait until the host interface created by OVS is removed.
if err = wait.PollImmediate(50*time.Millisecond, 2*time.Second, func() (bool, error) {
return !hostInterfaceExists(hostIFName), nil
Expand Down

0 comments on commit be722d5

Please sign in to comment.