Bug 902644 - Virt file does not get regenerated after wiping /var/lib/glusterd/groups and restarting glusterd
Summary: Virt file does not get regenerated after wiping /var/lib/glusterd/groups and ...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Gluster Storage
Classification: Red Hat Storage
Component: glusterd
Version: unspecified
Hardware: Unspecified
OS: Unspecified
low
medium
Target Milestone: ---
: RHGS 2.1.2
Assignee: Avra Sengupta
QA Contact: SATHEESARAN
URL:
Whiteboard:
Depends On:
Blocks: 916127
TreeView+ depends on / blocked
 
Reported: 2013-01-22 06:56 UTC by shylesh
Modified: 2015-05-13 16:27 UTC (History)
8 users (show)

Fixed In Version: glusterfs-3.4.0.33rhs
Doc Type: Bug Fix
Doc Text:
Previously, a Virt file would not be regenerated after it is deleted from /var/lib/glusterd/groups and glusterd service is restarted. It is required to reinstall the gluster-server RPM to regenerate the Virt file. With this update, 'gluster volume set <VOLNAME> group virt' command displays an error message if the Virt file is invalid or deleted.
Clone Of:
: 916127 (view as bug list)
Environment:
Last Closed: 2014-02-25 07:23:44 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2014:0208 0 normal SHIPPED_LIVE Red Hat Storage 2.1 enhancement and bug fix update #2 2014-02-25 12:20:30 UTC

Description shylesh 2013-01-22 06:56:17 UTC
Description of problem:

wiping out /etc/glusterd/groups and restarting the glusterd doesn't create virt file back

Version-Release number of selected component (if applicable):
[root@rhs-gp-srv9 brick3]# rpm -qa | grep gluster
glusterfs-fuse-3.3.0.5rhs-40.el6rhs.x86_64
vdsm-gluster-4.9.6-17.el6rhs.noarch
gluster-swift-plugin-1.0-5.noarch
gluster-swift-account-1.4.8-4.el6.noarch
glusterfs-3.3.0.5rhs-40.el6rhs.x86_64
gluster-swift-doc-1.4.8-4.el6.noarch
glusterfs-debuginfo-3.3.0.5rhs-40.el6rhs.x86_64
glusterfs-server-3.3.0.5rhs-40.el6rhs.x86_64
glusterfs-rdma-3.3.0.5rhs-40.el6rhs.x86_64
gluster-swift-object-1.4.8-4.el6.noarch
gluster-swift-container-1.4.8-4.el6.noarch
org.apache.hadoop.fs.glusterfs-glusterfs-0.20.2_0.2-1.noarch
gluster-swift-1.4.8-4.el6.noarch
gluster-swift-proxy-1.4.8-4.el6.noarch
glusterfs-geo-replication-3.3.0.5rhs-40.el6rhs.x86_64


 

Expected results:
virt file should be automatically regenerated after restarting the glusterd

Comment 2 Amar Tumballi 2013-01-22 08:47:12 UTC
'low' priority because removing the file by hand is not recommended.

the issue is because the group file gets installed with rpm, and doesn't get touched after that.

One way to handle it is giving proper error saying we are missing 'group' file in /var/lib/glusterd, and thus the command will not be supported. (can be done in CLI).

Comment 3 shylesh 2013-01-22 08:52:17 UTC
/var/lib/glusterd/groups in case of RHS

Comment 5 Vivek Agarwal 2013-09-30 10:26:30 UTC
Based on discussion and resaon mentioned in comment #2, the fix in comment #4 is the max that can be done by Development, otherwise, it is good enough to get closed as NOTABUG.

Comment 6 SATHEESARAN 2013-12-19 05:17:47 UTC
VERIFIED this bug with glusterfs-3.4.0.51rhs-el6rhs

As per comment 2, "virt" file will not be regenerated in case, if its deleted accidentally or purposefully.

But there would be appropriate cli error message, when trying to use that file.
Also if the contents of this "virt" file is not in the format of "key=Value", then also appropriate error is thrown.

Tested this with various options as below :
------------------------------------------------------------------------
[root@rhss1 ~]# gluster --version
glusterfs 3.4.0.51rhs built on Dec 18 2013 11:15:39
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@rhss1 ~]# cat /var/lib/glusterd/groups/virt 
quick-read=off
read-ahead=off
io-cache=off
stat-prefetch=off
eager-lock=enable
remote-dio=enable
quorum-type=auto
server-quorum-type=server

