Add actions to virDomainLifecycle enum

Xen supports on_crash actions coredump-{destroy,restart}.  libvirt
cannot parse config returned by xend that contains either of these
actions

xen52 # xm li -l test | grep on_crash
    (on_crash coredump-restart)
xen52 # virsh dumpxml test
error: internal error unknown lifecycle type coredump-restart

This patch adds a new virDomainLifecycleCrash enum and appends
the new options to existing destroy, restart, preserve, and
rename-restart options.
This commit is contained in:
Jim Fehlig
2010-08-20 15:06:30 -06:00
committed by Eric Blake
parent 7fb3435186
commit b9c10268e1
8 changed files with 106 additions and 28 deletions
+15
View File
@@ -366,6 +366,21 @@
a new name</dd>
</dl>
<p>
on_crash supports these additional
actions <span class="since">since 0.8.4</span>.
</p>
<dl>
<dt><code>coredump-destroy</code></dt>
<dd>The crashed domain's core will be dumped, and then the
domain will be terminated completely and all resources
released</dd>
<dt><code>coredump-restart</code></dt>
<dd>The crashed domain's core will be dumped, and then the
domain will be restarted with the same configuration</dd>
</dl>
<h3><a name="elementsFeatures">Hypervisor features</a></h3>
<p>
+24 -1
View File
@@ -1177,7 +1177,7 @@
</optional>
<optional>
<element name="on_crash">
<ref name="offOptions"/>
<ref name="crashOptions"/>
</element>
</optional>
</interleave>
@@ -1198,6 +1198,29 @@
<value>rename-restart</value>
</choice>
</define>
<!--
Options when a domain crashes:
destroy: The domain is cleaned up
restart: A new domain is started in place of the old one
preserve: The domain will remain in memory until it is destroyed manually
rename-restart: a variant of the previous one but where the old domain is
renamed before being saved to allow a restart
coredump-destroy: The crashed domain's core will be dumped, and then the
domain will be terminated completely and all resources
released
coredump-restart: The crashed domain's core will be dumped, and then the
domain will be restarted with the same configuration
-->
<define name="crashOptions">
<choice>
<value>destroy</value>
<value>restart</value>
<value>preserve</value>
<value>rename-restart</value>
<value>coredump-destroy</value>
<value>coredump-restart</value>
</choice>
</define>
<!--
Specific setup for a qemu emulated character device. Note: this
definition doesn't fully specify the constraints on this node.