devices: ignore .incus-mounts in GetDevices
Nobody has claimed this yet.
Assessment
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Newbie friendliness
- 88/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- go
- Domain
- operating-systems
Research direction
Start in devices/device_unix.go at GetDevices and its directory-entry switch, where .lxc and .lxd-mounts are already skipped. Add .incus-mounts to the skipped entries and verify that GetDevices("/dev") no longer attempts to open that mode-0700 path.
Written by the indexing model from the issue text.
Description
In Incus containers, /dev/.incus-mounts is created with mode 0700. Calling devices.GetDevices("/dev") fails with:
open /dev/.incus-mounts: permission denied
Similar to the existing .lxc and .lxd-mounts entries, .incus-mounts should be skipped during directory traversal:
diff --git a/devices/device_unix.go b/devices/device_unix.go
index bd401d3..174979d 100644
--- a/devices/device_unix.go
+++ b/devices/device_unix.go
@@ -100,7 +100,8 @@ func GetDevices(path string) ([]*config.Device, error) {
switch f.Name() {
// ".lxc" & ".lxd-mounts" added to address https://github.com/lxc/lxd/issues/2825
// ".udev" added to address https://github.com/opencontainers/runc/issues/2093
- case "pts", "shm", "fd", "mqueue", ".lxc", ".lxd-mounts", ".udev":
+ // ".incus-mounts" added for Incus container environments
+ case "pts", "shm", "fd", "mqueue", ".lxc", ".lxd-mounts", ".udev", ".incus-mounts":
continue
default:
sub, err := GetDevices(filepath.Join(path, f.Name()))
- Dominant language
- Go
- Stars
- 101
- Forks
- 61
- Avg merge
- 2d 7h
- Merged PRs (30d)
- 5
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from moby/sys
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
Difficulty 3/5 1-2 days Newbie friendliness 74/100
-
Difficulty 3/5 1-2 days Newbie friendliness 68/100
-
Difficulty 3/5 1-2 days Newbie friendliness 68/100
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
Similar issues
-
Difficulty 1/5 Under an hour Newbie friendliness 84/100
-
enhancement needs triage
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
kind/cleanup
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
kubernetes-sigs/kueue#15947 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
sympozium-ai/sympozium#627 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100