]> git.ipfire.org Git - thirdparty/systemd.git/commit - man/systemctl.xml
core: add DBUS method to bind mount new nodes without service restart
authorLuca Boccassi <luca.boccassi@microsoft.com>
Thu, 30 Jul 2020 18:37:10 +0000 (19:37 +0100)
committerLuca Boccassi <luca.boccassi@microsoft.com>
Mon, 18 Jan 2021 17:24:05 +0000 (17:24 +0000)
commit5e8deb94c6f05137942b10b5288a37d9b09fd43f
tree1cbed6e76c6398d4c183a6b71e0a9927386833d8
parent94293d65cd4125347e21b3e423d0e245226b1be2
core: add DBUS method to bind mount new nodes without service restart

Allow to setup new bind mounts for a service at runtime (via either
DBUS or a new 'systemctl bind' verb) with a new helper that forks into
the unit's mount namespace.
Add a new integration test to cover this.

Useful for zero-downtime addition to services that are running inside
mount namespaces, especially when using RootImage/RootDirectory.

If a service runs with a read-only root, a tmpfs is added on /run
to ensure we can create the airlock directory for incoming mounts
under /run/host/incoming.
29 files changed:
man/org.freedesktop.systemd1.xml
man/systemctl.xml
man/systemd.exec.xml
meson.build
shell-completion/bash/systemctl.in
shell-completion/zsh/_systemctl.in
src/core/dbus-manager.c
src/core/dbus-service.c
src/core/dbus-service.h
src/core/dbus-unit.c
src/core/dbus-util.c
src/core/dbus-util.h
src/core/execute.c
src/core/execute.h
src/core/namespace.c
src/core/namespace.h
src/core/org.freedesktop.systemd1.conf
src/systemctl/systemctl-mount.c [new file with mode: 0644]
src/systemctl/systemctl-mount.h [new file with mode: 0644]
src/systemctl/systemctl.c
src/systemctl/systemctl.h
src/test/test-namespace.c
src/test/test-ns.c
test/TEST-57-RUNTIME-BIND-PATHS/Makefile [new symlink]
test/TEST-57-RUNTIME-BIND-PATHS/test.sh [new file with mode: 0755]
test/units/testsuite-57-namespaced.service [new file with mode: 0644]
test/units/testsuite-57-non-namespaced.service [new file with mode: 0644]
test/units/testsuite-57.service [new file with mode: 0644]
test/units/testsuite-57.sh [new file with mode: 0755]