Previously, providing an unknown operation identifier to the `heketi-cli server operations info` command or triggering other errors on the server produced an improper error response with "invalid character" from Heketi-cli. With this fix, the Heketi-cli tool reports the correct error message.
Description of problem:
heketi is giving inappropriate Error when id is not present in "heketi-cli server operations info 0b4f1426f0f4372c10ef67eaab265f36". It was giving information when id was present there. (See the output in Additional info)
Version-Release number of selected component (if applicable):
heketi-8.0.0-8.el7rhgs.x86_64
How reproducible:
Steps to Reproduce:
1. create block volume
2. check the operations list
3. check the info of operations
Actual results:
Error: invalid character 'I' looking for beginning of value
Expected results:
It should give error like "id not found" or similar to it
Additional info:
# heketi-cli server operations info 0b4f1426f0f4372c10ef67eaab265f36
Id: 0b4f1426f0f4372c10ef67eaab265f36
Type: create-block-volume
Status: New
Changes:
Add block volume: 8e6e92432a124a96befb357d41b39ce8
# heketi-cli server operations info 0b4f1426f0f4372c10ef67eaab265f36
Error: invalid character 'I' looking for beginning of value
I would not capitalize 'heketi-cli' since that the command name rather than a reference to the Heketi project or Heketi system. Users who want to copy and paste the capitalized version would need to fix the command as well.
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-2019:0663
Description of problem: heketi is giving inappropriate Error when id is not present in "heketi-cli server operations info 0b4f1426f0f4372c10ef67eaab265f36". It was giving information when id was present there. (See the output in Additional info) Version-Release number of selected component (if applicable): heketi-8.0.0-8.el7rhgs.x86_64 How reproducible: Steps to Reproduce: 1. create block volume 2. check the operations list 3. check the info of operations Actual results: Error: invalid character 'I' looking for beginning of value Expected results: It should give error like "id not found" or similar to it Additional info: # heketi-cli server operations info 0b4f1426f0f4372c10ef67eaab265f36 Id: 0b4f1426f0f4372c10ef67eaab265f36 Type: create-block-volume Status: New Changes: Add block volume: 8e6e92432a124a96befb357d41b39ce8 # heketi-cli server operations info 0b4f1426f0f4372c10ef67eaab265f36 Error: invalid character 'I' looking for beginning of value