ceph / ceph-iscsi

Ceph iSCSI tools
GNU General Public License v3.0
62 stars 59 forks source link

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

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 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