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

Fix ServiceIPStaticSubrange assigns duplicate IP addresses #109928

Merged
merged 1 commit into from May 10, 2022

Conversation

tksm
Copy link
Contributor

@tksm tksm commented May 10, 2022

What type of PR is this?

/kind bug

What this PR does / why we need it:

Fix ServiceIPStaticSubrange assigns duplicate IP addresses when the dynamic block is exhausted.

Which issue(s) this PR fixes:

Fixes #109927

Special notes for your reviewer:

Does this PR introduce a user-facing change?

Fix the bug that a ServiceIPStaticSubrange enabled cluster assigns duplicate IP addresses when the dynamic block is exhausted.

Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.:


@k8s-ci-robot k8s-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. kind/bug Categorizes issue or PR as related to a bug. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. do-not-merge/needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. labels May 10, 2022
@k8s-ci-robot
Copy link
Contributor

@tksm: 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.

@k8s-ci-robot k8s-ci-robot added needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels May 10, 2022
@k8s-ci-robot
Copy link
Contributor

Hi @tksm. Thanks for your PR.

I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

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.

@k8s-ci-robot k8s-ci-robot added the needs-priority Indicates a PR lacks a `priority/foo` label and requires one. label May 10, 2022
@tksm
Copy link
Contributor Author

tksm commented May 10, 2022

/assign aojea
as the author of KEP-3070

@aojea
Copy link
Member

aojea commented May 10, 2022

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels May 10, 2022
if !ok {
t.Fatalf("unexpected error")
}
uniqueAllocated[alloc] = true
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
uniqueAllocated[alloc] = true
if _, ok := uniqueAllocated[alloc] ; ok {
t.Fatalf("unexpected allocated value %d", alloc)
} else {
uniqueAllocated[alloc] = true
}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thank you. I fixed it.

@aojea
Copy link
Member

aojea commented May 10, 2022

/sig network
just one change on the test and it lgtm
Thank you very much

@k8s-ci-robot k8s-ci-robot added sig/network Categorizes an issue or PR as relevant to SIG Network. and removed do-not-merge/needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. labels May 10, 2022
@tksm tksm force-pushed the fix-reserved-allocator-dup branch from 289f318 to 15fac8a Compare May 10, 2022 09:02
@aojea
Copy link
Member

aojea commented May 10, 2022

/lgtm
/approve

/assign @thockin @wojtek-t

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label May 10, 2022
@wojtek-t
Copy link
Member

Good catch!

/lgtm
/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: aojea, tksm, wojtek-t

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 added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label May 10, 2022
@aojea
Copy link
Member

aojea commented May 10, 2022

/retest

@aojea
Copy link
Member

aojea commented May 10, 2022

the ipv6 job failed with

error:
exit status 1
Output: 
May 10 09:47:58.016: INFO: Unable to reach the following endpoints of service fd00:10:96::273b: map[service-proxy-toggled-4rcz5:{} service-proxy-toggled-xs5dk:{} service-proxy-toggled-zmg9r:{}]
May 10 09:48:03.017: INFO: Executing cmd "for i in $(seq 1 150); do wget -q -O - -T 1 http://[fd00:10:96::273b]:80 2>&1 || true; echo; done" in pod services-7707/verify-service-up-host-exec-pod
May 10 09:48:03.017: INFO: Running '/home/prow/go/src/k8s.io/kubernetes/_output/bin/kubectl --server=https://[::1]:39843 --kubeconfig=/root/.kube/kind-test-config --namespace=services-7707 exec verify-service-up-host-exec-pod -- /bin/sh -x -c for i in $(seq 1 150); do wget -q -O - -T 1 http://[fd00:10:96::273b]:80 2>&1 || true; echo; done'
May 10 09:48:03.113: INFO: rc: 1
May 10 09:48:03.113: INFO: error while kubectl execing "for i in $(seq 1 150); do wget -q -O - -T 1 http://[fd00:10:96::273b]:80 2>&1 || true; echo; done" in pod services-7707/verify-service-up-host-exec-pod: error running /home/prow/go/src/k8s.io/kubernetes/_output/bin/kubectl --server=https://[::1]:39843 --kubeconfig=/root/.kube/kind-test-config --namespace=services-7707 exec verify-service-up-host-exec-pod -- /bin/sh -x -c for i in $(seq 1 150); do wget -q -O - -T 1 http://[fd00:10:96::273b]:80 2>&1 || true; echo; done:
Command stdout:

stderr:
error: Internal error occurred: error executing command in container: failed to exec in container: failed to start exec "3f9abfaad817efeac8344c4deda535f0fece0aa69382a526269bf25703bc8797": OCI runtime exec failed: exec failed: unable to start container process: error adding pid 146532 to cgroups: failed to write 146532: open /sys/fs/cgroup/unified/kubelet/kubepods/besteffort/pod31c6ed8a-40e5-4052-9b26-6456002988ab/b418128f0010af0fe6cb16cd9301ddc94597648d1008099dfbd13e627c906f73/cgroup.procs: no such file or directory: unknown

@k8s-ci-robot k8s-ci-robot merged commit aa4150c into kubernetes:master May 10, 2022
@k8s-ci-robot k8s-ci-robot added this to the v1.25 milestone May 10, 2022
@tksm tksm deleted the fix-reserved-allocator-dup branch May 10, 2022 23:15
k8s-ci-robot added a commit that referenced this pull request May 18, 2022
…8-upstream-release-1.24

Automated cherry pick of #109928: Fix ServiceIPStaticSubrange assigns duplicate IP addresses
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. 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. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. release-note Denotes a PR that will be considered when it comes time to generate release notes. sig/network Categorizes an issue or PR as relevant to SIG Network. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

The ServiceIPStaticSubrange assigns duplicate IP addresses when the dynamic block is exhausted
5 participants