Bug 1022906 - RHS-C: Sync hooks is listing all the ".rpmsave" hooks as well
RHS-C: Sync hooks is listing all the ".rpmsave" hooks as well
Status: CLOSED NOTABUG
Product: Red Hat Gluster Storage
Classification: Red Hat
Component: rhsc (Show other bugs)
2.1
Unspecified Unspecified
medium Severity high
: ---
: RHGS 2.1.2
Assigned To: Aravinda VK
Prasanth
: ZStream
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-10-24 05:09 EDT by Prasanth
Modified: 2015-05-13 12:28 EDT (History)
8 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-11-06 04:36:29 EST
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)
screenshot (143.44 KB, image/png)
2013-10-24 05:09 EDT, Prasanth
no flags Details

  None (edit)
Description Prasanth 2013-10-24 05:09:03 EDT
Created attachment 815706 [details]
screenshot

Description of problem:

While updating glusterfs in the RHS nodes, following glusters hooks were saved automatically in it's same path:

-----------
warning: /var/lib/glusterd/hooks/1/set/post/S30samba-set.sh saved as /var/lib/glusterd/hooks/1/set/post/K30samba-set.sh.rpmsave
warning: /var/lib/glusterd/hooks/1/stop/pre/S29CTDB-teardown.sh saved as /var/lib/glusterd/hooks/1/stop/pre/K29CTDB-teardown.sh.rpmsave
warning: /var/lib/glusterd/hooks/1/stop/pre/S30samba-stop.sh saved as /var/lib/glusterd/hooks/1/stop/pre/K30samba-stop.sh.rpmsave
warning: /var/lib/glusterd/hooks/1/start/post/S30samba-start.sh saved as /var/lib/glusterd/hooks/1/start/post/K30samba-start.sh.rpmsave
warning: /var/lib/glusterd/hooks/1/start/post/S29CTDBsetup.sh saved as /var/lib/glusterd/hooks/1/start/post/K29CTDBsetup.sh.rpmsave


[root@vm13 1]# pwd
/var/lib/glusterd/hooks/1
[root@vm13 1]# find ./* -name "*.rpmsave"
./set/post/K30samba-set.sh.rpmsave
./start/post/K29CTDBsetup.sh.rpmsave
./start/post/K30samba-start.sh.rpmsave
./stop/pre/K29CTDB-teardown.sh.rpmsave
./stop/pre/K30samba-stop.sh.rpmsave
-----------

However, if we list the gluster hooks from the UI, these hooks are also getting listed. 

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

[root@vm08 /]# rpm -qa |grep rhsc
rhsc-webadmin-portal-2.1.2-0.21.beta1.el6_4.noarch
rhsc-lib-2.1.2-0.21.beta1.el6_4.noarch
rhsc-log-collector-2.1.2.0-0.1.el6rhs.noarch
rhsc-branding-rhs-3.3.0-1.0.master.201309200500.fc18.noarch
rhsc-dbscripts-2.1.2-0.21.beta1.el6_4.noarch
rhsc-2.1.2-0.21.beta1.el6_4.noarch
rhsc-cli-2.1.0.0-0.bb3a.el6rhs.noarch
rhsc-backend-2.1.2-0.21.beta1.el6_4.noarch
rhsc-setup-2.1.2-0.21.beta1.el6_4.noarch
rhsc-sdk-python-2.1.2.0-0.1.el6rhs.noarch
rhsc-restapi-2.1.2-0.21.beta1.el6_4.noarch
rhsc-tools-2.1.2-0.21.beta1.el6_4.noarch

vdsm-4.13.0-19.gitc2a87f5.el6rhs.x86_64

glusterfs-3.4.0.35.1u2rhs-1


How reproducible: Always


Steps to Reproduce:
1. Install cb5 build as per http://rhsm.pad.engineering.redhat.com/rhsc-build-cb5?
2. Add a host to the cluster
3. Click on "Sync" under Clusters --> GlusterHooks

Actual results: All the ".rpmsave" hooks are also getting listed along with the other hooks. 


Expected results: If this is not the expected behaviour, we need to have a method to filter it from the UI.


Additional info: screenshot attached
Comment 2 Aravinda VK 2013-10-24 06:13:18 EDT
Looks like after upgrade all the old hooks will be disabled by adding prefix "K" instead of "S". 

Need info for the following.
1. Are their any new hooks installed with the same name(original name, Samba related)?
2. If you have any user defined hooks other than pre installed hooks like Samba, will upgrade changes those hooks into *.rpmsave?


If these hooks are listed under disabled hooks then it is the expected behavior from RHSC. We will have to check with glusterfs team about the upgrade behavior and users hooks.
Comment 3 Dusmant 2013-10-25 02:57:30 EDT
It might require a GlusterFS fix... in that case, this bug would move out of Corbett.
Comment 4 Aravinda VK 2013-11-06 01:50:28 EST
Dusmant, If glusterfs is ignoring these files from executing then we need to take care in vdsm else it is not a bug.

Hi KP,

Does glusterfs ignores .rpmsave files(and other backup files) inside hooks directory while executing hook scripts.
Comment 5 krishnan parthasarathi 2013-11-06 04:18:10 EST
Aravinda,
glusterd doesn't understand if a file is backedup by yum/rpm in the form of .rpmsave. It treats .rpmsave suffixed file the same way it treats 'regular' files.
Hope that helps.
Comment 6 Aravinda VK 2013-11-06 04:36:29 EST
Thanks KP,

Closing this bug as it is expected behavior from RHSC to list all the hooks present in glusterfs hooks directory.

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