Description of problem: I was trying to delete a host entry in gwcli. Saw this JSON error when I accidentally entered without a iqn. This failure should be handled gracefully. /iscsi-target...eph-igw/hosts> delete client_iqn= CMD: ../hosts/ delete Client DELETE for Traceback (most recent call last): File "/usr/bin/gwcli", line 187, in <module> main() File "/usr/bin/gwcli", line 119, in main shell.run_interactive() File "/usr/lib/python2.7/site-packages/configshell_fb/shell.py", line 905, in run_interactive self._cli_loop() File "/usr/lib/python2.7/site-packages/configshell_fb/shell.py", line 734, in _cli_loop self.run_cmdline(cmdline) File "/usr/lib/python2.7/site-packages/configshell_fb/shell.py", line 848, in run_cmdline self._execute_command(path, command, pparams, kparams) File "/usr/lib/python2.7/site-packages/configshell_fb/shell.py", line 823, in _execute_command result = target.execute_command(command, pparams, kparams) File "/usr/lib/python2.7/site-packages/configshell_fb/node.py", line 1406, in execute_command return method(*pparams, **kparams) File "/usr/lib/python2.7/site-packages/gwcli/client.py", line 130, in ui_command_delete error_message = api.response.json()['message'] File "/usr/lib/python2.7/site-packages/requests/models.py", line 802, in json return json.loads(self.text, **kwargs) File "/usr/lib64/python2.7/json/__init__.py", line 338, in loads return _default_decoder.decode(s) File "/usr/lib64/python2.7/json/decoder.py", line 366, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File "/usr/lib64/python2.7/json/decoder.py", line 384, in raw_decode raise ValueError("No JSON object could be decoded") ValueError: No JSON object could be decoded 2017-09-26 14:28:20,251 INFO [_internal.py:87:_log()] - 127.0.0.1 - - [26/Sep/2017 14:28:20] "GET /api/config HTTP/1.1" 200 - 2017-09-26 14:28:20,292 INFO [_internal.py:87:_log()] - 10.70.39.2 - - [26/Sep/2017 14:28:20] "GET /api/_ping HTTP/1.1" 200 - 2017-09-26 14:28:20,304 INFO [_internal.py:87:_log()] - 10.70.39.2 - - [26/Sep/2017 14:28:20] "GET /api/_ping HTTP/1.1" 200 - 2017-09-26 14:28:30,304 INFO [_internal.py:87:_log()] - 10.70.39.2 - - [26/Sep/2017 14:28:30] "GET /api/_ping HTTP/1.1" 200 - 2017-09-26 14:28:35,614 INFO [_internal.py:87:_log()] - 127.0.0.1 - - [26/Sep/2017 14:28:35] "DELETE /api/client/ HTTP/1.1" 404 - Version-Release number of selected component (if applicable): ceph-iscsi-config-2.3-8.el7cp.noarch ceph-iscsi-cli-2.5-7.el7cp.noarch
Verified in ceph-iscsi-cli-2.5-8.el7cp.noarch
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