Bug 766640

Summary: glusterfs-geo-replication unconditionally restarts glusterd in %post
Product: Red Hat Gluster Storage Reporter: Anthony Towns <atowns>
Component: buildAssignee: Vijay Bellur <vbellur>
Status: CLOSED CURRENTRELEASE QA Contact: Rejy M Cyriac <rcyriac>
Severity: high Docs Contact:
Priority: medium    
Version: 1.0CC: amarts, flanagan, gluster-bugs, grajaiya, ndevos, psharma, rcyriac, rfortier, sdharane, vagarwal, vbellur
Target Milestone: ---Keywords: Patch, ZStream
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Fixed In Version: glusterfs- Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 858411 (view as bug list) Environment:
Last Closed: 2013-12-09 11:45:14 EST Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
Bug Depends On:    
Bug Blocks: 858411    

Description Anthony Towns 2011-12-12 09:01:07 EST
Description of problem:

Installation of glusterfs-geo-replication starts glusterd in %post.

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1. Disable glusterd
2. Install glusterfs-geo-replication
Actual results:

glusterd running

Expected results:

glusterd not running

Additional Notes:

This prevents setting up a disk image via kickstart and appliance-tools because glusterd running in the chroot environment prevents the chroot from being unmounted.
Comment 2 Niels de Vos 2012-10-11 03:40:42 EDT
The .spec contains

%post geo-replication
#restart glusterd.
%{_sysconfdir}/init.d/glusterd restart &> /dev/null

This should be replaced with

if [ $1 -ge 1 ]; then
    /sbin/service glusterd condrestart &>/dev/null || :

This will only restart glusterd on an update ($1 -ge 1) and only when it is running (condrestart).
Comment 3 Niels de Vos 2012-10-11 03:54:42 EDT
*** Bug 826855 has been marked as a duplicate of this bug. ***
Comment 4 Niels de Vos 2012-10-11 10:51:07 EDT
Review available at http://review.gluster.org/4063
Comment 5 Niels de Vos 2012-10-11 11:57:31 EDT
Tested successfully like this:

$ git clone http://review.gluster.org/p/glusterfs
$ cd glusterfs
$ git pull http://review.gluster.org/p/glusterfs refs/changes/63/4063/1
$ ./autogen.sh && ./configure --enable-fusermount && make dist && rpmbuild -ta glusterfs-3git.tar.gz

Install the just build packages, but not glusterfs-geo-replication.

Make sure to disable the glusterd service
# service glusterd stop
# chkconfig glusterd off

Install the just built glusterfs-geo-replication.

-> Confirm that glusterd is not running
Comment 6 Vijay Bellur 2012-10-11 19:35:07 EDT
CHANGE: http://review.gluster.org/4063 (build: do not unconditionally restart glusterd in glusterfs-geo-replication %post) merged in master by Anand Avati (avati@redhat.com)
Comment 7 Niels de Vos 2013-01-10 08:18:03 EST
Assigning to Vijay as the the change needs to be made in the glusterfs.spec in dist-git too.

The current change is only in the glusterfs.spec.in which is fine for upstream.
Comment 8 Niels de Vos 2013-01-11 03:47:28 EST
*** Bug 889248 has been marked as a duplicate of this bug. ***
Comment 9 Rejy M Cyriac 2013-10-04 08:24:27 EDT
Verified with glusterfs-geo-replication- that it does not unconditionally start glusterd on install.