ceph / ceph-iscsi-cli

NOTICE: moved to https://github.com/ceph/ceph-iscsi
GNU General Public License v3.0
25 stars 25 forks source link

AttributeError: 'RadosPool' object has no attribute 'commit' #42

Open vatelzh opened 6 years ago

vatelzh commented 6 years ago

I setup the gwcli following http://docs.ceph.com/docs/master/rbd/iscsi-target-cli/ And when I executed "gwcli ls" command on top dir, this issue happened, is this a bug?

[root@gw1 iscsi]# gwcli ls 'RadosPool' object has no attribute 'commit'

[root@gw1 iscsi]# gwcli ls iscsi-target o- iscsi-target .......................................................................... [Targets: 1] o- iqn.2017-11.test.com:tgt1 ....................................................... [Gateways: 1] o- gateways ................................................................. [Up: 1/1, Portals: 1] | o- gw1 ....................................................................... [10.16.0.198 (UP)] o- host-groups ....................................................................... [Groups : 0] o- hosts ............................................................................... [Hosts: 0]

mikechristie commented 6 years ago

Yeah, thanks for the report. I will get that fixed in a couple of days.

vatelzh commented 6 years ago

Glance at the code, it maybe not a bug for gwcli, the root cause may be 'ceph df' has no output for rbd pool [root@node1 ~]# ceph df GLOBAL: SIZE AVAIL RAW USED %RAW USED 0 0 0 0 POOLS: NAME ID USED %USED MAX AVAIL OBJECTS [root@node1 ~]# ceph osd pool ls rbd [root@node1 ~]# rbd list aaa [root@node1 ~]#

@mikechristie How do you think?

mikechristie commented 6 years ago

It is weird that you do not have at least the default pool rbd in the ceph df output, but I get the same error when running "gwcli ls" and I have normal output:

GLOBAL: SIZE AVAIL RAW USED %RAW USED 380G 277G 102G 27.05 POOLS: NAME ID USED %USED MAX AVAIL OBJECTS rbd 0 26184M 21.66 94723M 6658

so I think it is just because when in the non-interactive mode like in your example, we just do not have some fields setup like in the interactive mode. We have that issue in a couple commands. I just have been trying to get time to check everything.

vatelzh commented 6 years ago

Wworkaround this issue by starting a ceph-mgr service... @mikechristie Hope this clue can help you to address root cause.