Description of problem: After doing a rpm update the hooks scripts does not get updated with the latest changes. Version-Release number of selected component (if applicable): glusterfs-3.4.0.24rhs-1.el6rhs.x86_64.rpm How reproducible: Always. Steps to Reproduce: 1.Update the existing rpm's to new one. 2.Create a volume. 3.Start a volume. 4.check the hooks script: /var/lib/glusterd/hooks/1/start/post/S30samba-start.sh /var/lib/glusterd/hooks/1/stop/pre/S30samba-stop.sh Actual results: hooks scripts don't get updated and no new scripts have been saved on the above location. Expected results: Either the existing hooks scripts should get updated or there should be a new script saved in the location above to make use of it. Additional info: We may add something to spec file to keep a copy of new hook script or move the old one to .old file.
After discussion with Amar assigning it to Bala as it need change in glusterfs spec file.
Is the below patch enough? ---- amar@supernova:~/work/rhs-glusterfs$ git diff diff --git a/glusterfs.spec.in b/glusterfs.spec.in index 4d6ea71..867b6f5 100644 --- a/glusterfs.spec.in +++ b/glusterfs.spec.in @@ -972,6 +972,17 @@ if [ -d /var/lib/glusterd/vols ]; then done fi +# Rename old hookscripts in an RPM-standard way. These aren't actually +# considered package config files, so %config doesn't work for them. +if [ -d /var/lib/glusterd/hooks ]; then + for file in $(find /var/lib/glusterd/hooks -type f); do + newfile=${file}.rpmsave + echo "warning: ${file} saved as ${newfile}" + mv ${file} ${newfile} + done +fi + + # Need to copy the file. mkdir -p /var/lib/glusterd/groups if [ ! -r /var/lib/glusterd/groups/virt ]; then
https://code.engineering.redhat.com/gerrit/#/c/12211
Verified on latest version: glusterfs-3.4.0.30rhs-2.el6rhs.x86_64 The samba hooks scripts are getting updated.
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. http://rhn.redhat.com/errata/RHBA-2013-1262.html