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

Use the first matching address when getting node address #5529

Merged
merged 1 commit into from
Oct 12, 2023

Conversation

xliuxu
Copy link
Contributor

@xliuxu xliuxu commented Sep 26, 2023

Some cloud providers can return multiple addresses of the same type for a Node. We should use the first matching address to find the correct transport interface.

Signed-off-by: Xu Liu [email protected]

@xliuxu xliuxu requested a review from tnqn September 26, 2023 14:06
@xliuxu xliuxu force-pushed the xliu2/fix-get-node-ip-order branch from d98f846 to 5cca691 Compare September 26, 2023 14:07
pkg/util/k8s/node.go Outdated Show resolved Hide resolved
Some cloud providers can return multiple addresses of the
same type for a Node. We should use the first matching address
to find the correct transport interface.

Signed-off-by: Xu Liu <[email protected]>
@xliuxu xliuxu force-pushed the xliu2/fix-get-node-ip-order branch from 5cca691 to f3ab2be Compare September 26, 2023 20:35
@xliuxu
Copy link
Contributor Author

xliuxu commented Sep 27, 2023

/test-all

@xliuxu
Copy link
Contributor Author

xliuxu commented Sep 27, 2023

/test-ipv6-e2e

@xliuxu xliuxu requested a review from tnqn September 27, 2023 13:42
Copy link
Member

@tnqn tnqn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@tnqn tnqn added the action/release-note Indicates a PR that should be included in release notes. label Sep 27, 2023
@tnqn
Copy link
Member

tnqn commented Sep 27, 2023

/test-ipv6-only-e2e

2 similar comments
@xliuxu
Copy link
Contributor Author

xliuxu commented Sep 27, 2023

/test-ipv6-only-e2e

@xliuxu
Copy link
Contributor Author

xliuxu commented Sep 27, 2023

/test-ipv6-only-e2e

@xliuxu
Copy link
Contributor Author

xliuxu commented Sep 28, 2023

The only failing case should not be related to this change:

=== RUN   TestAntreaPolicy/TestGroupNoK8sNP/Case=ACNPICMPSupport
    fixtures.go:495: Deleting Pod 'clientqvv1rjyv'
    networkpolicy_test.go:947: Error when waiting for IP for Pod 'clientqvv1rjyv': timed out waiting for the condition, Pod.Status: &PodStatus{Phase:Pending,Conditions:[]PodCondition{PodCondition{Type:Initialized,Status:True,LastProbeTime:0001-01-01 00:00:00 +0000 UTC,LastTransitionTime:2023-09-28 00:06:06 +0000 UTC,Reason:,Message:,},PodCondition{Type:Ready,Status:False,LastProbeTime:0001-01-01 00:00:00 +0000 UTC,LastTransitionTime:2023-09-28 00:06:06 +0000 UTC,Reason:ContainersNotReady,Message:containers with unready status: [netshoot],},PodCondition{Type:ContainersReady,Status:False,LastProbeTime:0001-01-01 00:00:00 +0000 UTC,LastTransitionTime:2023-09-28 00:06:06 +0000 UTC,Reason:ContainersNotReady,Message:containers with unready status: [netshoot],},PodCondition{Type:PodScheduled,Status:True,LastProbeTime:0001-01-01 00:00:00 +0000 UTC,LastTransitionTime:2023-09-28 00:06:06 +0000 UTC,Reason:,Message:,},},Message:,Reason:,HostIP:fc00:f853:ccd:e793::11,PodIP:,StartTime:2023-09-28 00:06:06 +0000 UTC,ContainerStatuses:[]ContainerStatus{ContainerStatus{Name:netshoot,State:ContainerState{Waiting:&ContainerStateWaiting{Reason:ContainerCreating,Message:,},Running:nil,Terminated:nil,},LastTerminationState:ContainerState{Waiting:nil,Running:nil,Terminated:nil,},Ready:false,RestartCount:0,Image:projects.registry.vmware.com/antrea/netshoot:v0.1,ImageID:,ContainerID:,Started:*false,},},QOSClass:BestEffort,InitContainerStatuses:[]ContainerStatus{},NominatedNodeName:,PodIPs:[]PodIP{},EphemeralContainerStatuses:[]ContainerStatus{},}

@tnqn
Copy link
Member

tnqn commented Sep 28, 2023

The test failed twice, but it was not related to the change but due to slowness of pulling netshoot image.

Sep 28 00:07:48 antrea-ipv6-testbed-2 kubelet[602310]: I0928 00:07:48.072970 602310 pod_startup_latency_tracker.go:102] "Observed pod startup duration" pod="testantreapolicy-dptey6id/clientqvv1rjyv" podStartSLOduration=3.794137827 podCreationTimestamp="2023-09-28 00:06:06 +0000 UTC" firstStartedPulling="2023-09-28 00:06:08.980239379 +0000 UTC m=+7316682.540099112" lastFinishedPulling="2023-09-28 00:07:47.259021759 +0000 UTC m=+7316780.818881572" observedRunningTime="2023-09-28 00:07:48.072764125 +0000 UTC m=+7316781.632623862" watchObservedRunningTime="2023-09-28 00:07:48.072920287 +0000 UTC m=+7316781.632779992"

@tnqn
Copy link
Member

tnqn commented Sep 28, 2023

#5536 should fix the failure.

@tnqn tnqn merged commit 816a896 into antrea-io:main Oct 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
action/release-note Indicates a PR that should be included in release notes.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants