Skip to content

devices: skip .incus-mounts when listing devices - #261

Open
SashaMIT wants to merge 1 commit into
moby:mainfrom
SashaMIT:fix/incus-mounts
Open

SashaMIT wants to merge 1 commit into
moby:mainfrom
SashaMIT:fix/incus-mounts

Conversation

@SashaMIT

@SashaMIT SashaMIT commented Oct 10, 2026 •

Copy link
Copy Markdown

GetDevices walks every directory it is given. Incus creates /dev/.incus-mounts with mode 0700, and reading that directory returns permission denied, so the whole listing fails.

.lxc, .lxd-mounts, and .udev are already skipped for the same reason. .incus-mounts is skipped too.

An unreadable directory with any other name still returns that error.

Red: GetDevices: permission denied. Green: nil. go test -count=1 . in devices passed.

Fixes #260

Incus creates /dev/.incus-mounts mode 0700. GetDevices recursed into it and failed the whole listing with permission denied. .lxc, .lxd-mounts, and .udev are already skipped for that reason.

Signed-off-by: Sasha Mitchell <sash.t.mitchell@gmail.com>
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.

devices: ignore .incus-mounts in GetDevices

1 participant