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

Get rid of docker pause containers with a custom runtime. Closes #15086 #20017

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

apollo13
Copy link
Contributor

No description provided.

hostConfig.NetworkMode = netMode
if d.config.NewNetworking {
// "host" is not actually true here, it will cause joining the existing namespace
hostConfig.NetworkMode = "host"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Might still be better to use "none" here and test if it still works? But the differences are probably marginal. docker network inspect host/none will show the containers either way, even if they are not really attached.

@@ -951,6 +951,10 @@ func (d *Driver) createContainerConfig(task *drivers.TaskConfig, driverConfig *T
if _, ok := d.config.allowRuntimes[containerRuntime]; !ok && containerRuntime != "" {
return c, fmt.Errorf("requested runtime %q is not allowed", containerRuntime)
}
if d.config.NewNetworking && containerRuntime == "" {
// TODO: Maybe make nicer, but nomad does the trick for now
containerRuntime = "nomad"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Okay, docker info (and the equivalent API call) allows us to query the runtimes:

    "Runtimes": {
        "io.containerd.runc.v2": {
            "path": "runc"
        },
        "nomad": {
            "path": "/usr/local/bin/nomad-runc"
        },
        "runc": {
            "path": "runc"
        }
    },

With that we can put the path & args for the requested runtime into the annotation and defer to that.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Runtimes like gvisor have their own shim as well (containerd-shim-runsc-v1) in addition to runsc for the oci compliant interface. We can only support the latter and not the shims (unless we build a shim to proxy everything as well).

@tgross tgross added the stage/needs-rebase This PR needs to be rebased on main before it can be backported to pick up new BPA workflows label May 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stage/needs-rebase This PR needs to be rebased on main before it can be backported to pick up new BPA workflows
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants