The basic variant, in parallel, creates mount units on the fly, calls systemd-reload, followed by start and stop. On my machine it takes one loop to fail with:
systemd[1]: tmp-mounttest-mount-15.mount: Mount process finished, but there is no mount.
systemd[1]: tmp-mounttest-mount-15.mount: Failed with result 'protocol'.
systemd[1]: Failed to mount mount unit for test 15.
Note there are some variants in the script too. A variant where units are preloaded before was not seen to fail. Similarly, the variant using mount/umount directly. The variant using systemd-mount was flaky and is clearly missing some synchronization of the state information between systemd and systemd-mount.
The problem can be reliably reproduced on Ubuntu 18.10, Fedora 28/29 and Arch using this script: https:/ /gist.github. com/bboozzoo/ d4b142229b1915e f7cc0cf8593599a d9
The basic variant, in parallel, creates mount units on the fly, calls systemd-reload, followed by start and stop. On my machine it takes one loop to fail with:
systemd[1]: tmp-mounttest- mount-15. mount: Mount process finished, but there is no mount. mount-15. mount: Failed with result 'protocol'.
systemd[1]: tmp-mounttest-
systemd[1]: Failed to mount mount unit for test 15.
Note there are some variants in the script too. A variant where units are preloaded before was not seen to fail. Similarly, the variant using mount/umount directly. The variant using systemd-mount was flaky and is clearly missing some synchronization of the state information between systemd and systemd-mount.