Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mv command is not possible #6

Open
LordFPL opened this issue Aug 2, 2017 · 2 comments
Open

mv command is not possible #6

LordFPL opened this issue Aug 2, 2017 · 2 comments

Comments

@LordFPL
Copy link

LordFPL commented Aug 2, 2017

Hello,

Thx for this projet, it can be very usefull... but in my case i'm blocked due to the mv command forbiden.
I create this issue in case you have a solution, or for others.

All the best :)

@bwester
Copy link
Owner

bwester commented Aug 2, 2017

Hi, thanks for looking at this project!

There's a good reason for the omission. The "mv" command is implemented using the "rename" operation on a file system, which POSIX says should be atomic. If interrupted, the source and destination paths must either be both unmodified or both changed. It's the only multi-file atomic operation in a POSIX file system, so a lot of software uses it to provide safe modifications.

When I started, Consul didn't support an atomic operation that would remove one key and add another. Rather than implement a non-atomic rename, I just disabled renames altogether. However, a "transaction" endpoint was added to Consul 0.7.0, making it possible to implement as a copy-and-delete operation.

I'll leave this issue open to document the feature request. I make no promise as to when I can build out this piece of functionality.

@LordFPL
Copy link
Author

LordFPL commented Aug 2, 2017

Many thanks for this (very) complete answer :)
For information, i have asked to consul group information about an official solution like yours : https://groups.google.com/forum/#!topic/consul-tool/TaPpkq3MdoY

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants