Bugzilla will be upgraded to version 5.0 on a still to be determined date in the near future. The original upgrade date has been delayed.
Bug 604852 - when on_crash is set to "coredump-restart", virsh and libvirt API complain unknown lifecycle type and some functions no longer work
when on_crash is set to "coredump-restart", virsh and libvirt API complain un...
Status: CLOSED CURRENTRELEASE
Product: Virtualization Tools
Classification: Community
Component: libvirt (Show other bugs)
unspecified
All Linux
low Severity high
: ---
: ---
Assigned To: Libvirt Maintainers
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2010-06-16 16:39 EDT by Tom
Modified: 2015-07-28 10:33 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-07-28 10:33:24 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Tom 2010-06-16 16:39:22 EDT
Description of problem:

After we edited Xen configuration file for a VM to dump core when the VM crashes, we noticed that some virsh commands, such as "virsh dumpxml" or "virsh console", start to display following errors and cannot work properly.

# virsh dumpxml linuxvm
error: internal error unknown lifecycle type coredump-restart

We observed this problem in libvirt-0.7.6-1. We believe other versions should have similiar issue. 


How reproducible:


Steps to Reproduce:
1. create a PV VM named "linuxvm"
2. edit /etc/xen/linuxvm by adding following line
  on_crash = "coredump-restart"
3. execute "xm create linuxvm" to recreate the VM.
4. after linux started, run following command,
   # virsh dumpxml linuxm
  
Actual results:

error: internal error unknown lifecycle type coredump-restart

Expected results:

'dumpxml' should display xml on the screen as expected.

Additional info:

Besides "dumpxml", we also noticed "console" doesn't work properly. We didn't test other command also we believe some other virsh command could be affected, too. Also, seems like some underlying libvirt API is broken by this as well. 

Is there any workaround solution for this problem?
Comment 1 Tom 2010-06-17 09:17:26 EDT
There is a workaround for this problem. Set the on_crash="preserve" for a VM. After the VM crashed, a coredump will be generated automatically and the VM will be kept and its status will be "crashed". A deamon process can be used to detect this status and then restart it. 

(In reply to comment #0)

> Description of problem:
> After we edited Xen configuration file for a VM to dump core when the VM
> crashes, we noticed that some virsh commands, such as "virsh dumpxml" or "virsh
> console", start to display following errors and cannot work properly.
> # virsh dumpxml linuxvm
> error: internal error unknown lifecycle type coredump-restart
> We observed this problem in libvirt-0.7.6-1. We believe other versions should
> have similiar issue. 
> How reproducible:
> Steps to Reproduce:
> 1. create a PV VM named "linuxvm"
> 2. edit /etc/xen/linuxvm by adding following line
>   on_crash = "coredump-restart"
> 3. execute "xm create linuxvm" to recreate the VM.
> 4. after linux started, run following command,
>    # virsh dumpxml linuxm
> Actual results:
> error: internal error unknown lifecycle type coredump-restart
> Expected results:
> 'dumpxml' should display xml on the screen as expected.
> Additional info:
> Besides "dumpxml", we also noticed "console" doesn't work properly. We didn't
> test other command also we believe some other virsh command could be affected,
> too. Also, seems like some underlying libvirt API is broken by this as well. 
> Is there any workaround solution for this problem?
Comment 2 Ján Tomko 2015-07-28 10:33:24 EDT
Fixed upstream by:
commit b9c10268e14b5f6a8a405813406964ccade67fcb
Author:     Jim Fehlig <jfehlig@novell.com>
AuthorDate: 2010-08-12 11:15:44 -0600
Commit:     Eric Blake <eblake@redhat.com>
CommitDate: 2010-08-20 15:06:30 -0600

    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.

git describe: v0.8.3-65-gb9c1026 contains: v0.8.4~62

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