]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
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)
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.
```


Trivial merge