bees
bees copied to clipboard
Stopping one of multiple beesd services removes the /run/bees directory
I ran two instances of [email protected], and stopped one of them (because this was a removable disk and deduplication was done), then the whole /run/bees directory was gone (tried nsenter into the beesd process's namespace but it was not there either).
This seems to be the culprit:
https://github.com/Zygo/bees/blob/124507232fe5682c8b6ebe80632c33eccefa8e29/scripts/beesd%40.service.in#L20
So for a multi-instance bees service, we should probably have one runtime directory per instance? OTOH, I wonder if that's intended behavior of systemd, or if it is a bug... I'd expect multiple instances of a service to share one runtime directory just fine...
Does it work with RuntimeDirectory=bees/%I?
It works better with RuntimeDirectory=bees/%i. %I will create nested directories as it replaces - with /. beesd still places files in /run/bees though, so these files are preserved.
RuntimeDirectoryPreserve=yes does the same.
if that's intended behavior of systemd, or if it is a bug
Maybe ask systemd devs?
It works better with
RuntimeDirectory=bees/%i.%Iwill create nested directories as it replaces-with/. beesd still places files in/run/beesthough, so these files are preserved.
Oh yes, I was unsure about %i vs %I. I think for the instantiated services, we should go with that then - and somehow ensure that such bees instance would actually place the files in such a subdirectory.
RuntimeDirectoryPreserve=yesdoes the same.
Yes but it would leave created files and directories behind if the last instance exited.