Description of problem:
heketi-cli doesn't print proper error message to stdout.
=> docker exec heketi heketi-cli --server http://localhost:8080 cluster delete 46d613cf778d1a11ab2f36a2dd3dc803
=>docker exec heketi heketi-cli --server http://localhost:8080 node delete 53bb0c58ceaa2042c5088377de9c872f
=> docker exec heketi heketi-cli --server http://localhost:8080 device delete 77fddc8c8ed815ab09965095941cf899
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. Try to delete a cluster which contains node/devices
2. Try to delete a node which contains devices
3. Try to delete a device which contains volumes/bricks
Should display proper error message to stdout
For example heketi logs:
[negroni] Started DELETE /clusters/46d613cf778d1a11ab2f36a2dd3dc803
[heketi] WARNING 2016/05/27 12:01:01 Unable to delete cluster [46d613cf778d1a11ab2f36a2dd3dc803] because it contains volumes and/or nodes
[negroni] Completed 409 Conflict in 466.033µs
also for node/device it doesn't log to heketi logs.
@naha, @Luis, I see the patch with this upstream PR https://github.com/heketi/heketi/pull/356. Moving this bug to POST. Please revert if I am wrong.
Yeah, POST is the right thing, thanks Humble
The above PR was created to fix the "server side error" for node and device [BZ 1341961].
was fixed by jarrpa
Verified as fixed in the latest heketi build (heketi-cli 3.0.0)
# heketi-cli cluster delete 67bc66e74759bb4a067c5c2a3c866f0d
Error: Unable to delete cluster [67bc66e74759bb4a067c5c2a3c866f0d] because it contains volumes and/or nodes
# heketi-cli node delete 27f8060541a2361a5cd83e46f08b07a1
Error: Unable to delete node [27f8060541a2361a5cd83e46f08b07a1] because it contains devices
# heketi-cli device delete ba452b20b76491fe06a9d4b688a92246
Error: Unable to delete device [ba452b20b76491fe06a9d4b688a92246] because it contains bricks
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.