Bug 1033772

Summary: REST: unable to resolve hook content conflict by copying from another host
Product: Red Hat Gluster Storage Reporter: Dustin Tsang <dtsang>
Component: rhsc-sdkAssignee: Shubhendu Tripathi <shtripat>
Status: CLOSED ERRATA QA Contact: Dustin Tsang <dtsang>
Severity: high Docs Contact:
Priority: high    
Version: 2.1CC: dpati, knarra, mmahoney, mmccune, pprakash, rhs-bugs, sabose, sharne, shtripat, ssampat
Target Milestone: ---Keywords: ZStream
Target Release: RHGS 2.1.2   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: cb11 Doc Type: Bug Fix
Doc Text:
Previously, resolving hook content conflict by copying hook content from another host was failing. Now, the correct hook content is copied and resolving hook content conflict is successful.
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-02-25 08:05:29 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:

Description Dustin Tsang 2013-11-22 20:30:58 UTC
Description of problem:

unable to resolve a hook's content conflict by copying from another host.
When copying from another host,instead of copying the host version to all other hosts, rhsc actually copies the engine version to all hosts.

This is using the transaction to resolve hook content conflict:

POST /api/clusters/:clusterid/glusterhooks/:hookid/resolve
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>                                               
<action>
    <resolution_type>COPY</resolution_type>
    <host.id>${id}</host.id>
</action>

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

How reproducible:
100%

Steps to Reproduce:
0. 2 node cluster created
1. create an hook script on each host with the content "engine copy"
2. sync the hook with engine via gui
3. change the contents of hook on each node, so that the contents of each hook script is distinct from the engine and the other node.
4. sync the scripts
=> content conflict for script flagged by engine
5. resolve by copying from one of the nodes

Actual results:
 
The hook script has been replaced with the contents from step 1,
"engine copy".

Expected results:
the hooks content for each node should be the same
the hooks content should not be the contents from step 1.
the hooks content for each node should have the contents of the node selected in step 5, before executing step 5.


Additional info:

Comment 2 Sahina Bose 2013-12-12 05:22:23 UTC
Use the following parameters for resolving by copying from host:
    <action>
        <resolution_type>COPY</resolution_type>
        <host id="<Host-Id>"/>
    </action>
    or
    <action>
        <resolution_type>COPY</resolution_type>
        <host>
            <name>Host-Name</name>
        </host>
    </action>

Comment 3 Dustin Tsang 2013-12-13 22:07:39 UTC
verified fix in rhsc-cb11

Comment 4 Shalaka 2014-01-21 08:40:42 UTC
Please review the edited DocText and signoff.

Comment 5 Shubhendu Tripathi 2014-01-21 08:54:41 UTC
The correct comment would be -

"Previously, resolving hook content conflict by copying hook content from another host was not working properly and always engine copy was getting copied. Now, the correct hook content from the selected host is copied and resolving hook content conflict is successful."

Comment 7 errata-xmlrpc 2014-02-25 08:05:29 UTC
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/RHEA-2014-0208.html