ceph-iscsi-cli
ceph-iscsi-cli copied to clipboard
Deletion of disk returns OK but is not removed
After fixing the previous issue this new issue occurred, the disk and client are deleted but reappear after reopening gwcli.
/iscsi-target...stiscsi/hosts> ls
o- hosts .......................................................................... [Hosts: 1]
o- iqn.1998-01.com.vmware:internal-appliances-hv-01-4b798644 .... [Auth: CHAP, Disks: 0(0b)]
/iscsi-target...stiscsi/hosts> delete iqn.1998-01.com.vmware:internal-appliances-hv-01-4b798644
ok
/iscsi-target...stiscsi/hosts> ls
o- hosts .......................................................................... [Hosts: 0]
/iscsi-target...stiscsi/hosts> cd /disks
/disks> delete rbd.testimage123
rbd rbd/testimage123 is not defined to the configuration
/disks> delete rbd.imagetest123
ok
/disks> ls /
o- / ................................................................................... [...]
o- clusters .................................................................. [Clusters: 1]
| o- ceph .................................................................... [HEALTH_WARN]
| o- pools .................................................................... [Pools: 1]
| | o- rbd ....................................... [(x3), Commit: 0b/10.2T (0%), Used: 4K]
| o- topology .......................................................... [OSDs: 6,MONs: 3]
o- disks .................................................................... [0b, Disks: 0]
o- iscsi-target ............................................................... [Targets: 1]
o- iqn.2018-01.com.test.iscsi-gw:testiscsi ................................. [Gateways: 3]
o- gateways ...................................................... [Up: 3/3, Portals: 3]
| o- iscsigw01 ....................................................... [10.0.36.21 (UP)]
| o- iscsitest ............................................................. [10.0.36.21 (UP)]
| o- iscsitest2 ......................................................... [10.0.36.22 (UP)]
o- host-groups ............................................................ [Groups : 0]
o- hosts .................................................................... [Hosts: 0]
/disks> cd /
/> cd iscsi-target/
/iscsi-target> clearconfig confirm=true
Clients(1) and Disks(1) must be removed first before clearing the gateway configuration
/iscsi-target> exit
[zxcs@testrbd root]$ sudo gwcli
/iscsi-target> ls /
o- / ................................................................................... [...]
o- clusters .................................................................. [Clusters: 1]
| o- ceph .................................................................... [HEALTH_WARN]
| o- pools .................................................................... [Pools: 1]
| | o- rbd ....................................... [(x3), Commit: 5G/10.2T (0%), Used: 4K]
| o- topology .......................................................... [OSDs: 6,MONs: 3]
o- disks .................................................................... [5G, Disks: 1]
| o- rbd.imagetest123 .................................................. [imagetest123 (5G)]
o- iscsi-target ............................................................... [Targets: 1]
o- iqn.2018-01.com.test.iscsi-gw:testiscsi ................................. [Gateways: 3]
o- gateways ...................................................... [Up: 3/3, Portals: 3]
| o- iscsigw01 ....................................................... [10.0.36.21 (UP)]
| o- iscsitest ............................................................. [10.0.36.21 (UP)]
| o- iscsitest2 ......................................................... [10.0.36.22 (UP)]
o- host-groups ............................................................ [Groups : 0]
o- hosts .................................................................... [Hosts: 1]
o- iqn.1998-01.com.vmware:internal-appliances-hv-01-4b798644 [Auth: CHAP, Disks: 0(0b)]
/iscsi-target>
Ok figured out deleting the pool and recreate it removes all configs. Besides that you'll have to open up targetcli and delete iqn... from iscsi.
Can be closed if this is not something that should be fixed.
Let's leave this one open. I will look into it some more, because it should work.
This still seems like a current issue.
[root@NAS-AUSYD-RK4-CEPHMON2 ~]# gwcli /disks> ls o- disks ......................................................................................................... [3073G, Disks: 2] o- AUSYD-ISCSI-SSD.AUSYD-HPV-HVC02 ........................................................................ [AUSYD-HPV-HVC02 (1G)] o- AUSYD-ISCSI-SSD.AUSYD-VMW-Cluster02 .............................................................. [AUSYD-VMW-Cluster02 (3.0T)] /disks> delete image_id=AUSYD-ISCSI-SSD.AUSYD-HPV-HVC02 ok /disks> exit [root@NAS-AUSYD-RK4-CEPHMON2 ~]# gwcli /disks> ls o- disks ......................................................................................................... [3073G, Disks: 2] o- AUSYD-ISCSI-SSD.AUSYD-HPV-HVC02 ........................................................................ [AUSYD-HPV-HVC02 (1G)] o- AUSYD-ISCSI-SSD.AUSYD-VMW-Cluster02 .............................................................. [AUSYD-VMW-Cluster02 (3.0T)] /disks>
Ah weird. It has been working for me for a while.
Does this always happen? Can you run gwcli in debug mode:
gwcli -d
and then also send the /var/log/rbd-target-api/rbd-target-api.log (or some older versions /var/log/rbd-target-api.log) for all the gws so I can check why it is not getting deleted from the config object?