[root@rhss1 ~]# cp /var/lib/glusterd/groups/virt .
[root@rhss1 ~]# ls
anaconda-ks.cfg  install.log  install.log.syslog  scripts  virt
[root@rhss1 ~]# pwd
/root

-----------------------------------------------------------------
CASE - When 'virt' file is not available
========================================
[root@rhss1 ~]# rm -rf /var/lib/glusterd/groups/virt
[root@rhss1 ~]# ls /var/lib/glusterd/groups/
small-file-perf

[root@rhss1 ~]# gluster volume set repvol group virt
Unable to open file '/var/lib/glusterd/groups/virt'. Error: No such file or directory

[root@rhss1 ~]# touch /var/lib/glusterd/groups/virt

[root@rhss1 ~]# gluster volume set repvol group virt
'/var/lib/glusterd/groups/virt' file format not valid.

[root@rhss1 ~]# cp virt /var/lib/glusterd/groups/virt
cp: overwrite `/var/lib/glusterd/groups/virt'? y
------------------------------------------------------------------------
CASE - when 'value' is missing for the 'key' in 'virt' file
===========================================================
[root@rhss1 ~]# cat /var/lib/glusterd/groups/virt
quick-read=off
read-ahead=off
io-cache=
stat-prefetch=off
eager-lock=enable
remote-dio=enable
quorum-type=auto
server-quorum-type=server

[root@rhss1 ~]# gluster volume set repvol group virt
'/var/lib/glusterd/groups/virt' file format not valid.
-----------------------------------------------------------------------
CASE - when 'Key' is missing for the 'value' in 'virt'file
===========================================================
[root@rhss1 ~]# cat /var/lib/glusterd/groups/virt
quick-read=off
read-ahead=off
=off
stat-prefetch=off
eager-lock=enable
remote-dio=enable
quorum-type=auto
server-quorum-type=server

[root@rhss1 ~]# gluster volume set repvol group virt
'/var/lib/glusterd/groups/virt' file format not valid.
------------------------------------------------------------------------
CASE - when 2 'keys' & 2 'values' are missing from 'virt' file
==============================================================
[root@rhss1 ~]# vi /var/lib/glusterd/groups/virt
[root@rhss1 ~]# cat /var/lib/glusterd/groups/virt
quick-read=off
read-ahead=off
=off
=off
eager-lock=
remote-dio=
quorum-type=auto
server-quorum-type=server

[root@rhss1 ~]# gluster volume set repvol group virt
'/var/lib/glusterd/groups/virt' file format not valid.
-------------------------------------------------------------------

POSITIVE CASE - Under ideal condition ( 'virt' file's content not altered' )
============================================================================
[root@rhss1 ~]# cp virt /var/lib/glusterd/groups/virt
cp: overwrite `/var/lib/glusterd/groups/virt'? y

[root@rhss1 ~]# cat /var/lib/glusterd/groups/virt
quick-read=off
read-ahead=off
io-cache=off
stat-prefetch=off
eager-lock=enable
remote-dio=enable
quorum-type=auto
server-quorum-type=server

[root@rhss1 ~]# gluster volume set repvol group virt
volume set: success

[root@rhss1 ~]# gluster volume info repvol
 
Volume Name: repvol
Type: Replicate
Volume ID: 5d6f89d5-cedb-454f-82d0-54be33f2cb55
Status: Started
Number of Bricks: 1 x 2 = 2
Transport-type: tcp
Bricks:
Brick1: 10.70.37.86:/rhs/brick4/repdir1
Brick2: 10.70.37.187:/rhs/brick4/repdir1
Options Reconfigured:
cluster.server-quorum-type: server
cluster.quorum-type: auto
network.remote-dio: enable
cluster.eager-lock: enable
performance.stat-prefetch: off
performance.io-cache: off
performance.read-ahead: off
performance.quick-read: off

Comment 7 Pavithra 2014-01-08 07:24:17 UTC
Can you please verify the doc text for technical accuracy?

Comment 8 Avra Sengupta 2014-01-08 07:34:25 UTC
Changed the rpm's name in the doctext.

Comment 10 errata-xmlrpc 2014-02-25 07:23:44 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.

http://rhn.redhat.com/errata/RHEA-2014-0208.html


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