Skip to content
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

Windows Pod fails to configure OpenFlow entries #6888

Closed
wenyingd opened this issue Dec 30, 2024 · 0 comments · Fixed by #6889
Closed

Windows Pod fails to configure OpenFlow entries #6888

wenyingd opened this issue Dec 30, 2024 · 0 comments · Fixed by #6889
Assignees
Labels
kind/bug Categorizes issue or PR as related to a bug.

Comments

@wenyingd
Copy link
Contributor

wenyingd commented Dec 30, 2024

Describe the bug

After running a Pod on Windows Node, the Pod is always in NetworkNotReady state, although OVS has allocated the OpenFlow port.

After checking the antrea-agent logs, we found these logs output,

E1226 20:18:52.087141    2604 pod_configuration.go:611] "Failed install OpenFlow entries for OVS port interface" err="pod's OpenFlow port is not ready yet" name="vsphere--67de56"
I1226 20:18:52.087141    2604 event.go:389] "Event occurred" object="vmware-system-csi/vsphere-csi-node-windows-jqrxt" fieldPath="" kind="Pod" apiVersion="v1" type="Warning" reason="NetworkNotReady" message="Pod network forwarding rules not installed"

Trying to configure antrea-agent with a more detail logs, we could found that, OVS has sent an OpenFlow PortStatus message with an incorrect state OFPUTIL_PS_LINK_DOWN (Desc.State value is 1),

I1227 02:23:23.072626    4144 pod_configuration_windows.go:179] "Received PortStatus message" message={"Version":6,"Type":12,"Length":88,"Xid":0,"Reason":0,"Desc":{"PortNo":5,"Length":72,"Pad":null,"HWAddr":"AAAAAAAA","Name":"dnNwaGVyZS0tZWFiMmUzAA==","Config":1,"State":1,"Properties":[{"Header":{"Type":0,"Length":32},"Pad":null,"Curr":0,"Advertised":0,"Supported":0,"Peer":0,"CurrSpeed":0,"MaxSpeed":0}]}}

While antrea-agent is expecting a live state as the precondition to install OpenFlow entries for a Pod.https://github.com/antrea-io/antrea/blob/main/pkg/agent/cniserver/pod_configuration.go#L681 . Below is a sample of the OpenFlow PortStatus messages that antrea-agent expects to receive if OVS is working as desired.

I1227 02:22:13.023404    4144 pod_configuration_windows.go:179] "Received PortStatus message" message={"Version":6,"Type":12,"Length":88,"Xid":0,"Reason":0,"Desc":{"PortNo":4,"Length":72,"Pad":null,"HWAddr":"ABVdDqG4","Name":"dnNwaGVyZS0tMmM1ZmU1AA==","Config":0,"State":0,"Properties":[{"Header":{"Type":0,"Length":32},"Pad":null,"Curr":0,"Advertised":0,"Supported":0,"Peer":0,"CurrSpeed":0,"MaxSpeed":0}]}}I1227 02:22:13.023404    4144 pod_configuration_windows.go:179] "Received PortStatus message" message={"Version":6,"Type":12,"Length":88,"Xid":0,"Reason":2,"Desc":{"PortNo":4,"Length":72,"Pad":null,"HWAddr":"ABVdDqG4","Name":"dnNwaGVyZS0tMmM1ZmU1AA==","Config":0,"State":4,"Properties":[{"Header":{"Type":0,"Length":32},"Pad":null,"Curr":0,"Advertised":0,"Supported":0,"Peer":0,"CurrSpeed":0,"MaxSpeed":0}]}}

After checking with OVS code, the root cause is supposed to be a Windows OVS issue that ovs doesn't in time update ifp_flags after an OpenFlow port is installed.

To Reproduce

Repeatedly create and delete Pods on a Windows Node. Several times later, the Pod is in NetworkNotReady state.

Expected

The Pod should always finally become NetworkReady state no matter how many times to restart it.

Actual behavior

Several times later, the Pod is observed in NetworkNotReady state.

Versions:

Antrea: 2.2+

Additional context

@wenyingd wenyingd added the kind/bug Categorizes issue or PR as related to a bug. label Dec 30, 2024
@wenyingd wenyingd self-assigned this Dec 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant