Bug 1022906 - RHS-C: Sync hooks is listing all the ".rpmsave" hooks as well
Summary: RHS-C: Sync hooks is listing all the ".rpmsave" hooks as well
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Gluster Storage
Classification: Red Hat Storage
Component: rhsc
Version: 2.1
Hardware: Unspecified
OS: Unspecified
medium
high
Target Milestone: ---
: RHGS 2.1.2
Assignee: Aravinda VK
QA Contact: Prasanth
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-10-24 09:09 UTC by Prasanth
Modified: 2015-05-13 16:28 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-11-06 09:36:29 UTC
Embargoed:


Attachments (Terms of Use)
screenshot (143.44 KB, image/png)
2013-10-24 09:09 UTC, Prasanth
no flags Details

Description Prasanth 2013-10-24 09:09:03 UTC
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 10:13:18 UTC
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 06:57:30 UTC
It might require a GlusterFS fix... in that case, this bug would move out of Corbett.

Comment 4 Aravinda VK 2013-11-06 06:50:28 UTC
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 09:18:10 UTC
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 09:36:29 UTC
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.