Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1506191

Summary: Can not get fence status from REST API
Product: [oVirt] ovirt-engine Reporter: Eli Mesika <emesika>
Component: BLL.InfraAssignee: Eli Mesika <emesika>
Status: CLOSED CURRENTRELEASE QA Contact: Petr Matyáš <pmatyas>
Severity: high Docs Contact:
Priority: unspecified    
Version: 4.2.0CC: bugs, lveyde, mperina, oourfali
Target Milestone: ovirt-4.1.8Flags: rule-engine: ovirt-4.1+
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: ovirt-engine-4.1.8 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-12-11 16:30:58 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Infra RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

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