Hide Forgot
Description of problem: fence_rhevm REST-API URL needs to be updated to "/ovirt-engine/api/". Version-Release number of selected component (if applicable): fence-agents-common-4.0.11-27.el7_2.9.x86_64 How reproducible: Always Steps to Reproduce: 1.Run fence_rhevm commands. 2. 3. Actual results: Error saying /api does not exist. Expected results: Should work without issue. Additional info: After making changes in /usr/sbin/fence_rhevm it is working without issue. # diff /usr/sbin/fence_rhevm /usr/sbin/fence_rhevm.orig 84c84 < url += "//" + opt["--ip"] + ":" + str(opt["--ipport"]) + "/ovirt-engine/api/" + command --- > url += "//" + opt["--ip"] + ":" + str(opt["--ipport"]) + "/api/" + command
@Ameya: Thanks for a report and we will add the fix for the RHEV-M 4.0 but proposed patch will (probably) break existing deployment againt RHEV-M 3. So we have to find more generic solution @Juan: We plan to use your PR: https://github.com/ClusterLabs/fence-agents/pull/71/ but I'm not sure about change endpoint from /api to /ovirt-engine/api. According to documenation it looks like it should be enough to use /api + header 'version: 3'. Can you please confirm this?
*** This bug has been marked as a duplicate of bug 1287059 ***
Marek, in order to work with RHV 4 you need to use /ovirt-engine/api, as /api was removed. You also need to use the "Version: 3" header, as the agent isn't prepared to use version 4 of the API. The patch proposed by Ameya shold work with RHV 3, as unlike RHV 4 it supports both /api and /ovirt-engine/api. But it shoud *not* work with RHV 4. I am really surprised to see that it works. May it be that it was tested with RHV 3? I take the opportunity to remind you that in the future, probably in RHV 4.2, version 3 of the API will be removed, and then agent will need to use version 4 of the API. I'd suggest you start planning for that change. I'd also suggest that you consider using version 4 of the RVH Python SDK, instead of handling the HTTP details directly. You have documentation here: https://github.com/oVirt/ovirt-engine-sdk/tree/master/sdk https://github.com/oVirt/ovirt-engine-sdk/tree/master/sdk/examples
@Juan, so documentation that can be found also on: http://exes111.subrigo.net/ovirt-engine/docs/manual/en_US/pdf/REST_API_Guide/Red_Hat_Enterprise_Virtualization-REST_API_Guide.pdf is not valid? Section 3.1 - shows that /api + header should be enough. -- Are versions of ovirt-engine-sdk-python update in RHEL6/RHEL7 so we can use them without worrying about version changes?
Marek, that part of the documentation is wrong, it should say /ovirt-engine/api. The old /api path doesn't work with RHV 4. I opened bug 1391464 to track that. Note that the package I am suggesting is 'python-ovirt-engine-sdk4', that is the one that implements version 4 of the API. Currently we distribute it via the RHV channels, and only for RHEL7, but we can consider adding them to other channels, if that helps you.