Bug 1341141 - heketi-cli: proper error message to stdout for cluster/node/device delete
Summary: heketi-cli: proper error message to stdout for cluster/node/device delete
Alias: None
Product: Red Hat Gluster Storage
Classification: Red Hat
Component: heketi
Version: rhgs-3.1
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
: CNS 3.4
Assignee: Jose A. Rivera
QA Contact: Prasanth
Depends On:
Blocks: 1385246
TreeView+ depends on / blocked
Reported: 2016-05-31 11:00 UTC by Neha
Modified: 2017-01-18 21:55 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2017-01-18 21:55:00 UTC
Target Upstream Version:

Attachments (Terms of Use)

System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1341961 0 medium CLOSED heketi server doesn't log errors for node/device delete 2021-02-22 00:41:40 UTC
Red Hat Product Errata RHEA-2017:0148 0 normal SHIPPED_LIVE heketi bug fix and enhancement update 2017-01-19 02:53:24 UTC

Internal Links: 1341961

Description Neha 2016-05-31 11:00:33 UTC
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
Error: Conflict

=>docker exec heketi heketi-cli --server http://localhost:8080 node delete 53bb0c58ceaa2042c5088377de9c872f
Error: Conflict

=> docker exec heketi heketi-cli --server http://localhost:8080 device delete 77fddc8c8ed815ab09965095941cf899
Error: Conflict

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

How reproducible:

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

Actual results:
Error Conflict

Expected results:
Should display proper error message to stdout

Additional info:

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

Comment 2 Neha 2016-05-31 11:07:03 UTC
also for node/device it doesn't log to heketi logs.  

upstream issue:

Comment 5 Humble Chirammal 2016-07-05 10:03:50 UTC
@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.

Comment 6 Luis Pabón 2016-07-13 19:52:56 UTC
Yeah, POST is the right thing, thanks Humble

Comment 7 Neha 2016-07-20 04:42:59 UTC
The above PR was created to fix the "server side error" for node and device [BZ 1341961].

Comment 11 Michael Adam 2016-10-19 16:33:50 UTC
was fixed by jarrpa

Comment 16 Prasanth 2016-11-17 09:41:39 UTC
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

Comment 18 errata-xmlrpc 2017-01-18 21:55:00 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.


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