Bug 1229245

Summary: Data Tiering:Replica type volume not getting converted to tier type after attaching tier
Product: [Red Hat Storage] Red Hat Gluster Storage Reporter: Nag Pavan Chilakam <nchilaka>
Component: tierAssignee: Bug Updates Notification Mailing List <rhs-bugs>
Status: CLOSED ERRATA QA Contact: Nag Pavan Chilakam <nchilaka>
Severity: high Docs Contact:
Priority: high    
Version: rhgs-3.1CC: asrivast, bugs, dlambrig, josferna, rhs-bugs, rkavunga, storage-qa-internal, trao
Target Milestone: ---Keywords: Triaged
Target Release: RHGS 3.1.0   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 1208386 Environment:
Last Closed: 2015-07-29 04:58:39 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: 1208386    
Bug Blocks: 1186580, 1202842    

Description Nag Pavan Chilakam 2015-06-08 10:26:08 UTC
+++ This bug was initially created as a clone of Bug #1208386 +++

Description of problem:
=====================
Attaching a tier to a replica volume is not getting converted to a tier-replica volume.
Instead it is just getting converted to dist-rep volume with no tier gfid issued for each brick


Version-Release number of selected component (if applicable):
===========================================================
upstream nightly
glusterfs 3.7dev built on Mar 31 2015 01:05:54
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:
===============
easily


Steps to Reproduce:
==================
1.create a pure replica volume with two bricks which are replica of each other ie 1x2
2.now attach a tier to it
3.the volume should now get converted to tier-dist-rep volume but is getting converted to just dist-rep vol

Actual results:
==============
the volume should now get converted to tier-dist-rep volume but is getting converted to just dist-rep vol

Expected results:
================
support replica volume to be converted to tier type


Additional info(cli):
=================
[root@interstellar ~]# gluster v create replica replica 2 interstellar:/pavanbrick1/replica/b1 transformers:/pavanbrick1/replica/b1
volume create: replica: success: please start the volume to access data
[root@interstellar ~]# gluster v start replica
volume start: replica: success
[root@interstellar ~]# gluster v status replica
Status of volume: replica
Gluster process                             TCP Port  RDMA Port  Online  Pid
------------------------------------------------------------------------------
Brick interstellar:/pavanbrick1/replica/b1  49155     0          Y       62403
Brick transformers:/pavanbrick1/replica/b1  49154     0          Y       21852
NFS Server on localhost                     2049      0          Y       62423
Self-heal Daemon on localhost               N/A       N/A        Y       62431
NFS Server on transformers.lab.eng.blr.redh
at.com                                      2049      0          Y       21876
Self-heal Daemon on transformers.lab.eng.bl
r.redhat.com                                N/A       N/A        Y       21883
 
Task Status of Volume replica
------------------------------------------------------------------------------
There are no active volume tasks
 
[root@interstellar ~]# gluster v status replica
Status of volume: replica
Gluster process                             TCP Port  RDMA Port  Online  Pid
------------------------------------------------------------------------------
Brick interstellar:/pavanbrick1/replica/b1  49155     0          Y       62403
Brick transformers:/pavanbrick1/replica/b1  49154     0          Y       21852
NFS Server on localhost                     2049      0          Y       62423
Self-heal Daemon on localhost               N/A       N/A        Y       62431
NFS Server on transformers.lab.eng.blr.redh
at.com                                      2049      0          Y       21876
Self-heal Daemon on transformers.lab.eng.bl
r.redhat.com                                N/A       N/A        Y       21883
 
Task Status of Volume replica
------------------------------------------------------------------------------
There are no active volume tasks
 
[root@interstellar ~]# gluster v info replica
 
