Skip to content

Releases: lowRISC/container-hotplug

20260810-1

20260810-1 Pre-release
Pre-release

Choose a tag to compare

@github-actions github-actions released this 10 Aug 14:26
fix: detach cloned sysfs mounts from the host propagation group

`bind_sysfs` clones a device's sysfs directory with `open_tree(OPEN_TREE_CLONE)`,
which is the new-mount-API equivalent of `mount --bind`. Cloning a *shared* mount
yields a peer of the source rather than a private mount, and `/sys` is shared on
a systemd host (`mount --make-rshared /` at boot).

Device syspaths nest inside each other, so the clone for a device ends up being
the parent mount of the clones for its children. Mounting under a shared mount
propagates the new mount to every peer of the group, which includes the host's
own `/sys`. Those copies live in the host's mount namespace, so unlike the
container's own mounts they survive the container exiting, and `unbind_sysfs`
does not reach them -- it acts inside the container's namespace, and only when a
device is unplugged.

On a CI machine where the boards stay plugged in and containers come and go,
the host's mount table therefore grows by roughly one entry per device per
container start. One host reached ~98000 of the default `fs.mount-max` of
100000, past which every mount attempt failed:

    Cannot make sysfs writable: Cannot mount sysfs directory
    /sys/devices/.../usb7/7-2/7-2.4/7-2.4.1/7-2.4.1.1:
    No space left on device (os error 28)

Devices still attached and the container still started, so this degraded
silently until a job tried to write a sysfs attribute.

Make the detached clone private before attaching it. Verified with the same
syscall sequence that the clone goes from `private,slave master:12` (the
propagation group of `/sys`) to `private`, and that a mount made underneath it
then creates one mount rather than one per peer.

Nothing is lost by this: sysfs device directories are dentries within a single
superblock rather than submounts, so nothing under `/sys/devices` relies on
propagation to become visible.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

20260727-1

20260727-1 Pre-release
Pre-release

Choose a tag to compare

@github-actions github-actions released this 27 Jul 16:57
ci: add github pages deployement of the rustdocs

Signed-off-by: David James McCorrie <james.mccorrie@lowrisc.org>

20251118-1

20251118-1 Pre-release
Pre-release

Choose a tag to compare

@github-actions github-actions released this 18 Nov 17:01
chore: update cgroup_device_filters deps

20250409-1

20250409-1 Pre-release
Pre-release

Choose a tag to compare

@github-actions github-actions released this 09 Apr 13:42

What's Changed

  • Propagate udev messages into the container by @nbdd0121 in #13

Full Changelog: 20241201-1...20250409-1

20241201-1

20241201-1 Pre-release
Pre-release

Choose a tag to compare

@nbdd0121 nbdd0121 released this 01 Dec 15:07

What's Changed

  • Remove systemd's device filter configuration if any by @nbdd0121 in #9

Full Changelog: 20241011-1...20241201-1

20241011-1

20241011-1 Pre-release
Pre-release

Choose a tag to compare

@github-actions github-actions released this 11 Oct 11:53
Support block devices

20241008-1

20241008-1 Pre-release
Pre-release

Choose a tag to compare

@github-actions github-actions released this 08 Oct 11:39
Remount /dev when user namespace is used to allow accessing device nodes

20241004-1

20241004-1 Pre-release
Pre-release

Choose a tag to compare

@github-actions github-actions released this 04 Oct 12:32
Implement ID map parsing and translation

20240513-1

20240513-1 Pre-release
Pre-release

Choose a tag to compare

@github-actions github-actions released this 13 May 14:39
Fix cgroup.events error when cgroup is gone before reading events

If cgroup is gone before reading the cgroup.events file then it will return
an error. Treat errors as unpopulated to account for it.

Move container-hotplug from wrapper of docker to wrapper of runc

Choose a tag to compare

@nbdd0121 nbdd0121 released this 26 Apr 16:30
Apply README suggestions from code review

Co-authored-by: James Wainwright <james.wainwright@lowrisc.org>