Bug 1506191 - Can not get fence status from REST API
Summary: Can not get fence status from REST API
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: ovirt-engine
Classification: oVirt
Component: BLL.Infra
Version: 4.2.0
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ovirt-4.1.8
: ---
Assignee: Eli Mesika
QA Contact: Petr Matyáš
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-10-25 11:23 UTC by Eli Mesika
Modified: 2017-12-11 16:30 UTC (History)
4 users (show)

Fixed In Version: ovirt-engine-4.1.8
Clone Of:
Environment:
Last Closed: 2017-12-11 16:30:58 UTC
oVirt Team: Infra
Embargoed:
rule-engine: ovirt-4.1+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 83175 0 master MERGED core: fix of getting fence status from API 2017-10-25 18:08:31 UTC
oVirt gerrit 83344 0 ovirt-engine-4.1 MERGED core: fix of getting fence status from API 2017-11-05 10:03:35 UTC

Description Eli Mesika 2017-10-25 11:23:04 UTC
Description of problem:

Can not get fence status from REST API


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


How reproducible:


Steps to Reproduce:
1. Add two hosts to a cluster 
2. Define PM for one of them 
3.  curl -v -u "<user>@<domain>:<password>" -H "Content-type: application/xml" --insecure -X POST http://<engine-url>/ovirt-engine/api/hosts/<host-with-pm-uuid>/fence -d "<action><fence_type>status</fence_type></action>"

Actual results:

 TCP_NODELAY set
* Connected to laptop.emesika.com (127.0.0.1) port 8080 (#0)
* Server auth using Basic with user 'admin@internal'
> POST /ovirt-engine/api/hosts/9c550a04-47d9-4c53-a53d-66b73f9a0628/fence HTTP/1.1
> Host: laptop.emesika.com:8080
> Authorization: Basic YWRtaW5AaW50ZXJuYWw6YQ==
> User-Agent: curl/7.51.0
> Accept: */*
> Content-type: application/xml
> Content-Length: 48
> 
* upload completely sent off: 48 out of 48 bytes


< HTTP/1.1 404 Not Found
< Connection: keep-alive
< Content-Type: application/xml;charset=UTF-8
< Content-Length: 187
< Correlation-Id: 111176d8-55c3-4fa4-a312-764e484ed950
< Date: Wed, 25 Oct 2017 10:29:40 GMT
< 
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<fault>
    <detail>Entity not found: 9c550a04-47d9-4c53-a53d-66b73f9a0628</detail>
    <reason>Operation Failed</reason>
</fault>


Expected results:

* TCP_NODELAY set
* Connected to laptop.emesika.com (127.0.0.1) port 8080 (#0)
* Server auth using Basic with user 'admin@internal'
> POST /ovirt-engine/api/hosts/9c550a04-47d9-4c53-a53d-66b73f9a0628/fence HTTP/1.1
> Host: laptop.emesika.com:8080
> Authorization: Basic YWRtaW5AaW50ZXJuYWw6YQ==
> User-Agent: curl/7.51.0
> Accept: */*
> Content-type: application/xml
> Content-Length: 48
> 
* upload completely sent off: 48 out of 48 bytes
< HTTP/1.1 200 OK
< Connection: keep-alive
< Content-Type: application/xml;charset=UTF-8
< Content-Length: 216
< Correlation-Id: 4a06ca86-46d4-43fc-980b-ffc06f3fc1b5
< Date: Wed, 25 Oct 2017 11:11:12 GMT
< 
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<action>
    <fence_type>status</fence_type>
    <power_management>
        <status>on</status>
    </power_management>
    <status>complete</status>
</action>


Additional info:

Comment 1 Petr Matyáš 2017-11-16 16:27:01 UTC
Verified on ovirt-engine-4.1.8-0.1.el7.noarch


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