Bug 1495110 - [ceph-iscsi-cli]: If cluster info is not available gwcli should fail gracefully
Summary: [ceph-iscsi-cli]: If cluster info is not available gwcli should fail gracefully
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Ceph Storage
Classification: Red Hat Storage
Component: iSCSI
Version: 3.0
Hardware: Unspecified
OS: Linux
unspecified
medium
Target Milestone: rc
: 3.0
Assignee: Jason Dillaman
QA Contact: Tejas
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-09-25 08:36 UTC by Tejas
Modified: 2017-12-05 23:45 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-12-05 23:45:31 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github ceph ceph-iscsi-cli pull 27 0 None closed Corrected health check summary scrap logic for Luminous 2020-04-22 16:09:32 UTC
Red Hat Product Errata RHBA-2017:3387 0 normal SHIPPED_LIVE Red Hat Ceph Storage 3.0 bug fix and enhancement update 2017-12-06 03:03:45 UTC

Description Tejas 2017-09-25 08:36:47 UTC
Description of problem:
    I have a scenario where rbd-target-* services are up and running, but gwcli is not able to read the cluster info.
In such a case, the error message from gwcli should reflect the same, and it should fail gracefully.

~]# gwcli  -d
Adding ceph cluster 'ceph' to the UI
Fetching ceph osd information
Querying ceph for state information
Traceback (most recent call last):
  File "/usr/bin/gwcli", line 187, in <module>
    main()
  File "/usr/bin/gwcli", line 93, in main
    root_node = ISCSIRoot(shell)
  File "/usr/lib/python2.7/site-packages/gwcli/gateway.py", line 55, in __init__
    self.ceph = CephGroup(self)
  File "/usr/lib/python2.7/site-packages/gwcli/ceph.py", line 55, in __init__
    keyring)
  File "/usr/lib/python2.7/site-packages/gwcli/ceph.py", line 141, in __init__
    self.update_state()
  File "/usr/lib/python2.7/site-packages/gwcli/ceph.py", line 211, in update_state
    status['health'].get('summary')
TypeError: 'NoneType' object is not iterable

Version-Release number of selected component (if applicable):
ceph-iscsi-cli-2.5-7.el7cp.noarch
ceph-iscsi-config-2.3-8.el7cp.noarch

Comment 6 Manohar Murthy 2017-10-04 10:39:08 UTC
Error message has been added.

[root@avenger ~]# gwcli -d
Adding ceph cluster 'ceph' to the UI
Fetching ceph osd information
Querying ceph for state information
Unable to access the configuration object : REST API failure, code : 500
Traceback (most recent call last):
  File "/usr/bin/gwcli", line 187, in <module>
    main()
  File "/usr/bin/gwcli", line 99, in main
    root_node.refresh()
  File "/usr/lib/python2.7/site-packages/gwcli/gateway.py", line 86, in refresh
    raise GatewayError
gwcli.utils.GatewayError
[root@avenger ~]#

Versions:
ceph-iscsi-cli-2.5-8.el7cp.noarch
ceph-iscsi-config-2.3-10.el7cp.noarch

Comment 9 errata-xmlrpc 2017-12-05 23:45:31 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2017:3387


Note You need to log in before you can comment on or make changes to this bug.