Volume Name: replica
Type: Replicate
Volume ID: 6b567ac5-370f-4ed1-876d-bb8c7bd1f589
Status: Started
Number of Bricks: 1 x 2 = 2
Transport-type: tcp
Bricks:
Brick1: interstellar:/pavanbrick1/replica/b1
Brick2: transformers:/pavanbrick1/replica/b1
[root@interstellar ~]# gluster v attach-tier replica interstellar:/pavanbrick2/replica/hb1 transformers:/pavanbrick2/replica/hb1
volume add-brick: success
[root@interstellar ~]# gluster v status replica
Status of volume: replica
Gluster process                             TCP Port  RDMA Port  Online  Pid
------------------------------------------------------------------------------
Brick transformers:/pavanbrick2/replica/hb1 49155     0          Y       22084
Brick interstellar:/pavanbrick2/replica/hb1 49156     0          Y       62620
Brick interstellar:/pavanbrick1/replica/b1  49155     0          Y       62403
Brick transformers:/pavanbrick1/replica/b1  49154     0          Y       21852
NFS Server on localhost                     2049      0          Y       62638
Self-heal Daemon on localhost               N/A       N/A        Y       62646
NFS Server on transformers.lab.eng.blr.redh
at.com                                      2049      0          Y       22102
Self-heal Daemon on transformers.lab.eng.bl
r.redhat.com                                N/A       N/A        Y       22110
 
Task Status of Volume replica
------------------------------------------------------------------------------
There are no active volume tasks
 
[root@interstellar ~]# gluster v info replica
 
Volume Name: replica
Type: Distributed-Replicate
Volume ID: 6b567ac5-370f-4ed1-876d-bb8c7bd1f589
Status: Started
Number of Bricks: 2 x 2 = 4
Transport-type: tcp
Bricks:
Brick1: transformers:/pavanbrick2/replica/hb1
Brick2: interstellar:/pavanbrick2/replica/hb1
Brick3: interstellar:/pavanbrick1/replica/b1
Brick4: transformers:/pavanbrick1/replica/b1
[root@interstellar ~]# 





[root@transformers samba]# getfattr -d -e hex -m . /pavanbrick2/replica/hb1/
getfattr: Removing leading '/' from absolute path names
# file: pavanbrick2/replica/hb1/
security.selinux=0x756e636f6e66696e65645f753a6f626a6563745f723a66696c655f743a733000
trusted.gfid=0x00000000000000000000000000000001
trusted.glusterfs.volume-id=0x6b567ac5370f4ed1876dbb8c7bd1f589

[root@transformers samba]# getfattr -d -e hex -m . /pavanbrick1/replica/b1/
getfattr: Removing leading '/' from absolute path names
# file: pavanbrick1/replica/b1/
security.selinux=0x756e636f6e66696e65645f753a6f626a6563745f723a66696c655f743a733000
trusted.gfid=0x00000000000000000000000000000001
trusted.glusterfs.dht=0x000000010000000000000000ffffffff
trusted.glusterfs.volume-id=0x6b567ac5370f4ed1876dbb8c7bd1f589

[root@transformers samba]# gluster --version
glusterfs 3.7dev built on Mar 31 2015 01:05:54
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@transformers samba]# 





[root@interstellar samba]# getfattr -d -e hex -m . /pavanbrick2/replica/hb1/
getfattr: Removing leading '/' from absolute path names
# file: pavanbrick2/replica/hb1/
security.selinux=0x756e636f6e66696e65645f753a6f626a6563745f723a66696c655f743a733000
trusted.gfid=0x00000000000000000000000000000001
trusted.glusterfs.volume-id=0x6b567ac5370f4ed1876dbb8c7bd1f589

[root@interstellar samba]# getfattr -d -e hex -m . /pavanbrick1/replica/b1/
getfattr: Removing leading '/' from absolute path names
# file: pavanbrick1/replica/b1/
security.selinux=0x756e636f6e66696e65645f753a6f626a6563745f723a66696c655f743a733000
trusted.gfid=0x00000000000000000000000000000001
trusted.glusterfs.dht=0x000000010000000000000000ffffffff
trusted.glusterfs.volume-id=0x6b567ac5370f4ed1876dbb8c7bd1f589

[root@interstellar samba]# gluster --version
glusterfs 3.7dev built on Mar 31 2015 01:05:54
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@interstellar samba]#

--- Additional comment from Dan Lambright on 2015-04-21 14:40:49 EDT ---

This problem is similar to bug 1207204, it was fixed by 10054- the new volume name is "tier" after the attach occurs. 

