-
Notifications
You must be signed in to change notification settings - Fork 4.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
Mount conflict inconsistency #2878
Comments
Hi Jonathan, It's a bug. We should not only check to see if the new value is a sub mount, of an existing mount, but if it would also be a parent mount to an existing mount. Looking forward to the PR! |
Sounds good! To confirm - the desired behavior is detection of any potential sub-path conflict? |
Yep! Thinking about it there are two ways to solve this. One is traveling up the path hierarchy and looking for conflicts along the way. The other is to simply only allow top level mounts. It'd potentially be a breaking change but I wonder if there is a point in allowing non top level mounts if you can't sub mount. |
I'm leaning towards the first option. Disallowing non top-level mounts seems way too opinionated for a piece of software like Vault... |
I mean, mounts are Vault fakery in the first place :-) But I agree. |
@otakup0pe Just wanted to check, are you still intending to work up a PR for this? |
I've started poking at it, I'll make sure to reference this issue if I get a PR up... |
Sure. I think it's not too bad actually. We're not worried about speed in this path so really all you have to do is start with the given mount path, then in a loop knock one character off each iteration and check if that path exists. |
Ensure that we are not creating a "submount" underneath an already existing mountpoint. This (hopefully) fixes hashicorp#2878
We stumbled across something interesting with regards to how generic mountpoint conflicts are handled. We are not sure if this is the desired behavior or not. We understand that "sub mounts" are not supported, however this constraint seems to be only enforced in one direction.
This particular set of commands exhibits the behavior we expect.
The next set is what we find confusing. One might (possibly naively) expect that the second command, a "sub mount", would conflict with the first. Instead what we see is that the second mount works fine, with the third behaving consistently (as compared to the first example).
If this is considered a bug, I'm totally willing to submit a pull request to fix it. If it is not, then I am totally willing to to submit a pull request to clarify the documentation.
The text was updated successfully, but these errors were encountered: