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
'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).
/var/lib/glusterd/groups in case of RHS
https://code.engineering.redhat.com/gerrit/#/c/10839/
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.
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
Can you please verify the doc text for technical accuracy?
Changed the rpm's name in the doctext.
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