Bug #62666
openDashboard does not remove deleted iscsi service
0%
Description
In Reef 18.2.0 I deployed iscsi-gateways (although they're not maintained anymore). After removing the service successfully via dashboard, the service is still listed as "down" in the Dashboard > Block > ISCSI > Overview. Obviously, it appears in the cli as well:
$ ceph dashboard iscsi-gateway-list {"gateways": {"iscsi-gateway.domain": {"service_url": "http://<user>:<pw>@<IP>:5000"}}}
Removing the gw works well:
$ ceph dashboard iscsi-gateway-rm iscsi-gateway.domain Success $ ceph dashboard iscsi-gateway-list {"gateways": {}}
I believe this cleanup should work even if iSCSI is not really supported anymore. But since one still can deploy that service the removal should be consistent as well.
Updated by Eugen Block 8 months ago
I tried the same procedure with both Pacific 16.2.13 and Quincy 17.2.6. For Pacific it seems to work as expected, for Quincy it doesn't. These are the logs from Quincy after removing the iscsi service (also via dashboard):
2023-09-01T08:08:15.815+0000 7fbcddb13700 0 log_channel(cephadm) log [INF] : Purge service iscsi.ebl2 2023-09-01T08:08:15.979+0000 7fbcddb13700 0 [cephadm INFO cephadm.services.iscsi] <gateway.conf> removed from iscsi 2023-09-01T08:08:15.979+0000 7fbcddb13700 0 log_channel(cephadm) log [INF] : <gateway.conf> removed from iscsi 2023-09-01T08:08:19.231+0000 7fbd14b93700 0 log_channel(audit) log [DBG] : from='mon.0 -' entity='mon.' cmd=[{"prefix": "dashboard iscsi-gateway-rm", "name": "soc9-ceph"}]: dispatch 2023-09-01T08:08:19.231+0000 7fbd0c392700 -1 mgr.server reply reply (2) No such file or directory iSCSI gateway 'soc9-ceph' does not exist
The message on Reef is basically the same, while on Pacific the removal works:
Sep 01 09:42:59 pacific conmon[3346]: 2023-09-01T07:42:59.875+0000 7f2062a62700 0 [cephadm INFO cephadm.serve] Purge service iscsi.ebl2 Sep 01 09:42:59 pacific conmon[3346]: debug 2023-09-01T07:42:59.875+0000 7f2062a62700 0 log_channel(cephadm) log [INF] : Purge service iscsi.ebl2 Sep 01 09:43:00 pacific conmon[3346]: debug 2023-09-01T07:43:00.279+0000 7f2062a62700 0 [cephadm INFO cephadm.services.iscsi] <gateway.conf> removed from iscsi Sep 01 09:43:00 pacific conmon[3346]: debug 2023-09-01T07:43:00.279+0000 7f2062a62700 0 log_channel(cephadm) log [INF] : <gateway.conf> removed from iscsi Sep 01 09:43:04 pacific conmon[3346]: 2023-09-01T07:43:04.939+0000 7f2091f75700 0 log_channel(audit) log [DBG] : from='mon.0 -' entity='mon.' cmd=[{"prefix": "dashboard iscsi-gateway-rm", "name": "pacific"}]: dispatch Sep 01 09:43:04 pacific conmon[3346]: 2023-09-01T07:43:04.943+0000 7f2089774700 0 [dashboard ERROR rest_client] iscsi REST API failed GET, connection error (url=http://192.168.124.35:5000/api/sysinfo/hostname): [errno: 111] Connection refused Sep 01 09:43:04 pacific conmon[3346]: 2023-09-01T07:43:04.959+0000 7f2062a62700 0 [cephadm INFO cephadm.services.iscsi] pacific removed from iscsi gateways dashboard config Sep 01 09:43:04 pacific conmon[3346]: 2023-09-01T07:43:04.959+0000 7f2062a62700 0 log_channel(cephadm) log [INF] : pacific removed from iscsi gateways dashboard config
Updated by Eugen Block 8 months ago
Apparently, Pacific uses the shortname for the gateway-add command while Quincy uses FQDN:
pacific:~ # ceph dashboard iscsi-gateway-list {"gateways": {"pacific": {"service_url": "http://test:test@192.168.124.35:5000"}}}
quincy:~ # ceph dashboard iscsi-gateway-list {"gateways": {"soc9-ceph.example.com": {"service_url": "http://user:user@192.168.124.186:5000"}}}
Updated by Eugen Block 8 months ago
Eugen Block wrote:
Apparently, Pacific uses the shortname for the gateway-add command while Quincy uses FQDN:
pacific:~ # ceph dashboard iscsi-gateway-list {"gateways": {"pacific": {"service_url": "http://test:test@192.168.124.35:5000"}}}
quincy:~ # ceph dashboard iscsi-gateway-list {"gateways": {"soc9-ceph.example.com": {"service_url": "http://user:user@192.168.124.186:5000"}}}
I update too soon, sorry for the spam. What I wanted to add is, while gateway-add command uses FQDN from Quincy onwards the gateway-rm command uses the shortname only. That's why it's failing to remove it from the dashboard.