-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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.mounted always remounts for bind mounts #19003
Comments
Will take a look. |
Can you run the state, then paste the output from mount into a comment? |
Thanks for the report @darkvertex - Looks like @garethgreenaway is already on the case! |
@darkvertex Did you see the request for additional info from @garethgreenaway? Thanks! |
I think I know what is happening. When you do a bind mount it uses the same mount options as the device where the bind mounted location is, eg. nfs option if you're bind mount is under a bind mount. I was hoping for confirming. So when salt checks the bind mounted location it's not expecting to see the options it's seeing and trying to remount. We'll likely need to add some logic to account for this. |
@garethgreenaway & @cachedout sorry for the delay. Here you go:
|
@darkvertex Sorry, I meant can you run the state to ensure that everything is mounted. Then run the mount command from the command line and prompt the output from that, not the Salt logs. I want to confirm my suspicion above. |
Ah! Ok. I ran the state which printed what I showed earlier. "mount -l" prints:
So... yeah... I think you're right! Bind mounts just show identical to the original mount, but in a different location, thus the options will match the source being "bound", not the options in the statefile necessarily, which of course confuses salt. Would you fix "mount.mounted"? Or make a new declaration, say "mount.bind"? |
Ideally fix mount.mounted but we may end up adding a mount.bind instead, might be easier in the long run. @cachedout @basepi @thatch45 thoughts? |
Might have figured this one out. A bit more testing. |
@darkvertex Can you give the fix referenced above a try? It should be available in the upcoming (any day now) release of 2014.7.1. |
@rallytime Hi Nicole, sorry for not replying sooner but I upgraded to 2014.7.1 and it seems it's not totally fixed. My salt config I mentioned earlier threw this error:
I think I know why. Look at this output:
So it threw a KeyError, right? I believe that's because it doesn't know that you can bind-mount to a subfolder of an existing mounted path, which I've done if you look closer. It's looking for a '/mnt/cloudshows/rdo/shows' key in the mounts list but doesn't find it, because it's '/mnt/cloudshows' since I'm mounting a subfolder within it. I think the code needs a patch to handle the use case of bind-mounting a subfolder of an existing mount. What do you think? (I suspect that if I was just bind-mounting the same mount source as an existing mount, your fix would probably work just fine.) |
Yeah, I think you're right about bind-mounting a sub-folder. @garethgreenaway care to take another look here? |
Taking a look. |
@darkvertex Can you share the full state file that's causes the exception? Thanks! |
I can confirm that this causes a problem with Quantum StorNext (cvfs) mounts in our environment (Salt-minion version 2014.7.0 (I will attempt to upgrade to see if there is a fix in 2014.7.1:
|
Hi, OS / Salt
state file
minion log
mount -l
Thanks, Peter |
this issue is about bind mounts I have the following state and it works on salt-master 2015.5.0 (Lithium)
but I can confirm that there are problems with non-bind type mounts ... but there are already issues for them. Thanks! |
@rallytime I think we can close this one as Helium isn't supported anymore anyways and this ticket seems abandoned :) |
Yes, I think you're right @The-Loeki. I'll close this. We can always open it again if needed. |
I'm seeing a lot of this whenever I highstate:
Yet the options have not changed. It happens all the time.
My statefile looks like:
The first one evaluates correctly and only mounts once, but the second bit with the bind mount will always remount, thinking the options changed. I don't get it. (...and yes I specifically need a bind mount; symlinking is not an option for what I need this for.)
I'm running salt "2014.7.0 (Helium)" on CentOS 6.6.
The text was updated successfully, but these errors were encountered: