Skip to content

Conversation

@jordanbreen28
Copy link
Contributor

Continuation of #198.

Thanks for your contribution on this one @Sharpie :-)

The `deb_family_systemd_volume` logic hardcoded a
`--volume /sys/fs/cgroup:/sys/fs/cgroup:ro` flag when provisioning
Debian or Ubuntu containers in order to allow SystemD to run.

However, this mount is no longer sufficient when the docker host
is running a Kernel with CGroupsV2 and a SystemD version that defaults
to using `systemd.enableUnifiedCgroupHierarchy=true`:

  docker/for-mac#6073

Ubuntu 22.04 fits these criteria.

In these conditions, `--cgroupns=host -v /sys/fs/cgroup:/sys/fs/cgroup:rw`
must be used. However, attempting to pass these flags to `docker_exp`
via `docker_run_opts` causes `docker run` to fail due to a conflict
with the hardcoded mount from `deb_family_systemd_volume`:

```
stderr:docker: Error response from daemon: Duplicate mount point: /sys/fs/cgroup.
```

This commit removes the `deb_family_systemd_volume` logic as:

 - CGroup mounts must be configured for any OS family using SystemD, not
   just Debian and Ubuntu.

 - The user should be able to exercise full control over mount flags
   via `docker_run_opts`.
@jordanbreen28 jordanbreen28 requested a review from a team as a code owner March 21, 2023 13:02
@jordanbreen28 jordanbreen28 force-pushed the maint-remove_deb_family_system_volume branch 6 times, most recently from 0383ad0 to e4a6130 Compare March 21, 2023 13:55
This commit removes any reference to deb_family_system_volume.
@jordanbreen28 jordanbreen28 force-pushed the maint-remove_deb_family_system_volume branch 3 times, most recently from 949fc29 to b69d32d Compare March 21, 2023 14:50
@jordanbreen28 jordanbreen28 force-pushed the maint-remove_deb_family_system_volume branch 15 times, most recently from 0fcd482 to a1d0cc3 Compare March 22, 2023 13:37
@jordanbreen28 jordanbreen28 force-pushed the maint-remove_deb_family_system_volume branch 5 times, most recently from e615942 to cffc02c Compare March 22, 2023 15:54
@jordanbreen28 jordanbreen28 force-pushed the maint-remove_deb_family_system_volume branch from cffc02c to 9bd9713 Compare March 22, 2023 15:54
@chelnak chelnak merged commit 05b07d3 into main Mar 22, 2023
@chelnak chelnak deleted the maint-remove_deb_family_system_volume branch March 22, 2023 15:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants