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

Only set ipv4/ipv6 routes when there is corresponding CIDR. #82800

Merged
merged 1 commit into from Sep 19, 2019

Conversation

Random-Liu
Copy link
Member

@Random-Liu Random-Liu commented Sep 17, 2019

We should only set ipv6 and ipv4 routes when there are corresponding CIDRs.

On system which doesn't enable IPv6 at boot time, Kubernetes 1.16 with kubenet will not be able to run even if users don't actually use IPv6. (See kubernetes-sigs/kind#626)

/cc @kubernetes/sig-network-bugs @khenidak @aojea

Signed-off-by: Lantao Liu lantaol@google.com

none

Signed-off-by: Lantao Liu <lantaol@google.com>
@Random-Liu Random-Liu added kind/bug Categorizes issue or PR as related to a bug. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. area/ipv6 labels Sep 17, 2019
@Random-Liu Random-Liu added this to the v1.16 milestone Sep 17, 2019
@k8s-ci-robot k8s-ci-robot added 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. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Sep 17, 2019
@Random-Liu
Copy link
Member Author

I'm not sure whether we need this in 1.16.0, but we should at least cherry-pick this into patch releases.

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Random-Liu

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 approved Indicates a PR has been approved by an approver from all required OWNERS files. area/kubelet sig/node Categorizes an issue or PR as relevant to SIG Node. labels Sep 17, 2019
routes []string
hasV4, hasV6 bool
)
for _, thisCIDR := range plugin.podCIDRs {
Copy link
Member

@aojea aojea Sep 18, 2019

Choose a reason for hiding this comment

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

is plugin.podCIDRs available if dual-stack is disabled? should we check if it exists and fall back to podCIDR if it doesn't ?

Copy link
Contributor

Choose a reason for hiding this comment

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

it is available either ways..

@khenidak
Copy link
Contributor

/lgtm

kubenet will run fine even if ipv6 is not enabled on old settings, we have green signal across the board for that. However new settings are better.

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Sep 18, 2019
@Random-Liu
Copy link
Member Author

/test pull-kubernetes-e2e-gce-100-performance

@Random-Liu
Copy link
Member Author

Random-Liu commented Sep 18, 2019

kubenet will run fine even if ipv6 is not enabled on old settings, we have green signal across the board for that. However new settings are better.

@khenidak I tried to disable the ipv6 sysctl myself, and the ipv6 route worked after that.

However, based on kubernetes-sigs/kind#626, it seems that it won't work if ipv6 is disabled at boot time.

@k8s-ci-robot k8s-ci-robot merged commit 4097a99 into kubernetes:master Sep 19, 2019
@k8s-ci-robot k8s-ci-robot modified the milestones: v1.16, v1.17 Sep 19, 2019
@Random-Liu Random-Liu deleted the fix-routes branch September 20, 2019 04:42
k8s-ci-robot added a commit that referenced this pull request Sep 20, 2019
…2800-upstream-release-1.16

Automated cherry pick of #82800: Only set ipv4/ipv6 routes when there is corresponding CIDR.
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 area/kubelet 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. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. 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. sig/node Categorizes an issue or PR as relevant to SIG Node. 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.

None yet

4 participants