Skip to content

docs/spec-conformance.md: document deviations - #5528

Merged
kolyshkin merged 2 commits into
opencontainers:mainfrom
kolyshkin:conformance-delete
Oct 16, 2026
Merged

kolyshkin merged 2 commits into
opencontainers:mainfrom
kolyshkin:conformance-delete

Conversation

@kolyshkin

@kolyshkin kolyshkin commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

Document the following deviations from the runtime spec in a new "Deviations" section:

  1. ociVersion is not validated: runc accepts a missing, empty, or invalid (non-SemVer) value, as well as a version with a different major, while the runtime spec says it is REQUIRED, MUST be in SemVer format, and an invalid value must generate an error.

    Fixes runc does not error on ociVersion=invalid #1846.

  2. If umask is not specified, runc sets the umask of the container init process to 0022, while the runtime spec says it should be left unchanged from the calling process' umask (for runc exec, it is left unchanged).

    Fixes Umask behavior doesn't match spec #3533.

Note that runc delete of a container in the created state is no longer listed, since the runtime spec now allows it (opencontainers/runtime-spec#1324). That should also fix #1774.

@kolyshkin

Copy link
Copy Markdown
Contributor Author

Or, we can make runc delete return an error for created (but not yet running) container, requiring the use of --force flag -- but I'm afraid we'll lose some backward compatibility that way.

@kolyshkin kolyshkin changed the title docs/spec-conformance.md: document delete of created container docs/spec-conformance.md: document deviations Oct 8, 2026
Comment thread docs/spec-conformance.md
This branch of runc implements the [OCI Runtime Spec v1.3.0](https://github.com/opencontainers/runtime-spec/tree/v1.3.0)
for the `linux` platform.

## Deviations

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Can we amend the spec to match the actual implementation?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

So, opencontainers/runtime-spec#1324 is merged and while the new wording is not yet in any released spec version, I think we can safely omit the fact that runc delete violates runtime-spec 1.3.0 by silently deleting created container (it was not documented anyway).

Commit removed.

@kolyshkin kolyshkin left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

(comment to trigger review-policy job)

kolyshkin and others added 2 commits October 15, 2026 23:51
The runtime spec says ociVersion is REQUIRED and MUST be in SemVer
format, and a runtime must generate an error when encountering an
invalid value. runc does not validate ociVersion at all, accepting
a missing, empty, or invalid value, as well as a version with a
different major.

Document this deviation.

Fixes opencontainers#1846.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
The runtime spec says that if umask is unspecified, it should not be
changed from the calling process' umask. runc, though, sets the umask
of the container init process to 0022 in this case (as it did before
umask support was added, and as crun does, too). For runc exec, the
umask is not changed.

Document this deviation.

Fixes opencontainers#3533.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>

@kolyshkin kolyshkin left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

flake in CI; restarted

@kolyshkin
kolyshkin enabled auto-merge October 16, 2026 22:20
@kolyshkin
kolyshkin merged commit d2691cb into opencontainers:main Oct 16, 2026
163 of 164 checks passed
@cyphar

cyphar commented Oct 16, 2026

Copy link
Copy Markdown
Member

FWIW, checking the spec version and only allowing new features based on the spec version would've let us avoid the whole farce with idmap mount options.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Umask behavior doesn't match spec runc does not error on ociVersion=invalid Failure of attempting to delete a container that is not stopped

3 participants