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

Cannot remove a non-existent gatway by confirm=true #162

Closed luckydogxf closed 1 year ago

luckydogxf commented 2 years ago

Hi, please see below output. ceph-iscsi-gw-1.ipa.pthl.hklocalhost.localdomain is the one who is being messed up with a wrong hostname. I want to delete it.

/iscsi-target...-igw/gateways> ls
o- gateways .................................................................................................. [Up: 2/3, Portals: 3]
  o- ceph-iscsi-gw-1.ipa.pthl.hk ............................................................................. [172.16.202.251 (UP)]
  o- ceph-iscsi-gw-1.ipa.pthl.hklocalhost.localdomain .............................................. [172.16.202.251 (UNAUTHORIZED)]
  o- ceph-iscsi-gw-2.ipa.pthl.hk ............................................................................. [172.16.202.252 (UP)]

/iscsi-target...-igw/gateways> delete gateway_name=ceph-iscsi-gw-1.ipa.pthl.hklocalhost.localdomain confirm=true
Deleting gateway, ceph-iscsi-gw-1.ipa.pthl.hklocalhost.localdomain
Could not contact ceph-iscsi-gw-1.ipa.pthl.hklocalhost.localdomain. If the gateway is permanently down. Use confirm=true to force removal. WARNING: Forcing removal of a gateway that can still be reached by an initiator may result in data corruption.
/iscsi-target...-igw/gateways>
/iscsi-target...-igw/gateways> delete gateway_name=ceph-iscsi-gw-1.ipa.pthl.hklocalhost.localdomain confirm=true
Deleting gateway, ceph-iscsi-gw-1.ipa.pthl.hklocalhost.localdomain
Failed : Unhandled exception: list.remove(x): x not in list

However ceph-iscsi-gw-1.ipa.pthl.hklocalhost.localdomain is still there. Version info is ceph-iscsi-3.5-1.el8cp.noarch on RHEL 8.4.

Please help, thanks.

luckydogxf commented 2 years ago
/iscsi-target...-igw/gateways> ls
o- gateways .................................................................................................. [Up: 2/3, Portals: 3]
  o- ceph-iscsi-gw-1.ipa.pthl.hk ............................................................................. [172.16.202.251 (UP)]
  o- ceph-iscsi-gw-1.ipa.pthl.hklocalhost.localdomain ................................................... [172.16.202.251 (UNKNOWN)]
  o- ceph-iscsi-gw-2.ipa.pthl.hk ............................................................................. [172.16.202.252 (UP)]
/iscsi-target...-igw/gateways> delete ceph-iscsi-gw-1.ipa.pthl.hklocalhost.localdomain confirm=true
Deleting gateway, ceph-iscsi-gw-1.ipa.pthl.hklocalhost.localdomain
Failed : Unhandled exception: list.remove(x): x not in list
luckydogxf commented 2 years ago

Did I hit a bug ? I did follow the official instructions

luckydogxf commented 1 year ago

Resolved through https://lists.ceph.io/hyperkitty/list/ceph-users@ceph.io/thread/N3ITO7FP5PGI25EKFP3PK2ZTVPRU6X2R/

sudo rados -p rbd get gateway.conf hello

edit hello and remove duplicates.

sudo rados put gateway.conf hello -p rbd