Passing RPC secret file doesn't work for some commands #695
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
3 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: Deuxfleurs/garage#695
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?
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