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

Deletion of disk returns OK but is not removed #80

Open
fe-ax opened this issue Jan 17, 2018 · 4 comments
Open

Deletion of disk returns OK but is not removed #80

fe-ax opened this issue Jan 17, 2018 · 4 comments

Comments

@fe-ax
Copy link

fe-ax commented Jan 17, 2018

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>
@fe-ax
Copy link
Author

fe-ax commented Jan 17, 2018

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.

@mikechristie
Copy link
Contributor

Let's leave this one open. I will look into it some more, because it should work.

@Jazz9
Copy link

Jazz9 commented Nov 29, 2018

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>

@mikechristie
Copy link
Contributor

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants