Bug 766640 - glusterfs-geo-replication unconditionally restarts glusterd in %post
glusterfs-geo-replication unconditionally restarts glusterd in %post
Status: CLOSED CURRENTRELEASE
Product: Red Hat Gluster Storage
Classification: Red Hat
Component: build (Show other bugs)
1.0
Unspecified Unspecified
medium Severity high
: ---
: ---
Assigned To: Vijay Bellur
Rejy M Cyriac
: Patch, ZStream
: 826855 889248 (view as bug list)
Depends On:
Blocks: 858411
  Show dependency treegraph
 
Reported: 2011-12-12 09:01 EST by Anthony Towns
Modified: 2014-07-11 02:39 EDT (History)
11 users (show)

See Also:
Fixed In Version: glusterfs-3.4.0.33rhs-1
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:


Attachments (Terms of Use)

  None (edit)
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):

glusterfs-geo-replication-3.2.5-2.el6.x86_64

How reproducible:

Always

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 || :
fi


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-3.4.0.33rhs-1.el6rhs that it does not unconditionally start glusterd on install.

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