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

feat: add ofs ctrl-c exit unmount hook #4393

Merged
merged 4 commits into from
Mar 26, 2024
Merged

feat: add ofs ctrl-c exit unmount hook #4393

merged 4 commits into from
Mar 26, 2024

Conversation

oowl
Copy link
Member

@oowl oowl commented Mar 25, 2024

currently, if we stop ofs running, it does not unmount fuse3 dir,

╭─ouyang@owl-home ~/code/opendal/bin/ofs ‹main› 
╰─$ RUST_LOG=debug ./target/debug/ofs ./exampless "fs://?root=/home/ouyang/tmp" 
[2024-03-25T14:27:05Z DEBUG opendal::services::fs::backend] backend build started: FsBuilder { root: Some("/home/ouyang/tmp"), atomic_write_dir: None }
[2024-03-25T14:27:05Z DEBUG opendal::services::fs::backend] backend use root /home/ouyang/tmp
[2024-03-25T14:27:05Z DEBUG opendal::services::fs::backend] backend build finished: FsBuilder { root: None, atomic_write_dir: None }
^C
╭─ouyang@owl-home ~/code/opendal/bin/ofs ‹main› 
╰─$ ls -al ./exampless                                                                                                                                                   130 ↵
ls: cannot access './exampless': Transport endpoint is not connected
╭─ouyang@owl-home ~/code/opendal/bin/ofs ‹main› 
╰─$ sudo fusermount3 -u ./exampless           

fuse3 has been implement unmount feature Sherlock-Holo/fuse3#78, but it just include by alpha release. I am not sure if we can accept the alpha release crates library (due to ofs being early stage)?

╭─ouyang@owl-home ~/code/opendal/bin/ofs ‹feat/ofs-unmount-ctrl-c› 
╰─$ RUST_LOG=debug ./target/debug/ofs ./exampless "fs://?root=/home/ouyang/tmp"                                                                                          130 ↵
[2024-03-25T14:31:45Z DEBUG opendal::services::fs::backend] backend build started: FsBuilder { root: Some("/home/ouyang/tmp"), atomic_write_dir: None }
[2024-03-25T14:31:45Z DEBUG opendal::services::fs::backend] backend use root /home/ouyang/tmp
[2024-03-25T14:31:45Z DEBUG opendal::services::fs::backend] backend build finished: FsBuilder { root: None, atomic_write_dir: None }
^C%                                                                                                                                                                            ╭─ouyang@owl-home ~/code/opendal/bin/ofs ‹feat/ofs-unmount-ctrl-c› 
╰─$ ls -al ./exampless
total 0
drwxr-xr-x 1 ouyang ouyang   0 Mar 25 16:59 .
drwxr-xr-x 1 ouyang ouyang 166 Mar 25 22:31 ..

@Xuanwo
Copy link
Member

Xuanwo commented Mar 25, 2024

I am not sure if we can accept the alpha release crates library (due to ofs being early stage)?

If the authors are labeling this release as alpha, they must have their reasons, right? Otherwise, we could simply request a stable version. Therefore, I don't believe we need to or should rely on an alpha release.

@oowl
Copy link
Member Author

oowl commented Mar 25, 2024

I am not sure if we can accept the alpha release crates library (due to ofs being early stage)?

If the authors are labeling this release as alpha, they must have their reasons, right? Otherwise, we could simply request a stable version. Therefore, I don't believe we need to or should rely on an alpha release.

Yeah, Let's draft the current PR and wait for the upstream release.

@oowl oowl marked this pull request as draft March 25, 2024 14:48
@Xuanwo
Copy link
Member

Xuanwo commented Mar 25, 2024

Also invite @Sherlock-Holo to join the discussion.

@oowl
Copy link
Member Author

oowl commented Mar 26, 2024

Also invite @Sherlock-Holo to join the discussion.

https://github.com/Sherlock-Holo/fuse3/releases/tag/0.7.1 v0.7.1 released, Let's continue.

@oowl oowl marked this pull request as ready for review March 26, 2024 03:46
Copy link
Member

@Xuanwo Xuanwo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@Xuanwo Xuanwo merged commit cf3742c into main Mar 26, 2024
197 checks passed
@Xuanwo Xuanwo deleted the feat/ofs-unmount-ctrl-c branch March 26, 2024 09:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants