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

Automated cherry pick of #118515: kube-proxy avoid race condition using LocalModeNodeCIDR #118517

Conversation

aojea
Copy link
Member

@aojea aojea commented Jun 6, 2023

Cherry pick of #118515 on release-1.25.

#118515: kube-proxy avoid race condition using LocalModeNodeCIDR

For details on the cherry pick process, see the cherry pick requests page.

NONE

@k8s-ci-robot k8s-ci-robot added this to the v1.25 milestone Jun 6, 2023
@k8s-ci-robot k8s-ci-robot added do-not-merge/cherry-pick-not-approved Indicates that a PR is not yet approved to merge into a release branch. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. do-not-merge/needs-kind Indicates a PR lacks a `kind/foo` label and requires one. do-not-merge/needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Jun 6, 2023
@k8s-ci-robot
Copy link
Contributor

This issue is currently awaiting triage.

If a SIG or subproject determines this is a relevant issue, they will accept it by applying the triage/accepted label and provide further guidance.

The triage/accepted label can be added by org members by writing /triage accepted in a comment.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@aojea
Copy link
Member Author

aojea commented Jun 6, 2023

/kind bug
/sig network
/assign @danwinship @thockin

@k8s-ci-robot k8s-ci-robot added the needs-priority Indicates a PR lacks a `priority/foo` label and requires one. label Jun 6, 2023
@k8s-ci-robot k8s-ci-robot added the kind/bug Categorizes issue or PR as related to a bug. label Jun 6, 2023
@k8s-ci-robot k8s-ci-robot added sig/network Categorizes an issue or PR as relevant to SIG Network. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. approved Indicates a PR has been approved by an approver from all required OWNERS files. and removed do-not-merge/needs-kind Indicates a PR lacks a `kind/foo` label and requires one. do-not-merge/needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. labels Jun 6, 2023
@k8s-ci-robot k8s-ci-robot requested review from dcbw and freehan June 6, 2023 20:05
Since kube-proxy in LocalModeNodeCIDR needs to obtain the PodCIDR
assigned to the node it watches for the Node object.

However, kube-proxy startup process requires to have these watches in
different places, that opens the possibility of having a race condition
if the same node is recreated and a different PodCIDR is assigned.

Initializing the second watch with the value obtained in the first one
allows us to detect this situation.

Change-Id: I6adeedb6914ad2afd3e0694dcab619c2a66135f8
Signed-off-by: Antonio Ojea <aojea@google.com>
@aojea aojea force-pushed the automated-cherry-pick-of-#118515-upstream-release-1.25 branch from 184aed4 to fba66cc Compare June 6, 2023 21:20
@k8s-ci-robot k8s-ci-robot added release-note-none Denotes a PR that doesn't merit a release note. and removed do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. labels Jun 6, 2023
@thockin
Copy link
Member

thockin commented Jun 6, 2023

Thanks!

/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jun 6, 2023
@k8s-ci-robot
Copy link
Contributor

LGTM label has been added.

Git tree hash: 6b57d3852ddadf5a293a7d6db5bae24ce7f33e0e

@aojea
Copy link
Member Author

aojea commented Jun 7, 2023

{Failed  === RUN   Test_Run_OneVolumeDetachFailNodeWithReadWriteOnce
W0606 21:41:19.099810   56507 mutation_detector.go:53] Mutation detector is enabled, this will result in memory leakage.
I0606 21:41:19.100362   56507 reconciler.go:346] "attacherDetacher.AttachVolume started" volume={VolumeToAttach:{MultiAttachErrorReported:false VolumeName:fake-plugin/volume-name VolumeSpec:0xc00049e738 NodeName:fail-detach-node ScheduledPods:[&Pod{ObjectMeta:{pod-uid1  pod-uid1  pod-uid1  0 0001-01-01 00:00:00 +0000 UTC <nil> <nil> map[] map[] [] [] []},Spec:PodSpec{Volumes:[]Volume{},Containers:[]Container{},RestartPolicy:,TerminationGracePeriodSeconds:nil,ActiveDeadlineSeconds:nil,DNSPolicy:,NodeSelector:map[string]string{},ServiceAccountName:,DeprecatedServiceAccount:,NodeName:,HostNetwork:false,HostPID:false,HostIPC:false,SecurityContext:nil,ImagePullSecrets:[]LocalObjectReference{},Hostname:,Subdomain:,Affinity:nil,SchedulerName:,InitContainers:[]Container{},AutomountServiceAccountToken:nil,Tolerations:[]Toleration{},HostAliases:[]HostAlias{},PriorityClassName:,Priority:nil,DNSConfig:nil,ShareProcessNamespace:nil,ReadinessGates:[]PodReadinessGate{},RuntimeClassName:nil,EnableServiceLinks:nil,PreemptionPolicy:nil,Overhead:ResourceList{},TopologySpreadConstraints:[]TopologySpreadConstraint{},EphemeralContainers:[]EphemeralContainer{},SetHostnameAsFQDN:nil,OS:nil,HostUsers:nil,},Status:PodStatus{Phase:,Conditions:[]PodCondition{},Message:,Reason:,HostIP:,PodIP:,StartTime:<nil>,ContainerStatuses:[]ContainerStatus{},QOSClass:,InitContainerStatuses:[]ContainerStatus{},NominatedNodeName:,PodIPs:[]PodIP{},EphemeralContainerStatuses:[]ContainerStatus{},},}]}}
I0606 21:41:19.100561   56507 operation_generator.go:398] AttachVolume.Attach succeeded for volume "volume-name" (UniqueName: "fake-plugin/volume-name") from node "fail-detach-node" 
E0606 21:41:20.151790   56507 reconciler.go:219] failed to get health of node fail-detach-node: node "fail-detach-node" not found
E0606 21:41:20.162129   56507 reconciler.go:219] failed to get health of node fail-detach-node: node "fail-detach-node" not found
E0606 21:41:20.172495   56507 reconciler.go:219] failed to get health of node fail-detach-node: node "fail-detach-node" not found
E0606 21:41:20.183985   56507 reconciler.go:219] failed to get health of node fail-detach-node: node "fail-detach-node" not found
E0606 21:41:20.194443   56507 reconciler.go:219] failed to get health of node fail-detach-node: node "fail-detach-node" not found
    reconciler_test.go:1605: Check volume <fake-plugin/volume-name> is reported as attached to node <fail-detach-node>, got false, expected true
--- FAIL: Test_Run_OneVolumeDetachFailNodeWithReadWriteOnce (1.10s)

unrelated

/test pull-kubernetes-unit-go-compatibility

@aojea
Copy link
Member Author

aojea commented Jun 7, 2023

@aojea
Copy link
Member Author

aojea commented Jun 7, 2023

@kubernetes/release-managers

@saschagrunert saschagrunert added cherry-pick-approved Indicates a cherry-pick PR into a release branch has been approved by the release branch manager. and removed do-not-merge/cherry-pick-not-approved Indicates that a PR is not yet approved to merge into a release branch. labels Jun 7, 2023
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: aojea, saschagrunert, thockin

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot merged commit 124dab1 into kubernetes:release-1.25 Jun 7, 2023
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cherry-pick-approved Indicates a cherry-pick PR into a release branch has been approved by the release branch manager. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/bug Categorizes issue or PR as related to a bug. lgtm "Looks good to me", indicates that a PR is ready to be merged. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. release-note-none Denotes a PR that doesn't merit a release note. sig/network Categorizes an issue or PR as relevant to SIG Network. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants