Bug 1236052

Summary: Data Tiering:Throw a warning when user issues a detach-tier commit command
Product: [Red Hat Storage] Red Hat Gluster Storage Reporter: Nag Pavan Chilakam <nchilaka>
Component: tierAssignee: Manikandan <mselvaga>
Status: CLOSED ERRATA QA Contact: Nag Pavan Chilakam <nchilaka>
Severity: urgent Docs Contact:
Priority: urgent    
Version: rhgs-3.1CC: byarlaga, dlambrig, rhs-bugs, sankarshan, smohan, storage-qa-internal
Target Milestone: ---Keywords: ZStream
Target Release: RHGS 3.1.2   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: glusterfs-3.7.5-5 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1268755 (view as bug list) Environment:
Last Closed: 2016-03-01 05:26:32 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: 1260783, 1260923, 1268755, 1269035    
Attachments:
Description Flags
server#1 logs sosreports
none
server#2 logs sosreports
none
QE verification logs none

Description Nag Pavan Chilakam 2015-06-26 12:38:23 UTC
Created attachment 1043496 [details]
server#1 logs sosreports

Description of problem:
======================
When a user issues  a detach-tier commit command(not force), it is highly required to throw a warning message, as this can be a disruptive operation
due to bug#1236038

Currently there can be situations where detach-tier start has failed. In those cases detach-tier commit is not supposed to be allowed.
But as this can be a dht rebalance problem, it is best from tiering side to throw a proper warning

Version-Release number of selected component (if applicable):
=============================================================
glusterfs-api-3.7.1-5.el7rhgs.x86_64
glusterfs-libs-3.7.1-5.el7rhgs.x86_64
glusterfs-rdma-3.7.1-5.el7rhgs.x86_64
glusterfs-3.7.1-5.el7rhgs.x86_64
glusterfs-cli-3.7.1-5.el7rhgs.x86_64
glusterfs-debuginfo-3.7.1-5.el7rhgs.x86_64
glusterfs-client-xlators-3.7.1-5.el7rhgs.x86_64
glusterfs-server-3.7.1-5.el7rhgs.x86_64
glusterfs-geo-replication-3.7.1-5.el7rhgs.x86_64
glusterfs-fuse-3.7.1-5.el7rhgs.x86_64
[root@tettnang glusterfs]# gluster --version
glusterfs 3.7.1 built on Jun 23 2015 22:08:15
Repository revision: git://git.gluster.com/glusterfs.git
Copyright (c) 2006-2011 Gluster Inc. <http://www.gluster.com>
GlusterFS comes with ABSOLUTELY NO WARRANTY.
You may redistribute copies of GlusterFS under the terms of the GNU General Public License.



How reproducible:
=================
easy


Steps to Reproduce:
===================
1.create a tier volume, start it
2.now issue a detach-tier start of the volume
3.now issue a detach-tier commit of the volume


Current/Actual behavior:
===================
It doesnt throw a warning saying the effects of commit.
Though it throws a suggestion about moving data from bricks after the commit is done, which makes not much sense as the damage could be already done.
[root@tettnang ~]# gluster v detach-tier bug_1224084 commit
volume detach-tier commit: success
Check the detached bricks to ensure all files are migrated.
If files with data are found on the brick path, copy them via a gluster mount point before re-purposing the removed brick. 



Expected results:
===================
Throw a warning as below:
detach-tier commit will cause the bricks in the hot tier to be detached. Please make sure the detach-tier start command has passed successfully(issue a vol status command). 
Also are you sure you want to continue with commit? (Y/N)

Additional info:

Comment 2 Nag Pavan Chilakam 2015-06-26 12:45:09 UTC
Created attachment 1043500 [details]
server#2 logs sosreports

Comment 5 Manikandan 2015-10-16 06:35:11 UTC
Patch upstream master: http://review.gluster.org/12297
Release-3.7: http://review.gluster.org/12305

Comment 6 Nag Pavan Chilakam 2015-10-30 11:30:17 UTC
QE Test plan:
1)have tested with straight away commit before even issuing detach start-->-->got the warning message
2)commit after start is sucessful-->got the warning message and passed
3)commit after start has failed-->got the warning message and passed



Logs:attached


build:glusterfs-server-3.7.5-5.el7rhgs.x86_64

Comment 7 Nag Pavan Chilakam 2015-10-30 11:30:55 UTC
Created attachment 1087916 [details]
QE verification logs

Comment 9 errata-xmlrpc 2016-03-01 05:26:32 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://rhn.redhat.com/errata/RHBA-2016-0193.html