You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Special thanks to @tnqn for initial triage on this issue.
In a cluster where Pods are running on multiple Nodes, if a Node is restarted, the Pods on that Node might get new IPs assigned to them. When this happens, NetworkPolicies that refer to these Pods in ingress/egress peers are expected to be correctly enforced. Antrea Controller should compute updated IPs for corresponding addressGroups and sent to Antrea Agents who reconciles internal NPs that refer to these addressGroups. However, these update events are not getting generated, because since #1467 the GroupMember key becomes entity namespaced-name for both appliedToGroup and addressGroup members. Across the update, even though IPs have changed, each GroupMember will still have the same key. Thus addressGroup patches are skipped, and Antrea agents will fail to correctly enforce NetworkPolicies.
To Reproduce
Create a src Namespace
# kubectl get ns test-ns --show-labels=true
NAME STATUS AGE LABELS
test-ns Active 2d23h project=test
Restart the Node where tcp-3-rc-zzbgs (ingress peer) is running on.
Expected
After Node restart, traffic from src Pod to dst Pod should be denied.
Actual behavior
After Node restart, traffic from src Pod to dst Pod is not denied.
AddressGroup info is out of sync in Controller and Agent. The IP of the Pod in one of antrea-agents:
Describe the bug
Special thanks to @tnqn for initial triage on this issue.
In a cluster where Pods are running on multiple Nodes, if a Node is restarted, the Pods on that Node might get new IPs assigned to them. When this happens, NetworkPolicies that refer to these Pods in ingress/egress peers are expected to be correctly enforced. Antrea Controller should compute updated IPs for corresponding addressGroups and sent to Antrea Agents who reconciles internal NPs that refer to these addressGroups. However, these update events are not getting generated, because since #1467 the GroupMember key becomes entity namespaced-name for both appliedToGroup and addressGroup members. Across the update, even though IPs have changed, each GroupMember will still have the same key. Thus addressGroup patches are skipped, and Antrea agents will fail to correctly enforce NetworkPolicies.
To Reproduce
tcp-3-rc-zzbgs
(ingress peer) is running on.Expected
After Node restart, traffic from src Pod to dst Pod should be denied.
Actual behavior
After Node restart, traffic from src Pod to dst Pod is not denied.
AddressGroup info is out of sync in Controller and Agent. The IP of the Pod in one of antrea-agents:
The IP of the same Pod in antrea-controller:
Versions:
Antrea v0.12 release
The text was updated successfully, but these errors were encountered: