The Tahoe-LAFS systemd `preStart` script appears to wipe the node directory
Created by: exarkun
3d40a7df apparently introduced a regression in the tahoe-lafs storage node systemd service defined by nixos/modules/tahoe.nix
. The service definition was changed in an attempt to fix another regression introduced by 1c4b5222 which changed the systemd configuration so that old incident reports would be deleted. This incidentally caused the incident reports directory to be created by systemd which caused Tahoe-LAFS to fail to create the node directory (because it will only operate on empty directories).
The first regression mentioned above resulted in the Tahoe-LAFS storage node directory being wiped and recreated when the deployment was next updated.
The preStart
script in question is https://github.com/PrivateStorageio/PrivateStorageio/blob/b32da8538632c62b269828828c3cdc5fe1b14ebf/nixos/modules/tahoe.nix#L236-L261
I don't yet see why it behaved the way it did, though. Presumably the first step is to write a test...