You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm starting to try out consul lock, which is a great feature. I've eventually figured out how to use it but have a bit of confusion at first. My initial attempt looked something like
consul lock -verbose /foo/bar 'sleep 100'
which produces:
Setting up lock at path: /foo/bar/.lock
Attempting lock acquisition
Lock acquisition failed: failed to acquire lock: Unexpected response code: 301 ()
The solution is to remove the leading /, so consul lock -verbose foo/bar 'sleep 100'. This is totally reasonable, but it would be good to have a more helpful error message. I was on a wild goose chase for a while thinking I had my web ui setup misconfigured somehow (since the 301 is a redirect to /ui/) before eventually figuring it out.
The text was updated successfully, but these errors were encountered:
@porterjamesj@armon This does give a proper error in master now. Feel free to reject this if the proper error is good enough (see b5f6451). I couldn't find a way to test this given the tests you have for the lock command, because they use touch and it will work properly with a leading slash. I'm open to suggestions of how to test given the testing facilities that are already in place.
Hi all!
I'm starting to try out
consul lock
, which is a great feature. I've eventually figured out how to use it but have a bit of confusion at first. My initial attempt looked something likewhich produces:
The solution is to remove the leading
/
, soconsul lock -verbose foo/bar 'sleep 100'
. This is totally reasonable, but it would be good to have a more helpful error message. I was on a wild goose chase for a while thinking I had my web ui setup misconfigured somehow (since the 301 is a redirect to/ui/
) before eventually figuring it out.The text was updated successfully, but these errors were encountered: