Bug 1523765

Summary: [RFE] When loading topology file: Display additional information about error and add "dry run" option
Product: [Red Hat Storage] Red Hat Gluster Storage Reporter: Thom Carlin <tcarlin>
Component: heketiAssignee: Michael Adam <madam>
Status: CLOSED WONTFIX QA Contact: Rahul Hinduja <rhinduja>
Severity: high Docs Contact:
Priority: unspecified    
Version: cns-3.6CC: annair, bkunal, hchiramm, jmulligan, rhs-bugs, rtalur, storage-qa-internal
Target Milestone: ---Keywords: FutureFeature
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-01-23 20:23:07 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1724792, 1641915    

Description Thom Carlin 2017-12-08 16:21:36 UTC
Description of enhancement:

Enhance "heketi-cli topology load" to:
1) display additional information about cause of errors parsing configuration file
2) Add option to allow a "dry run" of the "topology load"

Version-Release number of selected component (if applicable):

cns 3.6

Additional info:

Currently, https://github.com/heketi/heketi/blob/master/client/cli/go/cmds/topology.go line 116 merely displays "Unable to parse config file"

If the "err" variable is also displayed, the end-user would have more information to diagnose the cause.

In my case, jsonlint validated the file.  However, the underlying message was:
json: cannot unmarshal object into Go struct field ConfigFileNode.devices of type string

Having the message along with the dry run option would allow rapid isolation of the cause of the error.

Comment 5 Raghavendra Talur 2019-01-23 20:23:07 UTC
We don't want to support use of topology files beyond the initial configuration. Won't work on this.