Better doc on how systemd DynamicUser=True works #430
Labels
No labels
action
check-aws
action
discussion-needed
action
for-external-contributors
action
for-newcomers
action
more-info-needed
action
need-funding
action
triage-required
kind
correctness
kind
ideas
kind
improvement
kind
performance
kind
testing
kind
usability
kind
wrong-behavior
prio
critical
prio
low
scope
admin-api
scope
background-healing
scope
build
scope
documentation
scope
k8s
scope
layout
scope
metadata
scope
ops
scope
rpc
scope
s3-api
scope
security
scope
telemetry
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: Deuxfleurs/garage#430
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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