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

Failure to unmount #61

Closed
jjn1056 opened this issue Dec 3, 2016 · 13 comments
Closed

Failure to unmount #61

jjn1056 opened this issue Dec 3, 2016 · 13 comments

Comments

@jjn1056
Copy link

jjn1056 commented Dec 3, 2016

I'm on a mac using the 'reverse' option (I'm mounting a folder on the guest into the host). Here's the problem. If I open a file from my mounted folder, when I do 'halt' on the VM we don't properly unmount.

For example, I open a text file from the mount point into VI (running on my host). I then do vagrant halt. The VM shuts down and the mount seems to disappear, but there running VI process is holding open a file. When I go to vagrant up the mount fails with

vm:

  • The host path of the shared folder is missing:

Looks like the old working plugin had some code that killed those running processes:

https://github.com/fabiokr/vagrant-sshfs/blob/master/lib/vagrant-sshfs/builders/host.rb#L10

If I fail to close all the processes I end up have to reboot in order to properly unmount.

@dustymabe
Copy link
Owner

Hey @jjn1056.. I just ran through the steps and I'm not able to reproduce on Linux. I'll try to reproduce this on Mac when I get access to one this week.

Thanks for reporting this issue. You should certainly be able to halt/up without issues.

@jjn1056
Copy link
Author

jjn1056 commented Dec 3, 2016

just FYI on my Mac if I manually run killall -9 sshfs followed by unmount -f $target that totally solves my 'hanging mount after halt problem. So that code in the original plugin was pretty important for this use case.

@dustymabe
Copy link
Owner

Thanks. That does look like a smoking gun.

@vincenzo
Copy link

vincenzo commented Dec 4, 2016

On Mac, I get a different error when I try and unmount a reverse mount:

Unmount the SSHFS mount failed.

The command and output are:

/sbin/umount ~/Documents/Platform.sh

Stdout from the command:

Stderr from the command:
umount: ~/Documents/Platform.sh: not currently mounted

but that's not accurate, since the mount is indeed active

$ mount
...
...
vagrant@127.0.0.1:/home/vagrant on /Users/myuser/Documents/Platform.sh (osxfusefs, nodev, nosuid, synchronous, mounted by myuser)

@jjn1056
Copy link
Author

jjn1056 commented Dec 4, 2016

I wonder what lsof returns for the mounted file?

@jjn1056
Copy link
Author

jjn1056 commented Mar 6, 2017

@dustymabe so not sure what your plan here is but this is still a huge problem for me. I find basically I have to reboot everytime my computer goes into sleep mode since that breaks the sshfs connection, with your new version. I don't mean to be a jerk here but you decided to rewrite a working plugin in a way that was 100% incompatible with the old, working version (and in the process busting my development workflow) and then you don't seem that interested in long term support of issues resulting from that. Maybe you could republish the old working version of the plugin under a new namespace (vagrant-sshfs-classic)? and then those of us with established code can use that? This has really given open source a black eye at my company.

@dustymabe
Copy link
Owner

dustymabe commented Mar 6, 2017

@jjn1056 looks like a fairy is going to bring me a mac machine this week for me to hold on to for when issues like this come up. I'll take a look at this issue and try to come to a resolution.

@dustymabe
Copy link
Owner

By the way, you can also easily use the old code by simply installing the earlier version: vagrant plugin install vagrant-sshfs --plugin-version 0.0.8

@dustymabe
Copy link
Owner

hey @jjn1056 - finally got the mac up and running. I absolutely can't reproduce the issue. We need to start dissecting differences between your setup and mine.

I have:

  • Mac OS X Yosemite 10.10.5
  • VirtualBox 4.3.32
  • Vagrant 1.8.6
  • osxfuse 3.5.3
  • vagrant-sshfs (1.3.0)

@dustymabe
Copy link
Owner

@jjn1056 - bump ^^

@dustymabe
Copy link
Owner

@vincenzo can you reproduce the issue that @jjn1056 originally reported where processes on the host are holding open files from the guest and not allowing subsequent mounts to succeed?

@vincenzo
Copy link

@dustymabe Nope.

@dustymabe
Copy link
Owner

thanks @vincenzo. I'm going to close this.

@jjn1056, please re-open if you see the issue again and have more information to give.

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

3 participants