]> git.ipfire.org Git - thirdparty/systemd.git/commit
nspawn: introduce --cleanup option to clear propagation and unix-export directories
authorYu Watanabe <watanabe.yu+github@gmail.com>
Tue, 15 Oct 2024 08:25:09 +0000 (17:25 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Sun, 16 Mar 2025 02:02:09 +0000 (11:02 +0900)
commitc06a630f0c7d2396d47dbde93784c670791805fb
treec45358546ab24bdd8681a7f4b07e456c27f703ee
parent27cc77b746c54036c5d0d33ac476ee176c95003a
nspawn: introduce --cleanup option to clear propagation and unix-export directories

This is useful when the previous invocation is unexpectedly killed.

Otherwise, if systemd-nspawn is killed forcibly, then unix-export
directory is not cleared and unmounted, and the subsequent invocation
will fail. E.g.
===
[   18.895515] TEST-13-NSPAWN.sh[645]: + machinectl start long-running
[   18.945703] systemd-nspawn[1387]: Mount point '/run/systemd/nspawn/unix-export/long-running' exists already, refusing.
[   18.949236] systemd[1]: systemd-nspawn@long-running.service: Failed with result 'exit-code'.
[   18.949743] systemd[1]: Failed to start systemd-nspawn@long-running.service.
===
man/systemd-nspawn.xml
shell-completion/bash/systemd-nspawn
shell-completion/zsh/_systemd-nspawn
src/nspawn/nspawn.c
units/systemd-nspawn@.service.in