• R/O
  • SSH

pm_kvm_tools: Commit

※ リポジトリは、https://github.com/linux-ha-japan/pm_kvm_tools-1.0 へ移行しました。
仮想環境監視連携機能とSTONITH機能。KVM版。


Commit MetaInfo

Revisioned8d6a5401fe7721899f9b5cc5f5d2702c8f5ce8 (tree)
Time2012-11-08 11:45:09
AuthorKazunori INOUE <inouekazu@inte...>
CommiterKazunori INOUE

Log Message

Med: VirtualDomain: honor virsh "in shutdown" state
Using libvirt 0.9.8 / qemu 1.0 / kvm from kernel 3.2.0,
"virsh list" briefly shows the virtual maschine in a
"in shutdown" state during a regular "virsh shutdown"
operation:
Id Name State
----------------------------------
5 testvm1 running
6 testvm2 running
...
5 testvm1 running
5 testvm1 running
...
5 testvm1 in shutdown
5 testvm1 in shutdown
...
- testvm1 shut off
- testvm1 shut off
...
The VirtualDomain resource agent does not recognize this
state and thus issues a "virsh destroy" command.
This patch correctly handles "in shutdown" as a "this virtual
machine is still running" state.
See also: libvirt's tools/virsh.c:
static const char * vshDomainStateToString(int state)

Change Summary

Incremental Difference

diff -r 20a37f9988a7 -r ed8d6a5401fe resources/VirtualDomain
--- a/resources/VirtualDomain Wed Nov 07 08:03:58 2012 +0900
+++ b/resources/VirtualDomain Thu Nov 08 11:45:09 2012 +0900
@@ -166,11 +166,12 @@
166166 ocf_log debug "Virtual domain $DOMAIN_NAME is currently $status."
167167 rc=$OCF_NOT_RUNNING
168168 ;;
169- running|paused|idle|blocked)
169+ running|paused|idle|blocked|"in shutdown")
170170 # running: domain is currently actively consuming cycles
171171 # paused: domain is paused (suspended)
172172 # idle: domain is running but idle
173173 # blocked: synonym for idle used by legacy Xen versions
174+ # in shutdown: the domain is in process of shutting down, but has not completely shutdown or crashed.
174175 ocf_log debug "Virtual domain $DOMAIN_NAME is currently $status."
175176 rc=$OCF_SUCCESS
176177 ;;
Show on old repository browser