<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Thu, Apr 27, 2017 at 4:58 PM, Gianluca Cecchi <span dir="ltr">&lt;<a href="mailto:gianluca.cecchi@gmail.com" target="_blank">gianluca.cecchi@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div><div class="gmail-h5"><div class="gmail_extra"><div class="gmail_quote">On Thu, Apr 27, 2017 at 4:43 PM, Gianluca Cecchi <span dir="ltr">&lt;<a href="mailto:gianluca.cecchi@gmail.com" target="_blank">gianluca.cecchi@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hello,<div>I&#39;m trying to use fence_rhevm in a CentOS 6.8 guest that is part of a virtual rhcs cluster</div><div><br></div><div>My sw version for fence_agents inside guest is fence-agents-4.0.15-12.el6.x86<wbr>_64 and I notice that for this particular agent nothing changes also using the latest available package fence-agents-4.0.15-13.el6.x86<wbr>_64.rpm apart</div><div><br></div><div><div>[root@p2vnorasvi1 ~]# diff fence_rhevm /usr/sbin/fence_rhevm</div><div>13c13</div><div>&lt; BUILD_DATE=&quot;(built Wed Mar 22 04:24:11 UTC 2017)&quot;</div><div>---</div><div>&gt; BUILD_DATE=&quot;(built Tue May 10 22:28:47 UTC 2016)&quot;</div><div>[root@p2vnorasvi1 ~]# </div></div><div><br></div><div>The VM name in oVirt 4.1.1 is p2vorasvi1</div><div><br></div><div>Running this command against the engine I get</div><div><br></div><div><div>[root@p2vnorasvi1 network-scripts]# fence_rhevm -a 10.4.192.43 -l &quot;admin@internal&quot; -p &quot;mypassword&quot; -z --shell-timeout=20 --power-wait=10 -v -o status -n p2vorasvi1</div><div>vms/?search=name%3Dp2vorasvi1</div><div><br></div><div>&lt;!DOCTYPE HTML PUBLIC &quot;-//IETF//DTD HTML 2.0//EN&quot;&gt;</div><div>&lt;html&gt;&lt;head&gt;</div><div>&lt;title&gt;404 Not Found&lt;/title&gt;</div><div>&lt;/head&gt;&lt;body&gt;</div><div>&lt;h1&gt;Not Found&lt;/h1&gt;</div><div>&lt;p&gt;The requested URL /api/vms/ was not found on this server.&lt;/p&gt;</div><div>&lt;/body&gt;&lt;/html&gt;</div><div><br></div><div><br></div><div>Failed: Unable to obtain correct plug status or plug is not available</div><div><br></div><div>Actually I get the same error even if I put a wrong password....</div><div><br></div></div><div>What am I missing...?</div><div>Do I have to specify DC/cluster if I have more than one, or other parameters?</div><div><br></div><div>Thanks,</div><div>Gianluca</div></div>
</blockquote></div><br></div><div class="gmail_extra"><br></div></div></div><div class="gmail_extra">If I change this in fence_rhevm</div><div class="gmail_extra"><br></div><div class="gmail_extra"><div class="gmail_extra">[root@p2vnorasvi1 sbin]# diff fence_rhevm fence_rhevm.orig </div><div class="gmail_extra">84c84</div><div class="gmail_extra">&lt; <span class="gmail-m_1165617795609213334gmail-Apple-tab-span" style="white-space:pre-wrap">        </span>url += &quot;//&quot; + opt[&quot;--ip&quot;] + &quot;:&quot; + str(opt[&quot;--ipport&quot;]) + &quot;/ovirt-engine/api/&quot; + command</div><div class="gmail_extra">---</div><div class="gmail_extra">&gt; <span class="gmail-m_1165617795609213334gmail-Apple-tab-span" style="white-space:pre-wrap">        </span>url += &quot;//&quot; + opt[&quot;--ip&quot;] + &quot;:&quot; + str(opt[&quot;--ipport&quot;]) + &quot;/api/&quot; + command</div><div><br></div><div>I now get 401 unauthorized....</div><div><br></div><div><div>[root@p2vnorasvi1 sbin]# fence_rhevm -a 10.4.192.43 -z -l &quot;admin@internal&quot; -p &quot;mypassword&quot;  --shell-timeout=20 --power-wait=10 -v -o status -n p2vorasvi1</div><div>vms/?search=name%3Dp2vorasvi1</div><div><br></div><div>&lt;html&gt;&lt;head&gt;&lt;title&gt;Error&lt;/<wbr>title&gt;&lt;/head&gt;&lt;body&gt;<wbr>Unauthorized&lt;/body&gt;&lt;/html&gt;</div><span class="gmail-"><div><br></div><div>Failed: Unable to obtain correct plug status or plug is not available</div><div><br></div><div><br></div></span><div>[root@p2vnorasvi1 sbin]# </div></div><div><br></div><div>and in engine ssl_access.log</div><div><br></div><div><div>127.0.0.1 - - [27/Apr/2017:16:51:55 +0200] &quot;POST /ovirt-engine/sso/oauth/token HTTP/1.1&quot; 200 153</div><div>10.4.168.91 - - [27/Apr/2017:16:51:55 +0200] &quot;GET /ovirt-engine/api/vms/?search=<wbr>name%3Dp2vorasvi2 HTTP/1.1&quot; 401 71</div></div></div></div>
</blockquote></div><br></div><div class="gmail_extra"><br></div><div class="gmail_extra">Tried also using v3 in url, this way:</div><div class="gmail_extra"><br></div><div class="gmail_extra"><div class="gmail_extra">[root@p2vnorasvi1 sbin]# diff fence_rhevm fence_rhevm.orig </div><div class="gmail_extra">84c84</div><div class="gmail_extra">&lt; <span class="gmail-Apple-tab-span" style="white-space:pre">        </span>url += &quot;//&quot; + opt[&quot;--ip&quot;] + &quot;:&quot; + str(opt[&quot;--ipport&quot;]) + &quot;/ovirt-engine/api/v3/&quot; + command</div><div class="gmail_extra">---</div><div class="gmail_extra">&gt; <span class="gmail-Apple-tab-span" style="white-space:pre">        </span>url += &quot;//&quot; + opt[&quot;--ip&quot;] + &quot;:&quot; + str(opt[&quot;--ipport&quot;]) + &quot;/api/&quot; + command</div><div class="gmail_extra">[root@p2vnorasvi1 sbin]# </div><div><br></div><div><div>[root@p2vnorasvi1 sbin]# fence_rhevm -a 10.4.192.43 -z -l &quot;admin@internal&quot; -p &quot;mypassword&quot;  --shell-timeout=20 --login-timeout=20 --power-wait=10 -v -o status -n p2vorasvi1</div><div>vms/?search=name%3Dp2vorasvi1</div><div><br></div><div>&lt;html&gt;&lt;head&gt;&lt;title&gt;Error&lt;/title&gt;&lt;/head&gt;&lt;body&gt;Unauthorized&lt;/body&gt;&lt;/html&gt;</div><div><br></div><div>Failed: Unable to obtain correct plug status or plug is not available</div><div><br></div><div><br></div><div>[root@p2vnorasvi1 sbin]# </div></div><div><br></div></div></div>