Bug 1434668 - After a device is removed from heketi, status of the device reflects as 'failed', which is misleading.
Summary: After a device is removed from heketi, status of the device reflects as 'fail...
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: ---
: CNS 3.9
Assignee: Raghavendra Talur
QA Contact: krishnaram Karthick
URL:
Whiteboard:
Depends On:
Blocks: 1526414
TreeView+ depends on / blocked
 
Reported: 2017-03-22 04:31 UTC by krishnaram Karthick
Modified: 2019-04-22 22:40 UTC (History)
12 users (show)

Fixed In Version: heketi-6.0.0-2.el7rhgs
Doc Type: Bug Fix
Doc Text:
Earlier, the 'device info' output displayed the state of the device as 'failed' after a device remove operation was completed. With this fix, the state of the device is changed to 'removed' which matches with the operation performed.
Clone Of:
Environment:
Last Closed: 2018-04-05 03:08:10 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2018:0638 0 None None None 2018-04-05 03:09:27 UTC

Description krishnaram Karthick 2017-03-22 04:31:09 UTC
Description of problem:

When a device is removed from heketi, device info shows the status of the device as 'failed'. This is incorrect and misleading. status of the removed device should be 'removed'.

[root@dhcp46-202 ~]# heketi-cli device remove d49d5a44dc7157d138edaad692b9f1fb
Error: Device must be offline before remove operation is performed, device:d49d5a44dc7157d138edaad692b9f1fb
[root@dhcp46-202 ~]# heketi-cli device disable d49d5a44dc7157d138edaad692b9f1fb
Device d49d5a44dc7157d138edaad692b9f1fb is now offline
[root@dhcp46-202 ~]# heketi-cli device remove d49d5a44dc7157d138edaad692b9f1fb
Device d49d5a44dc7157d138edaad692b9f1fb is now removed
[root@dhcp46-202 ~]# heketi-cli device info d49d5a44dc7157d138edaad692b9f1fb
Device Id: d49d5a44dc7157d138edaad692b9f1fb
Name: /dev/sdg
State: failed
Size (GiB): 99
Used (GiB): 0
Free (GiB): 99
Bricks:


Version-Release number of selected component (if applicable):
# rpm -qa | grep 'heketi'
heketi-client-4.0.0-3.el7rhgs.x86_64


How reproducible:
1/1

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

Comment 6 Michael Adam 2017-03-29 11:56:41 UTC
Note that this is NOT wrong. The internal state is called 'failed'. You may call it misleading, but this is not a bug. This is an RFE.

(Given the short time we have, I would not have given qe ack for this RFE but deferred it...)

Comment 7 Humble Chirammal 2017-04-03 13:43:53 UTC
As per comment #6 I am deferring it from CNS 3.5 release.

Comment 9 Michael Adam 2017-04-04 12:34:39 UTC
Upstream needs more discussion since there is no agreement.
==> We need to defer it.

Comment 12 Raghavendra Talur 2017-07-25 12:39:47 UTC
https://github.com/heketi/heketi/pull/779

Comment 13 Mohamed Ashiq 2017-08-07 06:40:57 UTC
This patch got rejected upstream. As cli is returning "removed" which is expected and API change looks to be breaking backward compatibility.

