Bug 1067297 - Need a more cleaner way to preserve old hook scripts of GLusterFS during upgrade
Summary: Need a more cleaner way to preserve old hook scripts of GLusterFS during upg...
Keywords:
Status: CLOSED DUPLICATE of bug 1043566
Alias: None
Product: Red Hat Gluster Storage
Classification: Red Hat Storage
Component: glusterd
Version: 2.1
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
: ---
Assignee: Bug Updates Notification Mailing List
QA Contact: Lalatendu Mohanty
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-02-20 07:20 UTC by Lalatendu Mohanty
Modified: 2014-05-06 10:35 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-02-20 10:38:15 UTC
Embargoed:


Attachments (Terms of Use)

Description Lalatendu Mohanty 2014-02-20 07:20:23 UTC
Description of problem:

As of now we modify hookscripts as below during upgrade of GlusterFS RPMs because we need use the new hook scripts to be used by Gluster and not the old ones.

1. The first letter 'S' is modified to be a 'K'
2. Appending .rpmsave to the file
e.g: Hook script "S30samba-set.sh" will be modified to "K30samba-set.sh.rpmsave"during a rpm upgrade

We preserve the old hook scripts just to make sure Admin/user is not loosing any changes in-case he has done some changes to the hook scripts which is I think standard RPM procedure.

But this step to preserve old hook scripts overdo it and during multiple upgrades, all the old hook scripts were saved and the hooks scripts look cluttered (as below). Which is not desirable.
 
K30samba-set.sh.rpmsave.rpmsave.rpmsave.rpmsave.rpmsave.rpmsave
var/lib/glusterd/hooks/1/set/post/K30samba-set.sh.rpmsave.rpmsave.rpmsave.rpmsave
/var/lib/glusterd/hooks/1/set/post/K30samba-set.sh.rpmsave.rpmsave
/var/lib/glusterd/hooks/1/set/post/S30samba-set.sh
/var/lib/glusterd/hooks/1/start/post/S30samba-start.sh

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

glusterfs-3.4.0.59rhs-1.el6rhs.x86_64

How reproducible:

Always

Steps to Reproduce:
1.
2.
3.

Actual results:

A RHS system which has gone though multiple upgrades, the hooks script look very cluttered.

Expected results:

It should be cleaner than current implementation.

Additional info:

Here is an example of how hook scripts look for a system gone through multiple upgrades.

find /var/lib/glusterd/hooks -type f
/var/lib/glusterd/hooks/1/set/post/K30samba-set.sh.rpmsave.rpmsave.rpmsave.rpmsave
/var/lib/glusterd/hooks/1/set/post/K30samba-set.sh.rpmsave.rpmsave
/var/lib/glusterd/hooks/1/set/post/S30samba-set.sh
/var/lib/glusterd/hooks/1/start/post/S30samba-start.sh
/var/lib/glusterd/hooks/1/start/post/K29CTDBsetup.sh.rpmsave
/var/lib/glusterd/hooks/1/start/post/S29CTDBsetup.sh
/var/lib/glusterd/hooks/1/start/post/K30samba-start.sh.rpmsave.rpmsave.rpmsave.rpmsave
/var/lib/glusterd/hooks/1/start/post/K29CTDBsetup.sh.rpmsave.rpmsave
/var/lib/glusterd/hooks/1/start/post/K30samba-start.sh.rpmsave.rpmsave
/var/lib/glusterd/hooks/1/start/post/K29CTDBsetup.sh.rpmsave.rpmsave.rpmsave.rpmsave
/var/lib/glusterd/hooks/1/gsync-create/post/S56glusterd-geo-rep-create-post.sh
/var/lib/glusterd/hooks/1/stop/pre/K29CTDB-teardown.sh.rpmsave.rpmsave
/var/lib/glusterd/hooks/1/stop/pre/K30samba-stop.sh.rpmsave
/var/lib/glusterd/hooks/1/stop/pre/S29CTDB-teardown.sh
/var/lib/glusterd/hooks/1/stop/pre/K29CTDB-teardown.sh.rpmsave.rpmsave.rpmsave.rpmsave
/var/lib/glusterd/hooks/1/stop/pre/K30samba-stop.sh.rpmsave.rpmsave
/var/lib/glusterd/hooks/1/stop/pre/S30samba-stop.sh
/var/lib/glusterd/hooks/1/stop/pre/K30samba-stop.sh.rpmsave.rpmsave.rpmsave.rpmsave
/var/lib/glusterd/hooks/1/add-brick/post/disabled-quota-root-xattr-heal.sh.rpmsave
/var/lib/glusterd/hooks/1/add-brick/post/disabled-quota-root-xattr-heal.sh.rpmsave.rpmsave
/var/lib/glusterd/hooks/1/add-brick/post/disabled-quota-root-xattr-heal.sh.rpmsave.rpmsave.rpmsave.rpmsave
/var/lib/glusterd/hooks/1/add-brick/post/disabled-quota-root-xattr-heal.sh
/var/lib/glusterd/hooks/1/add-brick/pre/S28Quota-enable-root-xattr-heal.sh
/var/lib/glusterd/hooks/1/add-brick/pre/K28Quota-enable-root-xattr-heal.sh.rpmsave.rpmsave.rpmsave.rpmsave
/var/lib/glusterd/hooks/1/add-brick/pre/K28Quota-enable-root-xattr-heal.sh.rpmsave.rpmsave

Comment 3 SATHEESARAN 2014-02-20 10:30:06 UTC
The second issue as mentioned in comment0, is already part of this bug,
https://bugzilla.redhat.com/show_bug.cgi?id=1043566

Comment 4 Lalatendu Mohanty 2014-02-20 10:34:56 UTC
Thanks Satheesaran. This bug certainly a duplicate of bz 1043566

Comment 5 Lalatendu Mohanty 2014-02-20 10:38:15 UTC

*** This bug has been marked as a duplicate of bug 1043566 ***

Comment 6 Vivek Agarwal 2014-04-07 11:41:18 UTC
Per bug triage, between dev, PM and QA, moving these out of denali

Comment 7 Nagaprasad Sathyanarayana 2014-05-06 10:35:10 UTC
BZs not targeted for Denali.


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