+++ This bug was initially created as a clone of Bug #1207029 +++
Description of problem:
=======================
when peer doesn't have brick for volume and Admin enables BitRot for that volume, it starts bitd on that node and also generates volume file which is not complete
Version-Release number of selected component (if applicable):
=============================================================
0.803.gitf64666f.el6.x86_64
How reproducible:
=================
always
Steps to Reproduce:
===================
1. create a volume and make sure that one of the peer in cluster doesn't have any bricks on it
2. Enable BitRot for that volume.
3. check peer where brick is not present
[root@rhs-client38 ~]# tail -f /var/log/glusterfs/bitd.log
[2015-03-26 09:09:06.033443] I [MSGID: 100030] [glusterfsd.c:2288:main] 0-/usr/sbin/glusterfs: Started running /usr/sbin/glusterfs version 3.7dev (args: /usr/sbin/glusterfs -s localhost --volfile-id gluster/bitd -p /var/lib/glusterd/bitd/run/bitd.pid -l /var/log/glusterfs/bitd.log -S /var/run/gluster/38ca86c29620f999da1ff58a74366ae5.socket)
[2015-03-26 09:09:06.045709] I [event-epoll.c:629:event_dispatch_epoll_worker] 0-epoll: Started thread with index 1
[2015-03-26 09:09:06.603114] E [graph.y:365:graphyyerror] 0-parser: syntax error: line 3 (volume 'bit-rot'): "end-volume"
allowed tokens are 'volume', 'type', 'subvolumes', 'option', 'end-volume'()
[2015-03-26 09:09:06.603198] E [MSGID: 100026] [glusterfsd.c:2142:glusterfs_process_volfp] 0-: failed to construct the graph
[2015-03-26 09:09:06.603381] W [glusterfsd.c:1212:cleanup_and_exit] (--> 0-: received signum (0), shutting down
[root@rhs-client38 ~]# cat /var/lib/glusterd/bitd/bitd-server.vol
volume bit-rot
type features/bit-rot
end-volume
[root@rhs-client38 ~]# ps auxww | grep bitd
root 20690 0.0 0.0 103252 864 pts/2 S+ 14:59 0:00 grep bitd
Actual results:
===============
bitd was started and partially created vol file is present
Expected results:
================
It should not start bitd and should not create vol file
Additional info:
================
--- Additional comment from Anand Avati on 2015-03-31 08:11:43 EDT ---
REVIEW: http://review.gluster.org/10071 (glusterd: bitd daemon should not start on the node which dont have any brick) posted (#1) for review on master by Gaurav Kumar Garg (ggarg)
--- Additional comment from Anand Avati on 2015-04-01 02:27:44 EDT ---
REVIEW: http://review.gluster.org/10071 (glusterd: bitd daemon should not start on the node which dont have any brick) posted (#2) for review on master by Gaurav Kumar Garg (ggarg)
--- Additional comment from Anand Avati on 2015-04-06 03:26:39 EDT ---
REVIEW: http://review.gluster.org/10071 (glusterd: bitd daemon should not start on the node which dont have any brick) posted (#3) for review on master by Gaurav Kumar Garg (ggarg)
--- Additional comment from Anand Avati on 2015-04-06 06:16:14 EDT ---
REVIEW: http://review.gluster.org/10071 (glusterd: bitd daemon should not start on the node which dont have any brick) posted (#4) for review on master by Gaurav Kumar Garg (ggarg)
--- Additional comment from Anand Avati on 2015-04-06 09:17:40 EDT ---
REVIEW: http://review.gluster.org/10071 (glusterd: bitd daemon should not start on the node which dont have any brick) posted (#5) for review on master by Niels de Vos (ndevos)
--- Additional comment from Anand Avati on 2015-04-07 02:30:59 EDT ---
REVIEW: http://review.gluster.org/10071 (glusterd: bitd daemon should not start on the node which dont have any brick) posted (#6) for review on master by Gaurav Kumar Garg (ggarg)
--- Additional comment from Anand Avati on 2015-04-09 08:00:02 EDT ---
REVIEW: http://review.gluster.org/10071 (glusterd: bitd daemon should not start on the node which dont have any brick) posted (#7) for review on master by Gaurav Kumar Garg (ggarg)
--- Additional comment from Anand Avati on 2015-04-10 03:00:29 EDT ---
REVIEW: http://review.gluster.org/10071 (glusterd: bitd daemon should not start on the node which dont have any brick) posted (#8) for review on master by Gaurav Kumar Garg (ggarg)
--- Additional comment from Anand Avati on 2015-04-10 06:13:49 EDT ---
COMMIT: http://review.gluster.org/10071 committed in master by Venky Shankar (vshankar)
------
commit accd61fb64b96c4af47aa6cfa41adb0f2e47a60a
Author: GauravKumarGarg <ggarg>
Date: Tue Mar 31 16:41:08 2015 +0530
glusterd: bitd daemon should not start on the node which dont have any brick
If user enable bitrot from node1 which have brick then glusterd starting
bitd daemon on node1 as well as glusterd starting bitd deamon on another node2
which does not have any brick (node1 and node2 are part of cluster).
With this fix glusterd will not start bitd daemon on the node which
don't have brick.
Change-Id: Ic1c68d204221d369d89d628487cdd5957964792e
BUG: 1207029
Signed-off-by: Gaurav Kumar Garg <ggarg>
Reviewed-on: http://review.gluster.org/10071
Tested-by: Gluster Build System <jenkins.com>
Reviewed-by: Atin Mukherjee <amukherj>
Reviewed-by: Venky Shankar <vshankar>
Tested-by: Venky Shankar <vshankar>
--- Additional comment from Anand Avati on 2015-04-15 02:20:06 EDT ---
REVIEW: http://review.gluster.org/10241 (glusterd: do not pass volinfo in glusterd_svc_manager function) posted (#1) for review on master by Gaurav Kumar Garg (ggarg)
--- Additional comment from Anand Avati on 2015-04-22 08:49:39 EDT ---
REVIEW: http://review.gluster.org/10241 (glusterd: do not pass volinfo in glusterd_svc_manager function) posted (#2) for review on master by Gaurav Kumar Garg (ggarg)
--- Additional comment from Anand Avati on 2015-04-23 03:03:15 EDT ---
REVIEW: http://review.gluster.org/10241 (glusterd: do not pass volinfo in glusterd_svc_manager function) posted (#3) for review on master by Gaurav Kumar Garg (ggarg)
--- Additional comment from Anand Avati on 2015-04-25 16:45:20 EDT ---
REVIEW: http://review.gluster.org/10241 (glusterd: do not pass volinfo in glusterd_svc_manager function) posted (#4) for review on master by Gaurav Kumar Garg (ggarg)
--- Additional comment from Anand Avati on 2015-04-27 02:07:10 EDT ---
REVIEW: http://review.gluster.org/10241 (glusterd: do not pass volinfo in glusterd_svc_manager function) posted (#5) for review on master by Gaurav Kumar Garg (ggarg)
--- Additional comment from Anand Avati on 2015-04-27 05:38:50 EDT ---
REVIEW: http://review.gluster.org/10241 (glusterd: do not pass volinfo in glusterd_svc_manager function) posted (#6) for review on master by Gaurav Kumar Garg (ggarg)
--- Additional comment from Anand Avati on 2015-04-30 05:44:05 EDT ---
COMMIT: http://review.gluster.org/10241 committed in master by Krishnan Parthasarathi (kparthas)
------
commit 7648c0de36c7927b588abc66734c5b94afb08c00
Author: Gaurav Kumar Garg <ggarg>
Date: Wed Apr 15 11:37:22 2015 +0530
glusterd: do not pass volinfo in glusterd_svc_manager function
On restarting of glusterd first it will start all the bricks present
in the volume then it will start all the services. During starting of
all the services it may pass volinfo as a NULL. It will cause Assert
failure in glusterd_bitdsvc_manager function and will cause a glusterd
crash.
Change-Id: Ia14cf5022da88516cdd576eb2d1e0e7b17a3782b
BUG: 1207029
Signed-off-by: Gaurav Kumar Garg <ggarg>
Reviewed-on: http://review.gluster.org/10241
Tested-by: Gluster Build System <jenkins.com>
Reviewed-by: Atin Mukherjee <amukherj>
Reviewed-by: Krishnan Parthasarathi <kparthas>
Tested-by: Krishnan Parthasarathi <kparthas>
--- Additional comment from Anand Avati on 2015-05-01 03:50:18 EDT ---
REVIEW: http://review.gluster.org/10481 (glusterd: do not pass volinfo in glusterd_svc_manager function) posted (#1) for review on release-3.7 by Gaurav Kumar Garg (ggarg)
--- Additional comment from RajeshReddy on 2015-05-15 04:24:59 EDT ---
Tested with build glusterfs-3.7.0beta2, Bitrot is not enabled if brick is not part of volume so closing the bug
Comment 2Gaurav Kumar Garg
2015-06-05 11:13:59 UTC
commit accd61fb64b96c4af47aa6cfa41adb0f2e47a60a
will solve this problem. patch for this patch already available in rhgs-3.1 branch so moving status of this bug ON_QA
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