Comment 14 Humble Chirammal 2017-08-07 06:52:18 UTC
(In reply to Mohamed Ashiq from comment #13)
> This patch got rejected upstream. As cli is returning "removed" which is
> expected and API change looks to be breaking backward compatibility.

Looks like the cli can be changed as per https://github.com/heketi/heketi/pull/779#discussion_r129755834

Comment 15 Mohamed Ashiq 2017-08-07 07:29:58 UTC
(In reply to Humble Chirammal from comment #14)
> (In reply to Mohamed Ashiq from comment #13)
> > This patch got rejected upstream. As cli is returning "removed" which is
> > expected and API change looks to be breaking backward compatibility.
> 
> Looks like the cli can be changed as per
> https://github.com/heketi/heketi/pull/779#discussion_r129755834

You are right :). Done.

https://github.com/heketi/heketi/pull/831

Comment 16 Humble Chirammal 2017-08-07 07:52:54 UTC
(In reply to Mohamed Ashiq from comment #15)
> (In reply to Humble Chirammal from comment #14)
> > (In reply to Mohamed Ashiq from comment #13)
> > > This patch got rejected upstream. As cli is returning "removed" which is
> > > expected and API change looks to be breaking backward compatibility.
> > 
> > Looks like the cli can be changed as per
> > https://github.com/heketi/heketi/pull/779#discussion_r129755834
> 
> You are right :). Done.
> 
> https://github.com/heketi/heketi/pull/831

Awesome! Thanks Ashiq!

Comment 17 Mohamed Ashiq 2017-08-10 12:03:45 UTC
(In reply to Humble Chirammal from comment #16)
> (In reply to Mohamed Ashiq from comment #15)
> > (In reply to Humble Chirammal from comment #14)
> > > (In reply to Mohamed Ashiq from comment #13)
> > > > This patch got rejected upstream. As cli is returning "removed" which is
> > > > expected and API change looks to be breaking backward compatibility.
> > > 
> > > Looks like the cli can be changed as per
> > > https://github.com/heketi/heketi/pull/779#discussion_r129755834
> > 
> > You are right :). Done.
> > 
> > https://github.com/heketi/heketi/pull/831
> 
> Awesome! Thanks Ashiq!
PR merged upstream.

Comment 18 krishnaram Karthick 2017-09-12 08:53:51 UTC
The issue is still seen in build - rhgs3/rhgs-volmanager-rhel7:3.3.0-12

device '1cba3e1807c565ca0752b2b37c0a26ca' is removed for the test below.

Containers:
  heketi:
    Container ID:       docker://826953d83b138d629753baac30f00234f3a8dcb985b07c32d75053d53a9d2931
    Image:              rhgs3/rhgs-volmanager-rhel7:3.3.0-12
    Image ID:           docker-pullable://brew-pulp-docker01.web.prod.ext.phx2.redhat.com:8888/rhgs3/rhgs-volmanager-rhel7@sha256:26ee7bd0800a34213f35d62abf2daaf6c5879a167f88906e1bc9bf6c29b43e57
    Port:               8080/TCP
    State:              Running
      Started:          Mon, 11 Sep 2017 11:57:10 +0530
    Ready:              True
    Restart Count:      0
    Liveness:           http-get http://:8080/hello delay=30s timeout=3s period=10s #success=1 #failure=3
    Readiness:          http-get http://:8080/hello delay=3s timeout=3s period=10s #success=1 #failure=3


[root@dhcp46-207 ~]# heketi-cli node info 5372fca2ed712c04d0b1fb5b0917ace2
Node Id: 5372fca2ed712c04d0b1fb5b0917ace2
State: online
Cluster Id: 82875934810d7e5079e0ba9dadf4410a
Zone: 1
Management Hostname: dhcp46-197.lab.eng.blr.redhat.com
Storage Hostname: 10.70.46.197
Devices:
Id:1cba3e1807c565ca0752b2b37c0a26ca   Name:/dev/sdk            State:online    Size (GiB):149     Used (GiB):149     Free (GiB):0
Id:1e1d10f38371a6fa3ad9aca07b7f3fe2   Name:/dev/sdd            State:offline   Size (GiB):599     Used (GiB):502     Free (GiB):97
Id:4684fff8fddd46ba9828f8e76c47889a   Name:/dev/sde            State:offline   Size (GiB):149     Used (GiB):120     Free (GiB):28
Id:71cbeaeddb83f7c595933ef4c7feaabb   Name:/dev/sdg            State:offline   Size (GiB):149     Used (GiB):0       Free (GiB):149
Id:834baf988e1758537d62a72b094a53c5   Name:/dev/sdh            State:offline   Size (GiB):149     Used (GiB):0       Free (GiB):149
Id:a1a79f73bf2a14f15864bdd2e75a48bd   Name:/dev/sdi            State:offline   Size (GiB):149     Used (GiB):0       Free (GiB):149
Id:c91ca7c2f1b2c888416d467956901869   Name:/dev/sdf            State:offline   Size (GiB):149     Used (GiB):0       Free (GiB):149
Id:d7735df3e2abad30a55f34b7f0913fe1   Name:/dev/sdj            State:offline   Size (GiB):149     Used (GiB):0       Free (GiB):149


[root@dhcp46-207 ~]# heketi-cli node info c011a930dee7c6c1679888dfa7ef098d
Node Id: c011a930dee7c6c1679888dfa7ef098d
State: online
Cluster Id: 82875934810d7e5079e0ba9dadf4410a
Zone: 1
Management Hostname: dhcp46-193.lab.eng.blr.redhat.com
Storage Hostname: 10.70.46.193
Devices:
Id:14c217454cd0fa0b472f01c88993fed3   Name:/dev/sdd            State:offline   Size (GiB):599     Used (GiB):502     Free (GiB):97
Id:294a7e81bf5f9011a57d256b22b9d583   Name:/dev/sdi            State:offline   Size (GiB):149     Used (GiB):120     Free (GiB):28
Id:3ff9a56fa9d82d39709a467b94fe47cf   Name:/dev/sde            State:online    Size (GiB):149     Used (GiB):26      Free (GiB):123
Id:67a76ff910a078de517ddbca4b043f4d   Name:/dev/sdg            State:offline   Size (GiB):149     Used (GiB):0       Free (GiB):149
Id:a81e3ac1170be15bb634e6fc1705e9c0   Name:/dev/sdf            State:offline   Size (GiB):149     Used (GiB):0       Free (GiB):149
Id:bb5a2589ba5bad89cd65ec53e855424c   Name:/dev/sdh            State:offline   Size (GiB):149     Used (GiB):0       Free (GiB):149
Id:f76532a9976082c3d000fae18027bf6b   Name:/dev/sdk            State:offline   Size (GiB):149     Used (GiB):122     Free (GiB):26
[root@dhcp46-207 ~]# heketi-cli device disable 1cba3e1807c565ca0752b2b37c0a26ca
Device 1cba3e1807c565ca0752b2b37c0a26ca is now offline
[root@dhcp46-207 ~]#
[root@dhcp46-207 ~]#
[root@dhcp46-207 ~]# 
[root@dhcp46-207 ~]# 
[root@dhcp46-207 ~]# 
[root@dhcp46-207 ~]# heketi-cli device remove 1cba3e1807c565ca0752b2b37c0a26ca
Error: Failed to remove device, error: No Replacement was found for resource requested to be removed
[root@dhcp46-207 ~]# heketi-cli device enable 71cbeaeddb83f7c595933ef4c7feaabb
Device 71cbeaeddb83f7c595933ef4c7feaabb is now online
[root@dhcp46-207 ~]# heketi-cli device enable 834baf988e1758537d62a72b094a53c5
Device 834baf988e1758537d62a72b094a53c5 is now online
[root@dhcp46-207 ~]# heketi-cli device remove 1cba3e1807c565ca0752b2b37c0a26ca
Device 1cba3e1807c565ca0752b2b37c0a26ca is now removed
[root@dhcp46-207 ~]# 
[root@dhcp46-207 ~]# 
[root@dhcp46-207 ~]# heketi-cli node info 5372fca2ed712c04d0b1fb5b0917ace2
Node Id: 5372fca2ed712c04d0b1fb5b0917ace2
State: online
Cluster Id: 82875934810d7e5079e0ba9dadf4410a
Zone: 1
Management Hostname: dhcp46-197.lab.eng.blr.redhat.com
Storage Hostname: 10.70.46.197
Devices:
Id:1cba3e1807c565ca0752b2b37c0a26ca   Name:/dev/sdk            State:failed    Size (GiB):149     Used (GiB):0       Free (GiB):149     
Id:1e1d10f38371a6fa3ad9aca07b7f3fe2   Name:/dev/sdd            State:offline   Size (GiB):599     Used (GiB):502     Free (GiB):97      
Id:4684fff8fddd46ba9828f8e76c47889a   Name:/dev/sde            State:offline   Size (GiB):149     Used (GiB):120     Free (GiB):28      
Id:71cbeaeddb83f7c595933ef4c7feaabb   Name:/dev/sdg            State:online    Size (GiB):149     Used (GiB):36      Free (GiB):113     
Id:834baf988e1758537d62a72b094a53c5   Name:/dev/sdh            State:online    Size (GiB):149     Used (GiB):112     Free (GiB):37      
Id:a1a79f73bf2a14f15864bdd2e75a48bd   Name:/dev/sdi            State:offline   Size (GiB):149     Used (GiB):0       Free (GiB):149     
Id:c91ca7c2f1b2c888416d467956901869   Name:/dev/sdf            State:offline   Size (GiB):149     Used (GiB):0       Free (GiB):149     
Id:d7735df3e2abad30a55f34b7f0913fe1   Name:/dev/sdj            State:offline   Size (GiB):149     Used (GiB):0       Free (GiB):149     

Moving the bug to assigned.

Comment 19 Humble Chirammal 2017-09-12 09:26:40 UTC
"Failed QA"

Comment 20 Humble Chirammal 2017-09-14 17:14:41 UTC
As discussed in program call, we are planning to defer this from this release considering the change we have to make here need more testing and the outcome is very cosmetic. Mail sent to Program team and will be deferring it soon.

Comment 34 errata-xmlrpc 2018-04-05 03:08:10 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-2018:0638


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