Bug 766640 - glusterfs-geo-replication unconditionally restarts glusterd in %post
Summary: glusterfs-geo-replication unconditionally restarts glusterd in %post
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Gluster Storage
Classification: Red Hat Storage
Component: build
Version: 1.0
Hardware: Unspecified
OS: Unspecified
medium
high
Target Milestone: ---
: ---
Assignee: Vijay Bellur
QA Contact: Rejy M Cyriac
URL:
Whiteboard:
: 826855 889248 (view as bug list)
Depends On:
Blocks: 858411
TreeView+ depends on / blocked
 
Reported: 2011-12-12 14:01 UTC by Anthony Towns
Modified: 2014-07-11 06:39 UTC (History)
11 users (show)

Fixed In Version: glusterfs-3.4.0.33rhs-1
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 858411 (view as bug list)
Environment:
Last Closed: 2013-12-09 16:45:14 UTC
Embargoed:


Attachments (Terms of Use)

Description Anthony Towns 2011-12-12 14:01:07 UTC
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 07:40:42 UTC
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 07:54:42 UTC
*** Bug 826855 has been marked as a duplicate of this bug. ***

Comment 4 Niels de Vos 2012-10-11 14:51:07 UTC
Review available at http://review.gluster.org/4063

Comment 5 Niels de Vos 2012-10-11 15:57:31 UTC
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 23:35:07 UTC
CHANGE: http://review.gluster.org/4063 (build: do not unconditionally restart glusterd in glusterfs-geo-replication %post) merged in master by Anand Avati (avati)

Comment 7 Niels de Vos 2013-01-10 13:18:03 UTC
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 08:47:28 UTC
*** Bug 889248 has been marked as a duplicate of this bug. ***

Comment 9 Rejy M Cyriac 2013-10-04 12:24:27 UTC
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.