how to configure cephfs-shell correctly
Hi all, I want to use cephfs-shell dealing with operations like directory creation, instead of mounting the root directory and create manually. But I get errors when I execute the command 'cephfs-shell'. Traceback (most recent call last): File "./cephfs-shell", line 9, in <module> import cephfs as libcephfs ModuleNotFoundError: No module named 'cephfs' CentOS7 use python2 and I've already installed python3 in the system. What else should I do, reinstall libcephfs? Thanks
This error disappeared after I installed 'python3-cephfs'. However the cephfs-shell command stuck. It stays at 'CephFS:~/>>>' and whatever subcommand I executed, it printed an error as below: EXCEPTION of type 'TypeError' occurred with message: 'onecmd() got an unexpected keyword argument 'add_to_history'' How can I use 'cephfs-shell'? Zhenshi Zhou <deaderzzs@gmail.com> 于2020年7月10日周五 下午3:09写道:
Hi all,
I want to use cephfs-shell dealing with operations like directory creation, instead of mounting the root directory and create manually. But I get errors when I execute the command 'cephfs-shell'.
Traceback (most recent call last): File "./cephfs-shell", line 9, in <module> import cephfs as libcephfs ModuleNotFoundError: No module named 'cephfs'
CentOS7 use python2 and I've already installed python3 in the system. What else should I do, reinstall libcephfs?
Thanks
On Tue, 14 Jul 2020 at 12:18, Zhenshi Zhou <deaderzzs@gmail.com> wrote:
This error disappeared after I installed 'python3-cephfs'. However the cephfs-shell command stuck. It stays at 'CephFS:~/>>>' and whatever subcommand I executed, it printed an error as below:
EXCEPTION of type 'TypeError' occurred with message: 'onecmd() got an unexpected keyword argument 'add_to_history''
How can I use 'cephfs-shell'?
What's the cmd2 version on your system? Looks like you are having an issue with it. Although most of the recent cmd2 versions are supported too, 0.7.9 is more recommended IMHO since cephfs-shell is regularly tested against it. You can install it via pip if you can't find it in CentOS7's repositories. Also, please let me know the Ceph version you are using so that I can try to reproduce the issue next time. - Rishabh
My system is CentOS7 and python is 3.6.8. Ceph version is 14.2.10, installed from ceph official repo. Versions of python packages list: attrs==19.3.0 cephfs==2.0.0 cmd2==1.2.0 colorama==0.4.3 importlib-metadata==1.7.0 pyperclip==1.8.0 rados==2.0.0 wcwidth==0.2.5 zipp==3.1.0 Rishabh Dave <ridave@redhat.com> 于2020年7月14日周二 下午4:04写道:
On Tue, 14 Jul 2020 at 12:18, Zhenshi Zhou <deaderzzs@gmail.com> wrote:
This error disappeared after I installed 'python3-cephfs'. However the cephfs-shell command stuck. It stays at 'CephFS:~/>>>' and whatever subcommand I executed, it printed an error as below:
EXCEPTION of type 'TypeError' occurred with message: 'onecmd() got an unexpected keyword argument 'add_to_history''
How can I use 'cephfs-shell'?
What's the cmd2 version on your system? Looks like you are having an issue with it.
Although most of the recent cmd2 versions are supported too, 0.7.9 is more recommended IMHO since cephfs-shell is regularly tested against it. You can install it via pip if you can't find it in CentOS7's repositories.
Also, please let me know the Ceph version you are using so that I can try to reproduce the issue next time.
- Rishabh
What's more, I tried in CentOS 7 as well as 8, and I got the same error. Zhenshi Zhou <deaderzzs@gmail.com> 于2020年7月14日周二 下午4:23写道:
My system is CentOS7 and python is 3.6.8. Ceph version is 14.2.10, installed from ceph official repo. Versions of python packages list: attrs==19.3.0 cephfs==2.0.0 cmd2==1.2.0 colorama==0.4.3 importlib-metadata==1.7.0 pyperclip==1.8.0 rados==2.0.0 wcwidth==0.2.5 zipp==3.1.0
Rishabh Dave <ridave@redhat.com> 于2020年7月14日周二 下午4:04写道:
On Tue, 14 Jul 2020 at 12:18, Zhenshi Zhou <deaderzzs@gmail.com> wrote:
This error disappeared after I installed 'python3-cephfs'. However the cephfs-shell command stuck. It stays at 'CephFS:~/>>>' and whatever subcommand I executed, it
printed
an error as below:
EXCEPTION of type 'TypeError' occurred with message: 'onecmd() got an unexpected keyword argument 'add_to_history''
How can I use 'cephfs-shell'?
What's the cmd2 version on your system? Looks like you are having an issue with it.
Although most of the recent cmd2 versions are supported too, 0.7.9 is more recommended IMHO since cephfs-shell is regularly tested against it. You can install it via pip if you can't find it in CentOS7's repositories.
Also, please let me know the Ceph version you are using so that I can try to reproduce the issue next time.
- Rishabh
Hi Rishabh, I installed cmd2 with pip, followed by document <https://docs.ceph.com/docs/master/cephfs/cephfs-shell/>. As you recommended, I set the install version of cmd2 to 0.7.9, and cephfs-shell is good to go. Thanks a lot :) Zhenshi Zhou <deaderzzs@gmail.com> 于2020年7月14日周二 下午4:25写道:
What's more, I tried in CentOS 7 as well as 8, and I got the same error.
Zhenshi Zhou <deaderzzs@gmail.com> 于2020年7月14日周二 下午4:23写道:
My system is CentOS7 and python is 3.6.8. Ceph version is 14.2.10, installed from ceph official repo. Versions of python packages list: attrs==19.3.0 cephfs==2.0.0 cmd2==1.2.0 colorama==0.4.3 importlib-metadata==1.7.0 pyperclip==1.8.0 rados==2.0.0 wcwidth==0.2.5 zipp==3.1.0
Rishabh Dave <ridave@redhat.com> 于2020年7月14日周二 下午4:04写道:
On Tue, 14 Jul 2020 at 12:18, Zhenshi Zhou <deaderzzs@gmail.com> wrote:
This error disappeared after I installed 'python3-cephfs'. However the cephfs-shell command stuck. It stays at 'CephFS:~/>>>' and whatever subcommand I executed, it
printed
an error as below:
EXCEPTION of type 'TypeError' occurred with message: 'onecmd() got an unexpected keyword argument 'add_to_history''
How can I use 'cephfs-shell'?
What's the cmd2 version on your system? Looks like you are having an issue with it.
Although most of the recent cmd2 versions are supported too, 0.7.9 is more recommended IMHO since cephfs-shell is regularly tested against it. You can install it via pip if you can't find it in CentOS7's repositories.
Also, please let me know the Ceph version you are using so that I can try to reproduce the issue next time.
- Rishabh
When I use cephfs-shell, I find that some commands are useless. And I am forced to use the interactive mode. I'm not sure if I use it in the correct way or not. Is there a more clear document? [image: image.png] Rishabh Dave <ridave@redhat.com> 于2020年7月14日周二 下午4:36写道:
On Tue, 14 Jul 2020 at 14:03, Zhenshi Zhou <deaderzzs@gmail.com> wrote:
Hi Rishabh,
I installed cmd2 with pip, followed by document. As you recommended, I set the install version of cmd2 to 0.7.9, and
cephfs-shell is good to go.
Thanks a lot :)
Great! You're welcome. :)
On Tue, 14 Jul 2020 at 14:24, Zhenshi Zhou <deaderzzs@gmail.com> wrote:
When I use cephfs-shell, I find that some commands are useless.
That's odd, either the command should be absent or should run successfully. On inspecting the source code, listxattr command is actually absent in Nautilus; it's available Octopus onwards.
And I am forced to use the interactive mode.
Yes, that is one issue with cephfs-shell that got fixed recently. The fix is clearly not backported to Nautilus (that is Ceph version 14) from the output you attached in your email.
I'm not sure if I use it in the correct way or not. Is there a more clear document?
AFAIK no. But I would like to point out that the doc you are referring (https://docs.ceph.com/docs/master/cephfs/cephfs-shell/) is for latest version of cephfs-shell, Nautilus has lesser features (for example, listxattr command is present in master but absent in Nautilus)
That's my mistake, I should have read the document of Nautilus. It's OK for the failed commands. 'mkdir' is enough for me at present. Thanks Rishabh, I will try it on Octopus cluster. Rishabh Dave <ridave@redhat.com> 于2020年7月14日周二 下午11:15写道:
On Tue, 14 Jul 2020 at 14:24, Zhenshi Zhou <deaderzzs@gmail.com> wrote:
When I use cephfs-shell, I find that some commands are useless.
That's odd, either the command should be absent or should run successfully. On inspecting the source code, listxattr command is actually absent in Nautilus; it's available Octopus onwards.
And I am forced to use the interactive mode.
Yes, that is one issue with cephfs-shell that got fixed recently. The fix is clearly not backported to Nautilus (that is Ceph version 14) from the output you attached in your email.
I'm not sure if I use it in the correct way or not. Is there a more clear document?
AFAIK no. But I would like to point out that the doc you are referring (https://docs.ceph.com/docs/master/cephfs/cephfs-shell/) is for latest version of cephfs-shell, Nautilus has lesser features (for example, listxattr command is present in master but absent in Nautilus)
participants (2)
-
Rishabh Dave
-
Zhenshi Zhou