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

kubeadm: support any Linux kernel version newer than 3.10 #81623

Merged
merged 1 commit into from Aug 22, 2019

Conversation

@neolit123
Copy link
Member

commented Aug 19, 2019

What this PR does / why we need it:

It seems undesirable that Kubernetes as a system should be
blocking a node if it's Linux kernel is way too new.

If such a problem even occurs we should exclude versions from
the list of supported versions instead of blocking users
from trying e.g. the latest 7.0.0-beta kernel because our
validators are not aware of this new version yet.

Which issue(s) this PR fixes:

NONE

Special notes for your reviewer:
NONE

Does this PR introduce a user-facing change?:

kubeadm: support any Linux kernel version newer than 3.10

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


/kind cleanup
/priority important-longterm
/assign @rosti @yastij

@k8s-ci-robot

This comment has been minimized.

Copy link
Contributor

commented Aug 19, 2019

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: neolit123

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

@Klaven
Copy link
Contributor

left a comment

just a quick question

@@ -30,7 +30,7 @@ const dockerEndpoint = "unix:///var/run/docker.sock"
var DefaultSysSpec = SysSpec{
OS: "Linux",
KernelSpec: KernelSpec{
Versions: []string{`3\.[1-9][0-9].*`, `4\..*`, `5\..*`}, // Requires 3.10+, 4+ or 5+
Versions: []string{`3\.[1-9][0-9].*`, `[4-99]\..*`}, // Requires 3.10+, or newer

This comment has been minimized.

Copy link
@Klaven

Klaven Aug 20, 2019

Contributor

should this and the other regex just be defined in one place instead of both meaning we have to copy and paste it wherever we want it? can we make it a package const or something?

This comment has been minimized.

Copy link
@neolit123

neolit123 Aug 20, 2019

Author Member

can be done, but while this regex should hold the actual values, the other one can have any values, as it's just a test.

if we have more votes for this i can update it.

This comment has been minimized.

Copy link
@yastij

yastij Aug 20, 2019

Member

@neolit123 - if we need always to change both at the same, it seems reasonable to have const for this package

This comment has been minimized.

Copy link
@rosti

rosti Aug 20, 2019

Member

If versions between 4.x and 99.x is what you desire, then [4-99]\..* is pretty wrong. This one should do the trick in that case:
[4-9]\..*|[1-9][0-9]\..*

And let's hope we don't get Linux 99.x soon.

P.S. Any version >= 4.x is going to be [4-9]\..*|[1-9][0-9]*\..*, then Linux 999.x would be OK too.

This comment has been minimized.

Copy link
@neolit123

neolit123 Aug 20, 2019

Author Member

Any version >= 4.x is going to be [4-9]..|[1-9][0-9]..*, then Linux 999.x would be OK too.

ok, i will give this a test.

And let's hope we don't get Linux 99.x soon.

i think i calculated roughly 25 more years of Linux kernels with the current cadence until we reach 99.x

This comment has been minimized.

Copy link
@yastij

yastij Aug 20, 2019

Member

+1

[4-99] would match the 4-9 range and 9

This comment has been minimized.

Copy link
@neolit123

neolit123 Aug 20, 2019

Author Member

updated with the correct regexp, also there was a bug in the old regexp for 3* versions :)

i kept the regexp between _unix and the test file duplicated.
the correct thing to do is to introduce separate _windows and _unix unit tests that test the different OS kernel versions, but i don't wish to add this as part of this PR.

This comment has been minimized.

Copy link
@neolit123

@neolit123 neolit123 force-pushed the neolit123:kernel-validator branch from 0aeff32 to 1936cc3 Aug 20, 2019

@yastij
Copy link
Member

left a comment

/lgtm

kubeadm: support any kernel version newer than 3.10
It seems undesirable that Kubernetes as a system should be
blocking a node if it's Linux kernel is way too new.

If such a problem even occurs we should exclude versions from
the list of supported versions instead of blocking users
from trying e.g. the latest 7.0.0-beta kernel because our
validators are not aware of this new version.
@rosti
Copy link
Member

left a comment

What about 10.21.1?
/hold

@rosti

This comment has been minimized.

Copy link
Member

commented Aug 20, 2019

I think, that ^([4-9]|[1-9][0-9]+)\.([0-9]+)\.([0-9]+).*$ would do the job. Modified test case here.

@neolit123

This comment has been minimized.

Copy link
Member Author

commented Aug 20, 2019

I think, that ^([4-9]|[1-9][0-9]+).([0-9]+).([0-9]+).*$ would do the job. Modified test case here.

it works, thanks.
updating.

@neolit123 neolit123 force-pushed the neolit123:kernel-validator branch from 1936cc3 to bec9c36 Aug 20, 2019

@k8s-ci-robot k8s-ci-robot removed the lgtm label Aug 20, 2019

@neolit123

This comment has been minimized.

Copy link
Member Author

commented Aug 20, 2019

@rosti done, updated
/hold cancel

@neolit123

This comment has been minimized.

Copy link
Member Author

commented Aug 20, 2019

never mind, it does not work correctly. :(
used the wrong go playground link

@neolit123

This comment has been minimized.

Copy link
Member Author

commented Aug 21, 2019

/retest

@spiffxp

This comment has been minimized.

Copy link
Member

commented Aug 21, 2019

/lgtm

@dixudx
dixudx approved these changes Aug 21, 2019

@k8s-ci-robot k8s-ci-robot merged commit ca3e86e into kubernetes:master Aug 22, 2019

23 checks passed

cla/linuxfoundation neolit123 authorized
Details
pull-kubernetes-bazel-build Job succeeded.
Details
pull-kubernetes-bazel-test Job succeeded.
Details
pull-kubernetes-conformance-image-test Skipped.
pull-kubernetes-cross Skipped.
pull-kubernetes-dependencies Job succeeded.
Details
pull-kubernetes-e2e-gce Job succeeded.
Details
pull-kubernetes-e2e-gce-100-performance Job succeeded.
Details
pull-kubernetes-e2e-gce-csi-serial Skipped.
pull-kubernetes-e2e-gce-device-plugin-gpu Job succeeded.
Details
pull-kubernetes-e2e-gce-iscsi Skipped.
pull-kubernetes-e2e-gce-iscsi-serial Skipped.
pull-kubernetes-e2e-gce-storage-slow Skipped.
pull-kubernetes-godeps Skipped.
pull-kubernetes-integration Job succeeded.
Details
pull-kubernetes-kubemark-e2e-gce-big Job succeeded.
Details
pull-kubernetes-local-e2e Skipped.
pull-kubernetes-node-e2e Job succeeded.
Details
pull-kubernetes-node-e2e-containerd Job succeeded.
Details
pull-kubernetes-typecheck Job succeeded.
Details
pull-kubernetes-verify Job succeeded.
Details
pull-publishing-bot-validate Skipped.
tide In merge pool.
Details

@k8s-ci-robot k8s-ci-robot added this to the v1.16 milestone Aug 22, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.