The gluster v info will be updated and this is being track separately by bug 1206546.

--- Additional comment from Niels de Vos on 2015-05-15 09:07:38 EDT ---

This change should not be in "ON_QA", the patch posted for this bug is only available in the master branch and not in a release yet. Moving back to MODIFIED until there is an beta release for the next GlusterFS version.

Comment 3 Triveni Rao 2015-06-11 16:52:55 UTC
this bug is verified and found no issues.

Comment 4 Triveni Rao 2015-06-12 11:37:56 UTC
[root@rhsqa14-vm1 ~]# gluster  v create mix 10.70.47.165:/rhs/brick3/h0 10.70.47.163:/rhs/brick3/h0 
volume create: mix: success: please start the volume to access data
[root@rhsqa14-vm1 ~]# gluster v start mix
volume start: mix: success
[root@rhsqa14-vm1 ~]# gluster v info mix
 
Volume Name: mix
Type: Distribute
Volume ID: 0f1a01aa-9b1a-4cd5-bc9c-64b14630f264
Status: Started
Number of Bricks: 2
Transport-type: tcp
Bricks:
Brick1: 10.70.47.165:/rhs/brick3/h0
Brick2: 10.70.47.163:/rhs/brick3/h0
Options Reconfigured:
performance.readdir-ahead: on
[root@rhsqa14-vm1 ~]# 
[root@rhsqa14-vm1 ~]#

[root@rhsqa14-vm1 ~]# 

[root@rhsqa14-vm1 ~]# gluster v attach-tier mix 10.70.47.165:/rhs/brick4/h0 10.70.47.163:/rhs/brick4/h0
Attach tier is recommended only for testing purposes in this release. Do you want to continue? (y/n) y
volume attach-tier: success
volume rebalance: mix: success: Rebalance on mix has been started successfully. Use rebalance status command to check status of the rebalance process.
ID: e5858e08-2ccc-4176-9b2d-bf1419251323

[root@rhsqa14-vm1 ~]# 
[root@rhsqa14-vm1 ~]# 
[root@rhsqa14-vm1 ~]# gluster v info mix
 
Volume Name: mix
Type: Tier
Volume ID: 0f1a01aa-9b1a-4cd5-bc9c-64b14630f264
Status: Started
Number of Bricks: 4
Transport-type: tcp
Hot Tier :
Hot Tier Type : Distribute
Number of Bricks: 2
Brick1: 10.70.47.163:/rhs/brick4/h0
Brick2: 10.70.47.165:/rhs/brick4/h0
Cold Tier:
Cold Tier Type : Distribute
Number of Bricks: 2
Brick3: 10.70.47.165:/rhs/brick3/h0
Brick4: 10.70.47.163:/rhs/brick3/h0
Options Reconfigured:
performance.readdir-ahead: on
[root@rhsqa14-vm1 ~]# 


[root@rhsqa14-vm1 ~]# glusterfs --version
glusterfs 3.7.1 built on Jun  9 2015 02:31:54
Repository revision: git://git.gluster.com/glusterfs.git
Copyright (c) 2006-2013 Red Hat, Inc. <http://www.redhat.com/>
GlusterFS comes with ABSOLUTELY NO WARRANTY.
It is licensed to you under your choice of the GNU Lesser
General Public License, version 3 or any later version (LGPLv3
or later), or the GNU General Public License, version 2 (GPLv2),
in all cases as published by the Free Software Foundation.
[root@rhsqa14-vm1 ~]# rpm -qa | grep gluster
glusterfs-3.7.1-1.el6rhs.x86_64
glusterfs-cli-3.7.1-1.el6rhs.x86_64
glusterfs-libs-3.7.1-1.el6rhs.x86_64
glusterfs-client-xlators-3.7.1-1.el6rhs.x86_64
glusterfs-fuse-3.7.1-1.el6rhs.x86_64
glusterfs-server-3.7.1-1.el6rhs.x86_64
glusterfs-api-3.7.1-1.el6rhs.x86_64
[root@rhsqa14-vm1 ~]#

Comment 5 errata-xmlrpc 2015-07-29 04:58:39 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/RHSA-2015-1495.html