Bug 1422499

Summary: Explicitly use version 3 of the oVirt API
Product: Red Hat Enterprise Linux 7 Reporter: Irina Petrova <ipetrova>
Component: fence-agentsAssignee: Oyvind Albrigtsen <oalbrigt>
Status: CLOSED ERRATA QA Contact: cluster-qe <cluster-qe>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.3CC: cluster-maint, juan.hernandez, mjuricek, molasaga, nicolas, sbradley, ykaul
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: fence-agents-4.0.11-56.el7 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-08-01 16:10:32 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:
Embargoed:

Description Irina Petrova 2017-02-15 12:33:32 UTC
Description of problem:

Version on 4 of the oVirt engine will support two versions of the API:
version 3, which will be backwards compatible with older versions of the
engine, and version 4, which won't be compatible. The default used by the
server will be version 4, but clients can explicitly request a version
of the API using the "Version" header or the "/v3" URL prefix. The
header is the preferred mechanism because it is just ignored by older
versions of the server. This patch modifies the oVirt fence agent so
that the path and version of the API are configuratble, and so that
their default values work correctly with version 3 compatibility mode of
the API.

From upstream patch:
https://github.com/ClusterLabs/fence-agents/pull/71


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

In one particular case fencing doesn't work with 4.0.11-47.el7_3.2 in RHEV 3.6:

Upgrading the fence-agents to 4.0.11-47.el7_3.2 breaks fencing, and downgrading it back to 4.0.11-27.el7_2.7 fixes it.
~~~
fence-agents-rhevm-4.0.11-27.el7_2.7 -- working
fence-agents-rhevm-4.0.11-47.el7_3.2 -- not working
~~~


Additional info:

We did a diff of the two versions [1] and we found out that in the new version we have a hard-coded api path (i.e. /api/) which is not backwards-compatible with RHEV 3.x:
~~~
84,87d82
<   if opt.has_key("--api-path"):
<       api_path = opt["--api-path"]
<   else:
<       api_path = "/ovirt-engine/api"
89c84
<   url += "//" + opt["--ip"] + ":" + str(opt["--ipport"]) + api_path + "/" + command
---
>   url += "//" + opt["--ip"] + ":" + str(opt["--ipport"]) + "/api/" + command
~~~

The problem seems to be resolved upstream already:
https://github.com/ClusterLabs/fence-agents/pull/71/files

Can we get (rebase/cherry pick) the patch to the RH fence driver as well?


[1] http://pastebin.com/cSnMsryp

Comment 4 Oyvind Albrigtsen 2017-03-17 15:52:18 UTC
https://github.com/ClusterLabs/fence-agents/pull/114

Comment 6 Oyvind Albrigtsen 2017-04-26 14:58:05 UTC
*** Bug 1402860 has been marked as a duplicate of this bug. ***

Comment 7 Oyvind Albrigtsen 2017-04-26 15:05:35 UTC
*** Bug 1423881 has been marked as a duplicate of this bug. ***

Comment 9 Marek Grac 2017-07-07 13:18:41 UTC
*** Bug 1468556 has been marked as a duplicate of this bug. ***

Comment 10 errata-xmlrpc 2017-08-01 16:10:32 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.

https://access.redhat.com/errata/RHBA-2017:1874