Bug 1434685 - heketi delete device should not delete the device when the device is online
Summary: heketi delete device should not delete the device when the device is online
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Gluster Storage
Classification: Red Hat Storage
Component: heketi
Version: cns-3.5
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
: OCS 3.11.1
Assignee: John Mulligan
QA Contact: bipin
URL:
Whiteboard:
Depends On:
Blocks: OCS-3.11.1-devel-triage-done 1644154
TreeView+ depends on / blocked
 
Reported: 2017-03-22 07:13 UTC by krishnaram Karthick
Modified: 2019-02-12 06:03 UTC (History)
12 users (show)

Fixed In Version: heketi-8.0.0-1.el7rhgs
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-02-07 03:41:00 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2019:0286 0 None None None 2019-02-07 03:41:26 UTC

Description krishnaram Karthick 2017-03-22 07:13:00 UTC
Description of problem:
'heketi delete device' deletes any device which doesn't have any bricks including the devices which are online.

'heketi delete device' should work only on either of 2 conditions.
1) device is offline
2) device is removed already - (Any device removed will already be in offline state)

heketi-cli device info 78a602555f5a232fb1e917be434e7813
Device Id: 78a602555f5a232fb1e917be434e7813
Name: /dev/sdd
State: online
Size (GiB): 99
Used (GiB): 0
Free (GiB): 99
Bricks:
[root@dhcp46-202 ~]# heketi-cli device delete 78a602555f5a232fb1e917be434e7813
Device 78a602555f5a232fb1e917be434e7813 deleted

This is to stay consistent with the remove device behavior. remove device works only when the device is offline. Similarly, delete device should work only when the device is in offline or removed state.

Version-Release number of selected component (if applicable):
heketi-client-4.0.0-3.el7rhgs.x86_64

How reproducible:
Always

No logs shall be attached, this issue is fairly straight forward to reproduce.

Comment 2 Raghavendra Talur 2017-03-22 07:17:20 UTC
delete device proceeds this way only when device is empty. When the device has bricks, it wouldn't allow the device to be deleted and the admin will have to follow procedure of disable,remove and then delete.

Comment 9 Humble Chirammal 2017-08-03 04:40:26 UTC
No objection to move this out of CNS 3.6 release. I am changing the flags accordingly.

Comment 20 errata-xmlrpc 2019-02-07 03:41: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.

https://access.redhat.com/errata/RHEA-2019:0286


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