]> git.ipfire.org Git - thirdparty/systemd.git/commit
nspawn: introduce --cleanup option (#34776)
authorYu Watanabe <watanabe.yu+github@gmail.com>
Sun, 16 Mar 2025 21:53:46 +0000 (06:53 +0900)
committerGitHub <noreply@github.com>
Sun, 16 Mar 2025 21:53:46 +0000 (06:53 +0900)
commit369c2325382cac3f308a56fdff6e0e11d2162832
tree1646377b133e73628295894c9925c4d636906fd6
parent8285c97b97332a4815d4b90356120ef55a51f6a5
parent15a46a961f287f16786e401b6976d40b2a54b61e
nspawn: introduce --cleanup option (#34776)

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.
```