Bug 1258242

Summary: Data Tiering: detach-tier start force command not available on a tier volume(unlike which is possible in force remove-brick)
Product: [Community] GlusterFS Reporter: Nag Pavan Chilakam <nchilaka>
Component: tieringAssignee: Mohammed Rafi KC <rkavunga>
Status: CLOSED CURRENTRELEASE QA Contact: bugs <bugs>
Severity: low Docs Contact:
Priority: low    
Version: 3.7.5CC: bugs, rkavunga, vagarwal
Target Milestone: ---Keywords: Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: glusterfs-3.7.6 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1261862 1271724 (view as bug list) Environment:
Last Closed: 2015-11-17 05:57:59 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: 1260923, 1261862, 1271724, 1275914    

Description Nag Pavan Chilakam 2015-08-30 13:44:41 UTC
Description of problem:
======================
There is no detach-tier start force command available, eventhough it shows in the help.
For eg, offline a tier volume and then issue a detach-tier. It fails saying below:
root@nag-manual-node1 ~]# gluster v detach-tier testme start
volume detach-tier start: failed: Volume testme needs to be started before remove-brick (you can use 'force' or 'commit' to override this behavior)


but,When we try to do a force detach-tier start on an offline volume, it doesnt succeed.It still throws same error:
[root@nag-manual-node1 ~]# gluster v detach-tier testme start force
volume detach-tier start: failed: Volume testme needs to be started before remove-brick (you can use 'force' or 'commit' to override this behavior)

Given that this part of code is taken from remove-brick.
On a regular volume when we do a force remove-brick start, it does start the remove-brick process

hence there is difference in behavior here.



Remove-brick on an offline regular vol:
==============================
Volume Name: test2
Type: Distribute
Volume ID: 7357f734-6ba3-4f9a-b707-8b1defc82459
Status: Created
Number of Bricks: 2
Transport-type: tcp
Bricks:
Brick1: 10.70.47.29:/rhs/brick1/test2
Brick2: 10.70.47.29:/rhs/brick2/test2
Options Reconfigured:
performance.readdir-ahead: on
[root@localhost ~]# gluster  v stop hello
Stopping volume will make its data inaccessible. Do you want to continue? (y/n) n
[root@localhost ~]# gluster v stop test2
Stopping volume will make its data inaccessible. Do you want to continue? (y/n) y
volume stop: test2: failed: Volume test2 is not in the started state

[root@localhost ~]# gluster v remove-brick test2 10.70.47.29:/rhs/brick1/test2 start
volume remove-brick start: failed: Volume test2 needs to be started before remove-brick (you can use 'force' or 'commit' to override this behavior)
[root@localhost ~]# gluster v remove-brick test2 10.70.47.29:/rhs/brick1/test2 start force
wrong brick type: start, use <HOSTNAME>:<export-dir-abs-path>
Usage: volume remove-brick <VOLNAME> [replica <COUNT>] <BRICK> ... <start|stop|status|commit|force>
[root@localhost ~]# gluster v remove-brick test2 10.70.47.29:/rhs/brick1/test2 force
Removing brick(s) can result in data loss. Do you want to Continue? (y/n) y
volume remove-brick commit force: success


Detach-tier on an offline volume
==============================
[root@nag-manual-node1 ~]# gluster v detach-tier testme start
volume detach-tier start: failed: Volume testme needs to be started before remove-brick (you can use 'force' or 'commit' to override this behavior)
[root@nag-manual-node1 ~]# gluster v detach-tier testme start force
volume detach-tier start: failed: Volume testme needs to be started before remove-brick (you can use 'force' or 'commit' to override this behavior)
[root@nag-manual-node1 ~]# 
[root@nag-manual-node1 ~]# 



Version-Release number of selected component (if applicable):
==========================================================
[root@nag-manual-node1 ~]# gluster --version
glusterfs 3.7.3 built on Aug 27 2015 01:23:05
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.
[root@nag-manual-node1 ~]# rpm -qa|grep gluster
glusterfs-libs-3.7.3-0.82.git6c4096f.el6.x86_64
glusterfs-fuse-3.7.3-0.82.git6c4096f.el6.x86_64
glusterfs-server-3.7.3-0.82.git6c4096f.el6.x86_64
glusterfs-3.7.3-0.82.git6c4096f.el6.x86_64
glusterfs-api-3.7.3-0.82.git6c4096f.el6.x86_64
glusterfs-cli-3.7.3-0.82.git6c4096f.el6.x86_64
python-gluster-3.7.3-0.82.git6c4096f.el6.noarch



How reproducible:


Steps to Reproduce:
1.offline a tier volume
2.issue a detach-tier start
3.it will fail saying use force or commit
4. try using force, it will still throw same error thrown in step#2

Comment 1 Vivek Agarwal 2015-10-01 12:12:52 UTC
 http://review.gluster.org/12151 merged in the master

Comment 2 Raghavendra Talur 2015-11-17 05:57:59 UTC
This bug is getting closed because a release has been made available that should address the reported issue. In case the problem is still not fixed with glusterfs-3.7.6, please open a new bug report.

glusterfs-3.7.6 has been announced on the Gluster mailinglists [1], packages for several distributions should become available in the near future. Keep an eye on the Gluster Users mailinglist [2] and the update infrastructure for your distribution.

[1] http://www.gluster.org/pipermail/gluster-users/2015-November/024359.html
[2] http://thread.gmane.org/gmane.comp.file-systems.gluster.user