Bug 1446474

Summary: fence_rhevm unable to communicate with oVirt 4.1.1 (request to backport bug 1287059 to RHEL 6.x)
Product: Red Hat Enterprise Linux 6 Reporter: Gianluca Cecchi <gianluca.cecchi>
Component: fence-agentsAssignee: Oyvind Albrigtsen <oalbrigt>
Status: CLOSED CURRENTRELEASE QA Contact: cluster-qe <cluster-qe>
Severity: urgent Docs Contact:
Priority: urgent    
Version: 6.9CC: aherr, cfeist, cluster-maint, jruemker, mjuricek, oalbrigt, pvarma, rbalakri, rdave, toneata, ykaul
Target Milestone: rcKeywords: ZStream
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: fence-agents-4.0.15-15.el6 Doc Type: If docs needed, set a value
Doc Text:
Previously, the fence_rhevm utility was not able to request a compatible version of the Red Hat Virtualization (RHV) API due to a hard-coded value in fence_rhevm. Consequently, fence_rhevm failed to fence nodes in a cluster of RHV virtual machines (VMs) and displayed the "Failed: Unable to obtain correct plug status or plug is not available" error message. With this update, the hard-coded value has been changed into a variable, and as a result, the described problem no longer occurs.
Story Points: ---
Clone Of:
: 1506694 1506695 (view as bug list) Environment:
Last Closed: 2018-06-21 08:44:33 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:
Bug Depends On:    
Bug Blocks: 1493755, 1506694, 1506695    

Description Gianluca Cecchi 2017-04-28 07:28:39 UTC
Description of problem:
I have an oVirt 4.1.1 environment and I'm configuring an rhcs virtual cluster inside it, currently in version 6.8 with fence-agents-4.0.15-12.el6.x86_64 and the related fence_rhevm agent.
It seems is not able to communicate wit the engine to operate fencing operations

Version-Release number of selected component (if applicable):
fence-agents-4.0.15-12.el6.x86_64
but tested also with latest release that is the same in terms of configuration:
fence-agents-4.0.15-13.el6.x86_64.rpm 

How reproducible:
always

Steps to Reproduce:
1. try the fence command to get status
fence_rhevm -a 10.4.192.43 -l "admin@internal" -p "mypassword" -z --shell-timeout=20 --power-wait=10 -v -o status -n p2vorasvi1
vms/?search=name%3Dp2vorasvi1


2.

3.

Actual results:
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>404 Not Found</title>
</head><body>
<h1>Not Found</h1>
<p>The requested URL /api/vms/ was not found on this server.</p>
</body></html>


Failed: Unable to obtain correct plug status or plug is not available


Expected results:
Messga eof type:
STATUS: ON

Additional info:

Tried also to change the call so that it looks like:
# diff fence_rhevm fence_rhevm.orig 
84c84
< 	url += "//" + opt["--ip"] + ":" + str(opt["--ipport"]) + "/ovirt-engine/api/" + command
---
> 	url += "//" + opt["--ip"] + ":" + str(opt["--ipport"]) + "/api/" + command

And I get:
<html><head><title>Error</title></head><body>Unauthorized</body></html>

Failed: Unable to obtain correct plug status or plug is not available

Tried also this:

# diff fence_rhevm fence_rhevm.orig 
84c84
< 	url += "//" + opt["--ip"] + ":" + str(opt["--ipport"]) + "/ovirt-engine/api/v3/" + command
---
> 	url += "//" + opt["--ip"] + ":" + str(opt["--ipport"]) + "/api/" + command

but nothing change.
Then kinsly on oVirt user mailing listJuan Hernandez suggested to use the RH EL 7 fence_rhevm and indeed it works now

It seems related to bugzilla 1287059 and solved in fence-agents-4.0.11-47.el7 that has not been backported to RH EL 6.x yet.
Could you backport, please?

Comment 2 Gianluca Cecchi 2017-07-13 07:53:06 UTC
any update on this? It should not be difficult, as already verified that the el7 package works with rhel 6.x systems..
Thanks
Gianluca

Comment 4 John Ruemker 2017-10-24 14:01:58 UTC
Technically it is Bug #1422499 that is the relevant RHEL 7 report that matches this issue.  Bug #1287059 is for a different issue, however both were resolved by the same pull request upstream, so the distinction is not particularly important.  But for clarity: this bug is describing the problems with the API URL change in RHEV 4.x, which is #1422499.

The fix here is:

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