-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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 runc features
command
#3296
Conversation
cc @giuseppe for consistency with crun. This is expected to be merged in runc first and then crun. |
is it something that should be discussed in the runtime-specs so that other runtimes can benefit from it? |
I'm not sure, as the proposed JSON contains runc-specific features such as |
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.
This looks very good overall, thank you @AkihiroSuda!
My only comments are nits -- mostly, a few missing periods at end of sentences.
Also, I would avoid using github markdown in docstrings / comments -- they are not formatted by godoc (go.pkg.dev, etc) and thus look weird.
types/features/features.go
Outdated
|
||
const ( | ||
// AnnotationRuncVersion represents the version of runc, e.g., "1.2.3", or "1.2.3+dev". | ||
// Third party implementations such as crun and runsc SHOULD NOT use this annotation. |
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.
(On second thought, crun MAY use this annotation to report the most compatible runc version)
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.
Reworded: Third party implementations such as crun and runsc MAY use this annotation to report the most compatible runc version, however, parsing this annotation value is discouraged.
1e752dc
to
8558657
Compare
I'm a bit apprehensive about having this be something we define outside of the runtime-spec. We do have a lot of behaviour that is out-of-spec, but given that this feature appears to be needed to work around existing runtime-spec deficiencies (several aspects of the runtime-spec use strings to specify values which the kernel accepts as bitflags -- meaning that runtimes need to have the right string-to-bitflag mappings available), having this feature entirely out-of-spec seems less than ideal. Maybe we can prototype it outside of the runtime-spec (but if we're doing that then this feature would need to be feature-gated or otherwise have a warning saying "this may change in the future"), but long-term this should be part of the runtime-spec because not doing so would widen the (already worryingly large) gap between the runtime-spec and what a runtime actually has to implement to be a drop-in replacement for runc. |
8558657
to
0be834f
Compare
SGTM. The |
0be834f
to
7098a81
Compare
Moved the |
@cyphar PTAL |
Very much hope we can do an rc1 this week. |
I'll do a quick pass through all the remaining PRs and set up the rc1 release PR. |
ArgsUsage: "", | ||
Description: `Show the enabled features. | ||
The result is parsable as a JSON. | ||
See https://pkg.go.dev/github.com/opencontainers/runc/types/features for the type definition. |
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.
It would be nice to mention here that the output is subject to change, which will be slightly more visible than the changelog. But we can add that later.
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.
LGTM, but as mentioned above I will specify in the changelog that this is subject to change. We should probably also mention this in the help output.
Runtime-spec PR: opencontainers/runtime-spec#1130 |
The 'features' subcommand is not publicly documented yet, but it was introduced in `runc` in opencontainers/runc#3296. Signed-off-by: Christophe de Dinechin <[email protected]>
The 'features' subcommand is not publicly documented yet, but it was introduced in `runc` in opencontainers/runc#3296. Signed-off-by: Christophe de Dinechin <[email protected]>
The 'features' subcommand is not publicly documented yet, but it was introduced in `runc` in opencontainers/runc#3296. Signed-off-by: Christophe de Dinechin <[email protected]>
The 'features' subcommand is not publicly documented yet, but it was introduced in `runc` in opencontainers/runc#3296. Signed-off-by: Christophe de Dinechin <[email protected]>
The `runc features` subcommand returns a JSON formatted string listing the supported features. It is not documented, but it was implemented here: opencontainers/runc#3296. Based on the code, it does not seem to take any option. Signed-off-by: Christophe de Dinechin <[email protected]>
The 'features' subcommand is not publicly documented yet, but it was introduced in `runc` in opencontainers/runc#3296. Signed-off-by: Christophe de Dinechin <[email protected]>
The `features` subcommand is implemented in `runc`, but not documented. See opencontainers/runc#3296 Signed-off-by: Christophe de Dinechin <[email protected]> Suggested-by: Toru Komatsu <[email protected]>
The `runc features` subcommand returns a JSON formatted string listing the supported features. It is not documented, but it was implemented here: opencontainers/runc#3296. Based on the code, it does not seem to take any option. Signed-off-by: Christophe de Dinechin <[email protected]>
The `runc features` subcommand returns a JSON formatted string listing the supported features. It is not documented, but it was implemented here: opencontainers/runc#3296. Based on the code, it does not seem to take any option. Signed-off-by: Christophe de Dinechin <[email protected]>
The 'features' subcommand is not publicly documented yet, but it was introduced in `runc` in opencontainers/runc#3296. Signed-off-by: Christophe de Dinechin <[email protected]>
The `features` subcommand is implemented in `runc`, but not documented. See opencontainers/runc#3296 Signed-off-by: Christophe de Dinechin <[email protected]> Suggested-by: Toru Komatsu <[email protected]>
The 'features' subcommand is not publicly documented yet, but it was introduced in `runc` in opencontainers/runc#3296. Signed-off-by: Christophe de Dinechin <[email protected]>
The `features` subcommand is implemented in `runc`, but not documented. See opencontainers/runc#3296 Signed-off-by: Christophe de Dinechin <[email protected]> Suggested-by: Toru Komatsu <[email protected]>
The `runc features` subcommand returns a JSON formatted string listing the supported features. It is not documented, but it was implemented here: opencontainers/runc#3296. Based on the code, it does not seem to take any option. Signed-off-by: Christophe de Dinechin <[email protected]>
The 'features' subcommand is not publicly documented yet, but it was introduced in `runc` in opencontainers/runc#3296. Signed-off-by: Christophe de Dinechin <[email protected]>
The `features` subcommand is implemented in `runc`, but not documented. See opencontainers/runc#3296 Signed-off-by: Christophe de Dinechin <[email protected]> Suggested-by: Toru Komatsu <[email protected]>
Add the missing OCI cli options and change options order - checkpoint: Add the missing command-line options as documented for runc, and also reorder the options to match the documentation: https://github.com/opencontainers/runc/blob/main/man/runc-checkpoint.8.md (This does not mean that they are necessarily implemented) - no-pivot: The --no-pivot option is documented in https://github.com/opencontainers/runc/blob/main/man/runc-create.8.md Also change the options order in order to match the doc, this makes the code a bit easier to maintain. - exec: Add the missing command-line options for the exec subcommand. Reference: https://github.com/opencontainers/runc/blob/main/man/runc-exec.8.md - run: Also change the order to match the documentation in https://github.com/opencontainers/runc/blob/main/man/runc-run.8.md - update Add command-line options as documented in https://github.com/opencontainers/runc/blob/main/man/runc-update.8.md - spec: Add the missing bundle option, as documented in https://github.com/opencontainers/runc/blob/main/man/runc-spec.8.md - features The 'features' subcommand is not publicly documented yet, but it was introduced in `runc` in opencontainers/runc#3296. - liboci-cli: Update README with information about features subcommand The `features` subcommand is implemented in `runc`, but not documented. See opencontainers/runc#3296 - list: Add missing command-line options Add the command-line options documented in ------- Signed-off-by: Christophe de Dinechin <[email protected]> Signed-off-by: yihuaf <[email protected]> Co-authored-by: yihuaf <[email protected]>
The
runc features
command prints available features in JSON.Fix #3274
See
types/features/features.go
for the type definition.