Bug 1033772 - REST: unable to resolve hook content conflict by copying from another host
Summary: REST: unable to resolve hook content conflict by copying from another host
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Gluster Storage
Classification: Red Hat
Component: rhsc-sdk
Version: 2.1
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ---
: RHGS 2.1.2
Assignee: Shubhendu Tripathi
QA Contact: Dustin Tsang
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-11-22 20:30 UTC by Dustin Tsang
Modified: 2015-07-13 04:39 UTC (History)
10 users (show)

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.
Clone Of:
Environment:
Last Closed: 2014-02-25 08:05:29 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2014:0208 0 normal SHIPPED_LIVE Red Hat Storage 2.1 enhancement and bug fix update #2 2014-02-25 12:20:30 UTC
oVirt gerrit 21773 0 None None None Never

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


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