Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 #20017
base: main
Are you sure you want to change the base?
Get rid of docker pause containers with a custom runtime #20017
Changes from 2 commits
93c0eee
b87b6f1
c3a5780
12dc8c7
5f77f6f
76a5f44
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
Check failure on line 33 in command/runc.go
GitHub Actions / checks / checks
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should bikeshed over this field name some. But "no pause container" with a default of false makes for an awkward double-negative so I appreciate you're trying to avoid that here. 😁
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You read my mind… Also I am not sure if the default (if omitted) wouldn't be always false and then it would be
no pause container = false
which would be the default we don't want? Or can we express that better in hcl (bool reference to allow checking for null?).There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Renamed to
nomad_native_networking
for the lack of a better name, feel free to change at will.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was thinking about this a bit and I'm not sure that's inevitable? What if the Nomad runtime function took an argument that was the binary to call next (defaulting to
runc
) along with args to transparently pass-thru? We likely need that anyway because we can't rely on the location ofrunc
being at a specific path like/usr/bin/runc
as we've done here.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So that is just me being lazy. In practice, the docker api supports querying the registered runtimes (run
docker info
on your box and you will see them, so it must be part of the API). We could query that and then pass the "sub"-runtime through via annotations like with the network ns (we have to use annotations since it is docker calling the runtime and we cannot pass arbritrary args)There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay we cannot pass on the binary to call next via annotations since the oci runtime operations like
state
&delete
only pass in a container ID. So the only thing we can do is force the enduser to specify something like this in docker daemon.json:and then we can just prefix
nomad-
to the requested runtime if the "new" networking is enabled. Not really nice but probably good enough.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added a commit that prefixes other runtimes with
nomad-*
. Should we consider the interaction withallow_runtimes
? I am leaning towards a no since thosenomad-*
runtimes have to be configured explicitly anyways?There was a problem hiding this comment.
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.