Does not work on AlmaLinux (RedHat 8/CentOs and so on) #359
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/experimental
kind
ideas
kind
improvement
kind
performance
kind
testing
kind
usability
kind
wrong-behavior
prio
critical
prio
low
scope
admin-api
scope
admin-sdk
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
3 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: Deuxfleurs/garage#359
Loading…
Add table
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?
Fresh default install from cargo
After setting selinux to permissive mode:
Looks like some specific install instruction for RedHat 8 versions is necessary.
Hi mako,
Sorry to learn that Garage did not work on your machine.
Where did you put your configuration file? The error says that Garage was not able to read your configuration file. Keep in mind that the systemd configuration file we provide is hardened (
DynamicUser=true
,ProtectHome=true
, etc.). One of this hardening (ProtectHome
) prevents Garage from accessing/home
.This hardening is probably not handled by SELinux but by another security mechanism in the Linux kernel, which can be simply remounting an empty folder on
/home
. -> Setting SELinux in the permissive mode does not deactivate all hardenings.As I can see in your logs, it seems the path you indicated to Garage server is located in your home directory, so I am pretty convinced that's the issue you have here.
So my first advice would be to either:
/etc
, edit your systemd service to update it, and reload systemd (systemctl daemon-reload
).systemctl daemon-reload
).You can get more information about our systemd service in our documentation: https://garagehq.deuxfleurs.fr/documentation/cookbook/systemd/
Let me know if it fixes your problem!
I setup all by your default instructions.
So it is in /etc/garage/garage.toml with
Now I remove cargo version and install the
latest https://garagehq.deuxfleurs.fr/_releases/v0.7.2.1/x86_64-unknown-linux-musl/garage to /usr/local/bin/
I think default security of RedHat blocks access to necessary files.
So setup instructions do not work for RedHat 8 clones.
Just test on it.
Tested now on a fresh Scaleway DEV1-S running Alma Linux 8.6 and it works (see log below).
Based on your last message, it seems you put your config file at the following path:
/etc/garage/garage.toml
. It is not the default path checked by Garage, as Garage tries to open/etc/garage.toml
. So you can either move your config file in the root folder, directly in/etc
to match the default path OR you can inform Garage of the non-standard path you chose by runninggarage -c /etc/garage/garage.toml server
.This logic is also described in our quickstart. Our systemd doc page also mentions that we assume you put your configuration file at
/etc/garage.toml
.If it does not solve your problem, can you be more precise about the flavor of AlmaLinux you are running, some additional packages and hardening you installed/configured?
And I have just tested on AlmaLinux 8.6, some info about the VPS as a proof:
I created my config file by copy/pasting the one from our quickstart:
Then I downloaded + chmoded the binary as follow:
And finally I was able to run the server seamlessly as you can see:
I put my config to /etc/garage/garage.toml based on :your cookbook/real-world instructions page:
"A valid /etc/garage/garage.toml for our cluster would look as follows..."
So it is necessary just to change wrong instructions on this page.
With your great help garage works as you showed before.
But start from "systemd" does not work anyway, please check it too.
sudo systemctl start garage
sudo systemctl status garage
Thank you very much!!
So I tried with a fresh Alma Linux with systemd:
I copy/pasted our systemd service:
Started Garage and looked at its status, it works:
SELinux is activated (and I checked
journalctl
, no SELinux alerts):And I am able to interact with garage after that:
So now, I am pretty convinced we have covered Garage over a vanilla AlmaLinux.
Concerning your problem, I think this is specific to your deployment.
Garage reports the following error:
Sled is currently used to store our metadata, so it refers to this line in our config directory:
Are you sure your
/etc/garage.toml
file has this path set even after our previous test where I changed it to/tmp
? Do you have special permissions on your/var/lib/
folder?To help you check your paths, it looks like this on my FS after Garage first successful run, so make sure that files, folders and symlinks can be created here:
Note that I did not create a user named
garage
, this is handled by systemd directly through theDynamicUser
hardening, as we can see here:If it still does not work for you, can you try to remove the hardening:
/var/lib/garage
and/var/lib/private/garage/
if anymkdir -p /var/lib/garage
systemctl daemon-reload
systemctl start garage
Is this fixed?
Closing due to inactivity, feel free to re-open this issue or a new one with additional information.