-
Notifications
You must be signed in to change notification settings - Fork 702
sshfs_mount: Recover mounts when sshfs exits for unexpected reasons #937
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
Conversation
Does that relate to #936 do you think? |
Also add some new sftpserver tests
633c4a1
to
b6f384f
Compare
Codecov Report
@@ Coverage Diff @@
## master #937 +/- ##
==========================================
+ Coverage 69.29% 69.33% +0.03%
==========================================
Files 193 192 -1
Lines 6716 6734 +18
==========================================
+ Hits 4654 4669 +15
- Misses 2062 2065 +3
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of polling the existence of the sshfs_server process in the VM on each sshfs event, did you consider taking the return code from the handle_* functions in SftpServer::process_message and on failure, try to determine if server dead, resurrect and retry?
libssh has a SSH_FX_CONECTION_LOST error code that can be returned by sftp_get_error() too.
I'm just curious why you took this approach.
I'm not sure where you think I'm polling for the |
Ah ok, I hadn't noticed that null check was so important. |
Ok, good, I hoped I wasn't missing something 😄 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep it appears to do the job. I could kill sshfs_server in the VM and this restarted it ok.
I do still think we could do things to make the sshfs_server in the VM more robust, perhaps set the oom killer score to make it less likely to be killed in a low memory situation. And might it be crashing?
Still, this is worth having
bors r+
I'm not sure of the exact reasons why The archive version of |
Build succeeded |
Fixes #509