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
libcephfs: add unmount function in cephfs.pyx #10774
Conversation
The failure is true: Error compiling Cython file:
------------------------------------------------------------
...
raise make_ex(ret, "error calling ceph_mount")
self.state = "mounted"
def unmount(self):
if self.state == "mounted":
with nogil:
^
------------------------------------------------------------
cephfs.pyx:485:8: Expected an increase in indentation level
Compiling cephfs.pyx because it changed.
Cythonizing cephfs.pyx
Traceback (most recent call last):
File "/home/jenkins-build/build/workspace/ceph-pull-requests/src/pybind/cephfs/setup.py", line 189, in <module>
os.path.join(os.path.dirname(__file__), "..", "rados")
File "/usr/lib/python2.7/dist-packages/Cython/Build/Dependencies.py", line 798, in cythonize
cythonize_one(*args[1:])
File "/usr/lib/python2.7/dist-packages/Cython/Build/Dependencies.py", line 915, in cythonize_one
raise CompileError(None, pyx_file)
Cython.Compiler.Errors.CompileError: cephfs.pyx
make[3]: *** [src/pybind/cephfs/CMakeFiles/cython_cephfs] Error 1
make[2]: *** [src/pybind/cephfs/CMakeFiles/cython_cephfs.dir/all] Error 2 |
736e168
to
f449967
Compare
def release_module(): | ||
global cephfs | ||
cephfs = libcephfs.LibCephFS(conffile='') | ||
cephfs.unmount() |
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.
Surely you don't mean to construct cephfs
and then call unmount on it immediately?
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.
yeah,I think I understand the mistake before
The "add unmount test" commit doesn't really seem to add a test, it just calls unmount at the end of existing test, right? Please could you add a test that mounts, does something, unmounts, then mounts again (using the same LibCephFS instance) and shows that the LibCephFS instance still works properly after the second mount. |
f449967
to
4cd0042
Compare
add test_mount_unmount() test |
we need unmount function when change the mount point Signed-off-by: huanwen ren <ren.huanwen@zte.com.cn>
4cd0042
to
67b2c08
Compare
cephfs.unmount() | ||
cephfs.mount() | ||
test_open() | ||
|
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.
Please remove the extra blank lines at the end.
@renhwztetecs , besides the comments looks OK. |
67b2c08
to
e9f587c
Compare
@aakso |
test_directory() | ||
cephfs.unmount() | ||
cephfs.mount() | ||
test_open() |
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.
@renhwztetecs, the line still has a trailing whitespace.
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.
I change it.
Jenkins has failed due to, Could NOT find Python3Interp: Found unsuitable version "2.7.5", but as already noted in http://www.spinics.net/lists/ceph-devel/msg32397.html I tested the PR locally. The included test ran successfully. @jcsp, the test looks OK to you? |
Signed-off-by: huanwen ren <ren.huanwen@zte.com.cn>
e9f587c
to
3091fa3
Compare
LGTM |
we need unmount function when change the mount point
Signed-off-by: huanwen ren ren.huanwen@zte.com.cn