-
Notifications
You must be signed in to change notification settings - Fork 24.3k
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
Create Repository API should validate file system repository paths for collisions #78276
Comments
Pinging @elastic/es-distributed (Team:Distributed) |
Can you give us a sense of how often users encounter problems that this proposal would fix @cjcenizal? Also a sense of where the protections that exist today break down? I think the errors you get in recent versions are fairly clear, they'll indicate that the repository was concurrently modified. Avoiding collisions at registration time is a hard problem to solve: we can check for literal path equality against other repositories in the cluster but should we also try and resolve symlinks? What about duplicate NFS mounts? With other repository types there are other ways to alias the same storage to different locations, do we need to detect them too? And we can't easily prevent a different cluster from mounting the same repository either. I see that we can make it a little stricter at registration time but it won't be much stricter, certainly not watertight, so the question is how valuable this is to add. |
No, sorry, I don't have any data on how frequently users hit this error or create file system repositories with the UI. Does the ES team have any telemetry on the percentage of repos that use the file system? That would give a rough idea of the potential for hitting this problem among our users.
Just a check for literal path equality would have helped me in this case. I'd settle for solving just the concrete problem I hit --"progress over perfection." :) |
I'm seeing quite a few of this happening lately, some of these are with frozen nodes. I'm guessing with the searchable snapshot setup, it may not be entirely clear to users that they can re-use the same repo? It would be great if Elasticsearch is able to return errors at register time if the repo has been written to and is not registered with a |
Previously it seems the issue happened more when duplicate snapshot repositories are registered. However, @renshuki and I also observed it may happen even when there's a single snapshot repository. |
What error message do you mean @kunisen? |
Thanks and sorry I forgot to mention that @DaveCTurner
Basically, we've seen this several times due to registering dup repositories. We didn't actually know the reason but unmounting and remounting the repository did the trick. |
The internal ticket was a case where multiple clusters ended up writing to the same repository. |
👋🏼 Regardless of if we decide to validation enforce #78276, may we please drop a doc note that users should avoid duplicating repositories (particularly bucket / base paths).
👋🏼 Regardless of if we decide to validation enforce elastic#78276, may we please drop a doc note that users should avoid duplicating repositories (particularly bucket / base paths).
👋🏼 Regardless of if we decide to validation enforce elastic#78276, may we please drop a doc note that users should avoid duplicating repositories (particularly bucket / base paths).
👋🏼 Regardless of if we decide to validation enforce elastic#78276, may we please drop a doc note that users should avoid duplicating repositories (particularly bucket / base paths).
Per convo with @original-brownbear, we advise users against mounting the same path in multiple repositories, or else this will result in weird errors or corruption.
We can improve the UX and help users avoid this situation by updating the Create Repository API to comparing the path defined in the request against those defined in existing repositories, and rejecting the request if there's a collision.
The text was updated successfully, but these errors were encountered: