Better doc on how systemd DynamicUser=True works #430
Labels
No Label
AdminAPI
Bug
Check AWS
CI
Correctness
Critical
Documentation
Ideas
Improvement
Low priority
Newcomer
Performance
S3 Compatibility
Testing
Usability
No Milestone
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: Deuxfleurs/garage#430
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Hello all,
I have garage working, starting from CLI "garage server",
but when try to start with systemd script from https://garagehq.deuxfleurs.fr/documentation/cookbook/systemd/ it is failing.
My configuration is:
OS is linux openSuse Leap 15.3
Thank you for any help.
I think the cause of the problem is the same as in the bug #359.
Will continue to troubleshoot on tomorow. Stay tuned.
I think the problem is due to the fact that you launched Garage outside of systemd once, it created these 2 folders: /var/lib/garage/{meta,data}. But our systemd service has many hardening, including
DynamicUser=True
, which triggers some magic in systemd that with create a folder named/var/lib/private/garage
and symlink/var/lib/garage
to it. But systemd cannot create this symlink as you already created a folder at this path.2 solutions, either:
DynamicUser=True
for the service at the cost of a less sandboxed Garage process, runsystemctl daemon-reload
andsystemctl restart garage
rm -rf /var/lib/garage
and restart the service withsystemctl restart garage
Hello Quentin,
you are right. I removed /var/lib/garage and everything starts OK with systemd script.
Can you add some info to documentation https://garagehq.deuxfleurs.fr/documentation/cookbook/systemd/ ?
Something like this:
Your garage.toml must be set with metadata_dir=/var/lib/garage/meta and data_dir=/var/lib/garage/data. This is mandatory to use systemd hardening feature Dynamic User, what autocreate these directories as virtual mapping. If directory /var/lib/garage exists, the systemd service doesnt start correctly. Note that in your host filesystem, Garage data will be held in /var/lib/private/garage.
Thank you very much for your help.
Not starting with systemdto Better errors with systemd DynamicUser=TrueBetter errors with systemd DynamicUser=Trueto Better doc on how systemd DynamicUser=True works