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

Updating NewCIDRSet return a value #45792

Merged
merged 1 commit into from
Nov 9, 2017

Conversation

rpothier
Copy link

@rpothier rpothier commented May 14, 2017

What this PR does / why we need it:
Updating NewCIDRSet return value

For IPv6, NewCIDRSet was updated to return an error if the subnet mask size
is too big. In this case, NewCIDRSet will fail and return an error.

Which issue this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close that issue when PR gets merged): fixes #52348

Special notes for your reviewer:

Release note:

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label May 14, 2017
@k8s-ci-robot
Copy link
Contributor

Hi @rpothier. 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 @k8s-bot 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.

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. I understand the commands that are listed here.

@k8s-ci-robot k8s-ci-robot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label May 14, 2017
@k8s-github-robot k8s-github-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. release-note-label-needed labels May 14, 2017
@resouer
Copy link
Contributor

resouer commented May 14, 2017

@k8s-bot ok to test

@rpothier
Copy link
Author

/release-note-none

@k8s-ci-robot k8s-ci-robot added release-note-none Denotes a PR that doesn't merit a release note. and removed release-note-label-needed labels May 22, 2017
@pmichali
Copy link
Contributor

pmichali commented Jun 9, 2017

A few questions...
It seems like the logic in range_allocator.go is address family agnostic, is that correct? If so, is there much value add, in adding IPv6 test cases?

Would it make sense, however, since the tests are being updated, to improve coverage in that module (it's at 61%)? There are some functions that don't have failure modes tested well, and occupyCIDR is not tested at all.

@rpothier
Copy link
Author

/area ipv6

@rpothier
Copy link
Author

@pmichali I'll look at increasing the coverage. The code is address family agnostic, but there are more changes coming into these files, so it's good to have the UT's in place.

@k8s-github-robot k8s-github-robot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Jun 19, 2017
@k8s-github-robot k8s-github-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Aug 4, 2017
@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Sep 12, 2017
@k8s-github-robot k8s-github-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Sep 12, 2017
@rpothier rpothier changed the title Adding IPv6 unit tests to cidr_allocator_test.go Updating NewCIDRSet return value Sep 12, 2017
@rpothier rpothier changed the title Updating NewCIDRSet return value Updating NewCIDRSet return a value Sep 12, 2017
@rpothier
Copy link
Author

/sig network

@k8s-ci-robot k8s-ci-robot added the sig/network Categorizes an issue or PR as relevant to SIG Network. label Sep 12, 2017
@k8s-github-robot k8s-github-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Oct 11, 2017
@dims
Copy link
Member

dims commented Oct 26, 2017

@leblancd - Does this overlap your ipv6 work?

@rpothier
Copy link
Author

@dims @leblancd This change is added for IPv6, due to the larger CIDRs in IPv6, but does not overlap. It just returns an error as was requested in a previous pull request.

@k8s-github-robot k8s-github-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Oct 27, 2017
@dims
Copy link
Member

dims commented Oct 27, 2017

/ok-to-test

@k8s-ci-robot k8s-ci-robot removed the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Oct 27, 2017
@dims
Copy link
Member

dims commented Oct 27, 2017

/assign

@rpothier rpothier force-pushed the cidr_allocator_ipv6 branch 3 times, most recently from 779ffa6 to 4932bee Compare October 27, 2017 16:51
for IPv6, NewCIDRSet was updated to return an error if the subnet mask size
is too big. In this case, NewCIDRSet will fail and return an error.
@dims
Copy link
Member

dims commented Oct 28, 2017

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Oct 28, 2017
@danehans
Copy link

@aveshagarwal @ingvagabund is there anything needed for a lgtm? This PR is needed to add IPv6 alpha support in 1.9.

@rpothier
Copy link
Author

rpothier commented Nov 6, 2017

/test pull-kubernetes-unit

@danehans
Copy link

danehans commented Nov 8, 2017

@aveshagarwal @ingvagabund all tests are passing now. Can you review when you have a moment?
This PR is needed for IPv6 alpha support in 1.9.

cc: @bowei @luxas

@luxas
Copy link
Member

luxas commented Nov 8, 2017

This needs approval by either @bowei or @dnardo (or a top-level approver like @thockin)
/assign @bowei @dnardo

@@ -292,7 +302,7 @@ func TestCIDRSet_AllocationOccupied(t *testing.T) {
}
}

var err error
//var err error
Copy link
Contributor

Choose a reason for hiding this comment

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

remove?

@dnardo
Copy link
Contributor

dnardo commented Nov 8, 2017

/approve

@k8s-github-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: dims, dnardo, rpothier

Associated issue: 52348

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

Needs approval from an approver in each of these OWNERS Files:

You can indicate your approval by writing /approve in a comment
You can cancel your approval by writing /approve cancel in a comment

@k8s-github-robot k8s-github-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Nov 9, 2017
@danehans
Copy link

danehans commented Nov 9, 2017

/assign @thockin

This PR is needed for IPv6 alpha support in 1.9.

@k8s-github-robot
Copy link

/test all

Tests are more than 96 hours old. Re-running tests.

@k8s-github-robot
Copy link

Automatic merge from submit-queue (batch tested with PRs 46946, 45792). If you want to cherry-pick this change to another branch, please follow the instructions here.

@k8s-github-robot k8s-github-robot merged commit 9ed5d38 into kubernetes:master Nov 9, 2017
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. area/ipv6 cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. 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/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.

NewCIDRSet should return an error when subnet size is too large