Skip to content

[windows] OVS can not detect a disconnected interface #353

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wenyingd opened this issue Jan 13, 2025 · 1 comment
Open

[windows] OVS can not detect a disconnected interface #353

wenyingd opened this issue Jan 13, 2025 · 1 comment

Comments

@wenyingd
Copy link

wenyingd commented Jan 13, 2025

With Linux OVS, if an OVS interface is disconnected, we can check the value in fieldifIndex or ofport to detect it. But it doesn't work on Windows. With local test, we found that Windows OVS doesn't update these fields' values in OVSDB even if an interface is disconnected. This introduces difficulty for the traffic trouble shoot.

Reproduce steps:

  1. Create an OVS bridge b1
  2. Add an internal port p1 on bridge b1
  3. Check the ofport filed value on interface p1. // In this step, we should observe a valid value is assigned to the openflow port of p1, e.g., 5.
  4. Delete the VM Network Adapter "p1", e.g. Remove-VMNetworkAdapter -ManagementOS -SwitchName b1 -VMNetworkAdapterName p1
  5. Check the ofport filed value on interface p1. // In this step, we should observe the value of the old openflow port (5) still exists.
  6. Restart ovs-vswitch process
  7. Check the ofport filed value on interface p1. // In this step, we should observe the value of the old openflow port (5) still exists.

If we perform the same operations with OVS on Linux, we should observe that p1's ofport value becomes "-1" in step 5 and step 7.

Below is a sample of the OVSDB records for a disconnected interface on Windows,

_uuid  : bd51cc7f-fb28-42bd-a213-1b08bd7583b1
admin_state : down
bfd : {}
bfd_status : {}
cfm_fault : []
cfm_fault_status : []
cfm_flap_count : []
cfm_health : []
cfm_mpid : []
cfm_remote_mpids : []
cfm_remote_opstate : []
duplex : []
error : []
external_ids : {}
ifindex : 0
ingress_policing_burst: 0
ingress_policing_kpkts_burst: 0
ingress_policing_kpkts_rate: 0
ingress_policing_rate: 0
lacp_current : []
link_resets : 0
link_speed : []
link_state : down
lldp : {}
mac : []
mac_in_use : "00:00:00:00:00:00"
mtu : []
mtu_request : []
name : p1
ofport : 5
ofport_request : []
options : {}
other_config : {}
statistics : {}
status : {}
type : internal
@wenyingd
Copy link
Author

We also observed that OVS on Windows may update the value of fields admin_state and link_state as "down" if we restart ovs-vswitchd (note, this modification is observed only if we restart ovs-vswitchd, and it is not happening without the restart). But because of issue #351, these two state is also not trusted for now.

ovsrobot pushed a commit to ovsrobot/ovs that referenced this issue Mar 28, 2025
…tworkAdapter.

This fix could solve the issue for not updated ifi_flags and mac
 of internal type port which may could not get the correct ifi_flags and
 mac info when the internal type port is created on Windows platform.

 With the patch, if user is removing some network adapter via CMD below,
 OVS on Windows could also update the value of fields admin_state and
 link_state as "down". Related MAC is also set zero.

 Remove-VMNetworkAdapter -ManagementOS -SwitchName br-int
 -VMNetworkAdapterName xxx

 As in ovs-windows it is not set ifindex on ovs interface, it may need
 another patch to address the not-implemented ifIndex which could be
 got via CMD ovs-vsctl list interface.

 Reported-at:openvswitch/ovs-issues#351
 Reported-at:openvswitch/ovs-issues#353

Signed-off-by: Wilson Peng <[email protected]>
Signed-off-by: 0-day Robot <[email protected]>
ovsrobot pushed a commit to ovsrobot/ovs that referenced this issue Mar 28, 2025
This fix could solve the issue for not updated ifi_flags and mac
 of internal type port which may could not get the correct ifi_flags and
 mac info when the internal type port is created on Windows platform.

 With the patch, if user is removing some network adapter via CMD below,
 OVS on Windows could also update the value of fields admin_state and
 link_state as "down". Related MAC is also set zero.

 Remove-VMNetworkAdapter -ManagementOS -SwitchName br-int
 -VMNetworkAdapterName xxx

 As in ovs-windows it is not set ifindex on ovs interface, it may need
 another patch to address the not-implemented ifIndex which could be
 got via CMD ovs-vsctl list interface.

 Reported-at:openvswitch/ovs-issues#351
 Reported-at:openvswitch/ovs-issues#353

Signed-off-by: Wilson Peng <[email protected]>
Signed-off-by: 0-day Robot <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant