Project

General

Profile

Bug #48357

KeyError: 'targets' when adding second gateway on ceph-iscsi - BUG

Added by Hamidreza Hosseini over 3 years ago. Updated over 3 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Target version:
% Done:

0%

Source:
Community (user)
Tags:
#ceph-iscsi , #
Backport:
Regression:
No
Severity:
2 - major
Reviewed:
Affected Versions:
ceph-qa-suite:
ceph-ansible, rbd
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

Hi,
I have installed ceph-iscsi on ubuntu 20 manully,
But when I want to add second gateway it will show me error:

```

OS: Ubuntu 20 LTS
ceph version : octopus
I install cluster with ceph-ansible but I install ceph-iscsi manually via following link:
https://docs.ceph.com/en/latest/rbd/iscsi-target-cli/
(instead of 'yum install ceph-iscsi' I commit 'apt install ceph-iscsi')
Python 3.8.5

root@dev13:~# gwcli -v
gwcli - 2.7

```

```

/iscsi-target...-igw/gateways> create ceph-gateway1 192.168.200.33
Adding gateway, sync'ing 0 disk(s) and 0 client(s)
KeyError: 'targets'

```
and it will jump out of gwcli!
this is my gwcli log:

```
root@dev13:~# cat gwcli.log
2020-11-25 14:24:56,440 DEBUG [ceph.py:32:__init__()] Adding ceph cluster 'ceph' to the UI
2020-11-25 14:24:57,049 DEBUG [ceph.py:241:populate()] Fetching ceph osd information
2020-11-25 14:24:57,086 DEBUG [ceph.py:150:update_state()] Querying ceph for state information
2020-11-25 14:24:57,197 DEBUG [storage.py:105:refresh()] Refreshing disk information from the config object
2020-11-25 14:24:57,197 DEBUG [storage.py:108:refresh()] - Scanning will use 8 scan threads
2020-11-25 14:24:57,254 DEBUG [storage.py:135:refresh()] - rbd image scan complete: 0s
2020-11-25 14:24:57,254 DEBUG [gateway.py:378:refresh()] Refreshing gateway & client information
2020-11-25 14:24:57,254 DEBUG [ceph.py:150:update_state()] Querying ceph for state information
2020-11-25 14:24:57,294 DEBUG [ceph.py:260:refresh()] Gathering pool stats for cluster 'ceph'
2020-11-25 14:25:02,319 DEBUG [ceph.py:32:__init__()] Adding ceph cluster 'ceph' to the UI
2020-11-25 14:25:03,076 DEBUG [ceph.py:241:populate()] Fetching ceph osd information
2020-11-25 14:25:03,168 DEBUG [ceph.py:150:update_state()] Querying ceph for state information
2020-11-25 14:25:03,219 DEBUG [storage.py:105:refresh()] Refreshing disk information from the config object
2020-11-25 14:25:03,219 DEBUG [storage.py:108:refresh()] - Scanning will use 8 scan threads
2020-11-25 14:25:03,273 DEBUG [storage.py:135:refresh()] - rbd image scan complete: 0s
2020-11-25 14:25:03,274 DEBUG [gateway.py:378:refresh()] Refreshing gateway & client information
2020-11-25 14:25:03,274 DEBUG [ceph.py:150:update_state()] Querying ceph for state information
2020-11-25 14:25:03,314 DEBUG [ceph.py:260:refresh()] Gathering pool stats for cluster 'ceph'
2020-11-25 14:25:32,950 DEBUG [ceph.py:32:__init__()] Adding ceph cluster 'ceph' to the UI
2020-11-25 14:25:33,614 DEBUG [ceph.py:241:populate()] Fetching ceph osd information
2020-11-25 14:25:33,652 DEBUG [ceph.py:150:update_state()] Querying ceph for state information
2020-11-25 14:25:33,714 DEBUG [storage.py:105:refresh()] Refreshing disk information from the config object
2020-11-25 14:25:33,714 DEBUG [storage.py:108:refresh()] - Scanning will use 8 scan threads
2020-11-25 14:25:33,811 DEBUG [storage.py:135:refresh()] - rbd image scan complete: 0s
2020-11-25 14:25:33,811 DEBUG [gateway.py:378:refresh()] Refreshing gateway & client information
2020-11-25 14:25:33,811 DEBUG [ceph.py:150:update_state()] Querying ceph for state information
2020-11-25 14:25:33,864 DEBUG [ceph.py:260:refresh()] Gathering pool stats for cluster 'ceph'
2020-11-25 14:26:02,665 DEBUG [gateway.py:174:ui_command_create()] CMD: /iscsi create iqn.2003-01.com.redhat.iscsi-gw:iscsi-igw
2020-11-25 14:26:02,666 DEBUG [gateway.py:185:ui_command_create()] Create an iscsi target definition in the UI
2020-11-25 14:26:03,191 INFO [gateway.py:196:ui_command_create()] ok
2020-11-25 14:26:45,455 DEBUG [gateway.py:793:ui_command_create()] CMD: ../gateways/ create dev13 ['192.168.200.23'] nosync=False skipchecks=false
2020-11-25 14:26:45,467 INFO [gateway.py:836:ui_command_create()] Adding gateway, sync'ing 0 disk(s) and 0 client(s)
2020-11-25 14:26:45,949 DEBUG [gateway.py:854:ui_command_create()] Gateway creation successful
2020-11-25 14:26:45,949 DEBUG [gateway.py:855:ui_command_create()] Adding gw to UI
2020-11-25 14:26:45,968 DEBUG [gateway.py:934:refresh()] - checking iSCSI/API ports on dev13
2020-11-25 14:26:45,979 INFO [gateway.py:874:ui_command_create()] ok
2020-11-25 14:28:41,572 DEBUG [ceph.py:32:__init__()] Adding ceph cluster 'ceph' to the UI
2020-11-25 14:28:42,269 DEBUG [ceph.py:241:populate()] Fetching ceph osd information
2020-11-25 14:28:42,297 DEBUG [ceph.py:150:update_state()] Querying ceph for state information
2020-11-25 14:28:42,334 DEBUG [storage.py:105:refresh()] Refreshing disk information from the config object
2020-11-25 14:28:42,334 DEBUG [storage.py:108:refresh()] - Scanning will use 8 scan threads
2020-11-25 14:28:42,378 DEBUG [storage.py:135:refresh()] - rbd image scan complete: 0s
2020-11-25 14:28:42,378 DEBUG [gateway.py:378:refresh()] Refreshing gateway & client information
2020-11-25 14:28:42,449 DEBUG [gateway.py:934:refresh()] - checking iSCSI/API ports on dev13
2020-11-25 14:28:42,463 DEBUG [ceph.py:150:update_state()] Querying ceph for state information
2020-11-25 14:28:42,517 DEBUG [ceph.py:260:refresh()] Gathering pool stats for cluster 'ceph'
2020-11-25 14:28:52,659 DEBUG [gateway.py:793:ui_command_create()] CMD: ../gateways/ create ceph-gateway1 ['192.168.200.33'] nosync=False skipchecks=false
2020-11-25 14:28:52,672 INFO [gateway.py:836:ui_command_create()] Adding gateway, sync'ing 0 disk(s) and 0 client(s)
2020-11-25 14:28:53,406 DEBUG [gateway.py:854:ui_command_create()] Gateway creation successful
2020-11-25 14:28:53,407 DEBUG [gateway.py:855:ui_command_create()] Adding gw to UI

```

```

root@dev13:~# sudo gwcli export copy {
"created": "2020/11/25 10:54:39",
"discovery_auth": {
"mutual_password": "",
"mutual_password_encryption_enabled": false,
"mutual_username": "",
"password": "",
"password_encryption_enabled": false,
"username": ""
},
"disks": {},
"epoch": 2,
"gateways": {
"dev13": {
"active_luns": 0,
"created": "2020/11/25 10:56:45",
"updated": "2020/11/25 10:56:45"
}
},
"targets": {
"iqn.2003-01.com.redhat.iscsi-gw:iscsi-igw": {
"acl_enabled": true,
"auth": {
"mutual_password": "",
"mutual_password_encryption_enabled": false,
"mutual_username": "",
"password": "",
"password_encryption_enabled": false,
"username": ""
},
"clients": {},
"controls": {},
"created": "2020/11/25 10:56:02",
"disks": {},
"groups": {},
"ip_list": [
"192.168.200.23"
],
"portals": {
"dev13": {
"gateway_ip_list": [
"192.168.200.23"
],
"inactive_portal_ips": [],
"portal_ip_addresses": [
"192.168.200.23"
],
"tpgs": 1
}
},
"updated": "2020/11/25 10:56:45"
}
},
"updated": "2020/11/25 10:56:45",
"version": 11
}

```
I even changed python3 to python2 but I have the same issue but in the proccess of defining iqn.
What should I do for this problem?

History

#1 Updated by Hamidreza Hosseini over 3 years ago

111

#2 Updated by Jason Dillaman over 3 years ago

  • Status changed from New to Resolved

Also available in: Atom PDF