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

Gracefully handling unmount when using FUSE transport #197

Open
nrath-js opened this issue Nov 27, 2024 · 0 comments · May be fixed by #201
Open

Gracefully handling unmount when using FUSE transport #197

nrath-js opened this issue Nov 27, 2024 · 0 comments · May be fixed by #201

Comments

@nrath-js
Copy link

As far as I can tell, when using the FUSE transport and unmounting the filesystem with "fusermount3 -u", this results in FuseChannel's get_request method to fail when calling self.poll.poll. This error is then wrapped into a string and returned as a SessionFailure:

https://github.com/cloud-hypervisor/fuse-backend-rs/blob/master/src/transport/fusedev/linux_session.rs#L340

This makes it very hard to handle this normal event in a graceful manner. Is there anything I'm missing? Is there any way to detect when this happens other than attempting to parse the error string returned by get_requests?

nrath-js added a commit to nrath-js/fuse-backend-rs that referenced this issue Dec 3, 2024
At the moment, we are indiscriminately returning a SessionFailure("epoll error")
if any of the registered file descriptors would return an error upon read. This
means that the more detailed error handling code below can never be reached.

Instead, attempt to read from fuse device when the device is either
readable *or* has an error state, and then handle the error as we always
intended.

Fixes: cloud-hypervisor#197.
@nrath-js nrath-js linked a pull request Dec 4, 2024 that will close this issue
nrath-js added a commit to nrath-js/fuse-backend-rs that referenced this issue Dec 4, 2024
At the moment, we are indiscriminately returning a SessionFailure("epoll error")
if any of the registered file descriptors would return an error upon read. This
means that the more detailed error handling code below can never be reached.

Instead, attempt to read from fuse device when the device is either
readable *or* has an error state, and then handle the error as we always
intended.

Fixes: cloud-hypervisor#197.
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

Successfully merging a pull request may close this issue.

1 participant