Passing RPC secret file doesn't work for some commands #695
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 project
No assignees
3 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: Deuxfleurs/garage#695
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?
I noticed that
garage --rpc-secret-file /path/to/secret status
exited immediately with the outputError: No RPC secret provided
. It's interesting becausegarage --rpc-secret-file /path/to/secret server
worked fine to start the server...I took a look at the code and came up with this patch as a very bad no good fix. I think a more robust solution to this problem would unfortunately be to rearchitect the config/secrets loading entirely, as it seems like the logic for this stuff is scattered quite a bit and has different behavior based on the code path you take (as evidenced above).
Same applies to the
GARAGE_RPC_SECRET_FILE
environment variable, it doesn't override values in the config file either.IMHO, the order should be as follows (from less prio to more prio, following ones overriding previous ones):
@flokli can you confirm you are talking about CLI commands such as
garage status
, and not thegarage server
command?I agree on how you are priorizing the different sources for the secret, in theory this is what we implemented, at least for the
garage server
command. We might have botched it forgarage status
, etc.lx referenced this issue2024-03-01 14:14:56 +00:00