Bug 1067297

Summary: Need a more cleaner way to preserve old hook scripts of GLusterFS during upgrade
Product: [Red Hat Storage] Red Hat Gluster Storage Reporter: Lalatendu Mohanty <lmohanty>
Component: glusterdAssignee: Bug Updates Notification Mailing List <rhs-bugs>
Status: CLOSED DUPLICATE QA Contact: Lalatendu Mohanty <lmohanty>
Severity: high Docs Contact:
Priority: unspecified    
Version: 2.1CC: asrivast, nlevinki, sasundar, shaines, vbellur
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-02-20 10:38:15 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

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.