Bug 595383
| Summary: | Provide fence-rhev agent that uses the RHEV REST API | |||
|---|---|---|---|---|
| Product: | Red Hat Enterprise Linux 6 | Reporter: | Perry Myers <pmyers> | |
| Component: | fence-agents | Assignee: | Marek Grac <mgrac> | |
| Status: | CLOSED ERRATA | QA Contact: | Brandon Perkins <bperkins> | |
| Severity: | medium | Docs Contact: | ||
| Priority: | urgent | |||
| Version: | 6.0 | CC: | acathrow, apevec, cluster-maint, degts, djansa, djuran, eglynn, gjansen, jlabocki, jwest, liko, markmc, ssaha, tao | |
| Target Milestone: | rc | Keywords: | ZStream | |
| Target Release: | --- | |||
| Hardware: | All | |||
| OS: | Linux | |||
| Whiteboard: | ||||
| Fixed In Version: | fence-agents-3.0.12-9.el6 | Doc Type: | Bug Fix | |
| Doc Text: |
The package has been updated to provide a fencing agent that is able to communicate with Red Hat Enterprise Virtualization Manager, allowing virtual machines to be fenced.
|
Story Points: | --- | |
| Clone Of: | ||||
| : | 595385 (view as bug list) | Environment: | ||
| Last Closed: | 2011-05-19 14:21:16 UTC | Type: | --- | |
| 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: | 618705, 681669, 681674, 688267, 731161, 731166 | |||
| Bug Blocks: | 595385, 595456, 607640, 642695, 681652, 688396, 688400 | |||
|
Description
Perry Myers
2010-05-24 13:59:05 UTC
Simple example of using the REST API to stop a VM:
---
#!/bin/bash
VM_STOP_URI="vms/9/stop"
HOST="localhost"
PORT="8099"
BASE="/rhevm-api-mock/"
USER="Aladdin"
PASSWD="open sesame"
b64()
{
u="$1"; shift
p="$1"; shift
t=$(mktemp)
echo -n "$u:$p" > $t
base64 $t
rm -f $t
}
AUTH=$(b64 "$USER" "$PASSWD")
nc $HOST $PORT <<EOF
POST $BASE$VM_STOP_URI HTTP/1.1
Host: $HOST
Authorization: Basic $AUTH
Content-type: application/xml
Content-length: 9
<action/>
EOF
---
or if you use wget:
---
wget --header=Accept:application/xml --header=Content-Type:application/xml --http-user=$USER --http-password=$PASSWD --post-data="<action/>" http://$HOST:$PORT/$BASE$VM_STOP_URI
---
(In reply to comment #1) > Simple example of using the REST API to stop a VM: Fence agent needs to ensure machine is really down, would successful execution (200 response code I assume?) of this service guarantee that VM is really killed? Fence agents are only as reliable/good as the devices they connect to. We have the same issue for example with power fence devices. i.e. you connect to a power fence device and tell it to shut down the host. You have to trust that when the hardware device returns success that it told the truth. Now that being said, we usually do a combination of 'device off' and then 'status' to verify that the device did turn off. So we'll do the same for fence_rhev, calling 'power off vm' and waiting for status 200. And then calling 'status vm' to double check that the vm turned off. If the API lies to us... well, let's just make sure the API is functionally correct :) qa_ack+
Technical note added. If any revisions are required, please edit the "Technical Notes" field
accordingly. All revisions will be proofread by the Engineering Content Services team.
New Contents:
The package has been updated to provide a fencing agent that is able to communicate with Red Hat Enterprise Virtualization Manager, allowing virtual machines to be fenced.
*** Bug 548595 has been marked as a duplicate of this bug. *** An advisory has been issued which should help the problem described in this bug report. This report is therefore being closed with a resolution of ERRATA. For more information on therefore solution and/or where to find the updated files, please follow the link below. You may reopen this bug report if the solution does not work for you. http://rhn.redhat.com/errata/RHBA-2011-0745.html |