Skip to content

specgen: skip /dev/mqueue mount if not available#28639

Merged
Luap99 merged 1 commit into
podman-container-tools:mainfrom
giuseppe:skip-dev-mqueue-if-not-present
May 5, 2026
Merged

specgen: skip /dev/mqueue mount if not available#28639
Luap99 merged 1 commit into
podman-container-tools:mainfrom
giuseppe:skip-dev-mqueue-if-not-present

Conversation

@giuseppe
Copy link
Copy Markdown
Contributor

@giuseppe giuseppe commented May 4, 2026

do not add/dev/mqueue to the container if the device is not present on the host. This can happen if the kernel doesn't have support for mqueue, as it is the case with the libkrunfw kernel.

Closes: containers/crun#2080
Closes: containers/libkrun#653

I've not added any new tests as it requires a system where /dev/mqueue is not present.

Checklist

Ensure you have completed the following checklist for your pull request to be reviewed:

  • Certify you wrote the patch or otherwise have the right to pass it on as an open-source patch by signing all
    commits. (git commit -s). (If needed, use git commit -s --amend). The author email must match
    the sign-off email address. See CONTRIBUTING.md
    for more information.
  • Referenced issues using Fixes: #00000 in commit message (if applicable)
  • Tests have been added/updated (or no tests are needed)
  • Documentation has been updated (or no documentation changes are needed)
  • All commits pass make validatepr (format/lint checks)
  • Release note entered in the section below (or None if no user-facing changes)

Does this PR introduce a user-facing change?

None

@giuseppe giuseppe added the No New Tests Allow PR to proceed without adding regression tests label May 4, 2026
@baude
Copy link
Copy Markdown
Contributor

baude commented May 4, 2026

lgtm

Comment thread pkg/specgen/generate/oci_linux.go Outdated
check /proc/filesystems to determine if the kernel supports the mqueue
filesystem.  If it doesn't, skip the /dev/mqueue mount in the
container.  This can happen with the libkrunfw kernel that does not
have support for mqueue.

Closes: containers/crun#2080
Closes: containers/libkrun#653

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
@giuseppe giuseppe force-pushed the skip-dev-mqueue-if-not-present branch from c58a8cd to 1bda61b Compare May 4, 2026 18:04
@packit-as-a-service
Copy link
Copy Markdown

[NON-BLOCKING] Packit jobs failed. @containers/packit-build please check. Everyone else, feel free to ignore.

Copy link
Copy Markdown
Contributor

@Luap99 Luap99 left a comment

Choose a reason for hiding this comment

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

LGTM


const devMqueue = "/dev/mqueue"

func isMqueueSupported() bool {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

not blocking, I suppose for podman system service it might make sense to put this into a sync.OnceValue function

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.

it is a good idea. Opened a PR: #28650

@Luap99 Luap99 merged commit e3a4890 into podman-container-tools:main May 5, 2026
81 of 82 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

No New Tests Allow PR to proceed without adding regression tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Do not mount /dev/mqueue if it is not available OCI runtime error: crun: mount mqueue to dev/mqueue: No such device

3 participants