Bug 1002603 - Samba hook scripts don't get updated with rpm update.
Samba hook scripts don't get updated with rpm update.
Status: CLOSED ERRATA
Product: Red Hat Gluster Storage
Classification: Red Hat
Component: samba (Show other bugs)
2.1
Unspecified Unspecified
urgent Severity urgent
: ---
: ---
Assigned To: Bala.FA
surabhi
:
Depends On: 956495
Blocks:
  Show dependency treegraph
 
Reported: 2013-08-29 10:01 EDT by surabhi
Modified: 2015-11-22 21:57 EST (History)
6 users (show)

See Also:
Fixed In Version: glusterfs-3.4.0.30rhs-2.el6rhs
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-09-23 18:32:17 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description surabhi 2013-08-29 10:01:35 EDT
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.
Comment 2 surabhi 2013-08-29 10:07:15 EDT
After discussion with Amar assigning it to Bala as it need change in glusterfs spec file.
Comment 3 Amar Tumballi 2013-08-29 13:31:19 EDT
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
Comment 4 Amar Tumballi 2013-08-30 02:30:58 EDT
https://code.engineering.redhat.com/gerrit/#/c/12211
Comment 5 surabhi 2013-09-04 09:55:58 EDT
Verified on latest version:
glusterfs-3.4.0.30rhs-2.el6rhs.x86_64

The samba hooks scripts are getting updated.
Comment 6 Scott Haines 2013-09-23 18:32:17 EDT
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

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