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

Add a special-cased runtime handler for dockershim #78323

Merged
merged 1 commit into from May 25, 2019

Conversation

@tallclair
Copy link
Member

commented May 24, 2019

What type of PR is this?
/kind feature

What this PR does / why we need it:
In the RuntimeClass beta API released with v1.14, the runtime Handler field is no longer permitted to be empty. Since dockershim doesn't accept a non-empty runtime handler, it means that pods run with docker shim must leave RuntimeClass empty.

This PR adds a hard coded runtime handler that is accepted by dockershim, the docker handler. This lets dockershim nodes take advantage of the new scheduling & overhead features being added to runtime class, and also lets us test handler usage in the cluster E2E tests running on docker.

Does this PR introduce a user-facing change?:

The dockershim container runtime now accepts the `docker` runtime handler from a RuntimeClass.

/sig node
/priority important-soon
/cc @egernst @yastij
/assign @yujuhong
/milestone v1.15

@k8s-ci-robot

This comment has been minimized.

Copy link
Contributor

commented May 24, 2019

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: tallclair

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

@mattjmcnaughton
Copy link
Contributor

left a comment

/lgtm

thanks for fixing :)

@@ -96,7 +96,7 @@ func (ds *dockerService) RunPodSandbox(ctx context.Context, r *runtimeapi.RunPod
}

// Step 2: Create the sandbox container.
if r.GetRuntimeHandler() != "" {
if r.GetRuntimeHandler() != "" && r.GetRuntimeHandler() != runtimeName {

This comment has been minimized.

Copy link
@mattjmcnaughton

mattjmcnaughton May 25, 2019

Contributor
Suggested change
if r.GetRuntimeHandler() != "" && r.GetRuntimeHandler() != runtimeName {
runtimeHandlerEmpty := r.GetRuntimeHandler() == ""
runtimeHandlerIsDocker := r.GetRuntimeHandler() == runtimeName
if !runtimeHandlerEmpty && !runtimeHandlerIsDocker {

small nit, but could this be slightly more readable with a descriptive variable name?

@k8s-ci-robot k8s-ci-robot added the lgtm label May 25, 2019

@yastij

yastij approved these changes May 25, 2019

Copy link
Member

left a comment

/lgtm

@yastij

This comment has been minimized.

Copy link
Member

commented May 25, 2019

/retest

@k8s-ci-robot k8s-ci-robot merged commit eaece39 into kubernetes:master May 25, 2019

20 checks passed

cla/linuxfoundation tallclair 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-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-typecheck Job succeeded.
Details
pull-kubernetes-verify Job succeeded.
Details
pull-publishing-bot-validate Skipped.
tide In merge pool.
Details
@mrunalp

This comment has been minimized.

Copy link
Contributor

commented May 29, 2019

This breaks CRI-O CI. We are getting "docker" as the runtime class.

@dims

This comment has been minimized.

Copy link
Member

commented May 30, 2019

@mrunalp wanna file a revert PR or something to fix it up correctly?

@mattjmcnaughton

This comment has been minimized.

Copy link
Contributor

commented May 30, 2019

This breaks CRI-O CI. We are getting "docker" as the runtime class.

Thanks for sharing this :) For my own curiosity, when you get a second, can you share more about how its breaking CRI-O CI?

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.