Bug 489799 - libvirt "missing source" error message overwritten by "failed to build sexpr" error
Summary: libvirt "missing source" error message overwritten by "failed to build sexpr"...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Virtualization Tools
Classification: Community
Component: libvirt
Version: unspecified
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Daniel Veillard
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-03-11 21:36 UTC by Pasi Karkkainen
Modified: 2010-03-16 17:18 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-06-04 10:58:00 UTC
Embargoed:


Attachments (Terms of Use)
fedora-10-virt-install-xml-error.txt (4.59 KB, text/plain)
2009-03-11 21:36 UTC, Pasi Karkkainen
no flags Details
fedora-10-virt-install-libvirtd-crash.txt (3.39 KB, text/plain)
2009-03-23 21:32 UTC, Pasi Karkkainen
no flags Details
Fix error reporting for missing network (1.89 KB, patch)
2009-03-31 15:39 UTC, Daniel Berrangé
no flags Details | Diff

Description Pasi Karkkainen 2009-03-11 21:36:47 UTC
Created attachment 334865 [details]
fedora-10-virt-install-xml-error.txt

Description of problem:
Installation of Fedora 10 Xen domU with virt-install fails with XML description for failed to build sexpr error.

Version-Release number of selected component (if applicable):
python-virtinst-0.400.0-5.fc10.noarch

How reproducible:
Always.

Steps to Reproduce:
1. run virt-install like this:
virt-install --debug -n vm01 -r 512 --vcpus=1 -f /dev/vg00/vm01 --vnc -p -l "ftp://ftp.funet.fi/pub/mirrors/fedora.redhat.com/pub/fedora/linux/releases/10/Fedora/i386/os"
  
Actual results:
Installation fails with error. domU is not started.

"libvirtError: XML description for failed to build sexpr is not well formed or invalid"

Log of virt-install output/errors:
http://pasik.reaktio.net/xen/fedora/fedora-10-virt-install-xml-error.txt

Also attached to this bugreport.


Expected results:
successful install of Fedora 10.

Additional info:
I'm using rawhide/F11 Xen 3.3.1-9 packages, rebuilt and installed on Fedora 10.
I'm also using/testing custom Linux 2.6.29-rc7 pv_ops dom0 kernel.

I'm using x86 32bit PAE Xen hypervisor and dom0 kernel.

[root@dom0test ~]# uname -a
Linux dom0test.localdomain 2.6.29-rc7-tip #14 SMP Wed Mar 11 23:01:38 EET 2009 i686 i686 i386 GNU/Linux

[root@dom0test ~]# xm info
host                   : dom0test.localdomain
release                : 2.6.29-rc7-tip
version                : #14 SMP Wed Mar 11 23:01:38 EET 2009
machine                : i686
nr_cpus                : 2
nr_nodes               : 1
cores_per_socket       : 1
threads_per_core       : 2
cpu_mhz                : 3000
hw_caps                : bfebfbff:00000000:00000000:00000180:0000441d:00000000:00000000:00000000
virt_caps              : 
total_memory           : 2038
free_memory            : 992
node_to_cpu            : node0:0-1
node_to_memory         : node0:992
xen_major              : 3
xen_minor              : 3
xen_extra              : .1-9.fc10
xen_caps               : xen-3.0-x86_32p 
xen_scheduler          : credit
xen_pagesize           : 4096
platform_params        : virt_start=0xf5800000
xen_changeset          : unavailable
cc_compiler            : gcc version 4.3.2 20081105 (Red Hat 4.3.2-7) (GCC)
cc_compile_by          : root
cc_compile_domain      : localdomain
cc_compile_date        : Fri Mar  6 17:24:19 EET 2009
xend_config_format     : 4

[root@dom0test ~]# virsh capabilities
<capabilities>

  <host>
    <cpu>
      <arch>i686</arch>
      <features>
        <pae/>
      </features>
    </cpu>
    <migration_features>
      <live/>
      <uri_transports>
        <uri_transport>xenmigr</uri_transport>
      </uri_transports>
    </migration_features>
    <topology>
      <cells num='1'>
        <cell id='0'>
          <cpus num='2'>
            <cpu id='0'/>
            <cpu id='1'/>
          </cpus>  
        </cell>
      </cells>
    </topology>
  </host>

  <guest>
    <os_type>xen</os_type>
    <arch name='i686'>
      <wordsize>32</wordsize>
      <emulator>/usr/lib/xen/bin/qemu-dm</emulator>
      <machine>xenpv</machine>
      <domain type='xen'>
      </domain>
    </arch>
    <features>
      <pae/>
    </features>
  </guest>

</capabilities>

Comment 1 Daniel Berrangé 2009-03-12 09:58:11 UTC
This bit of the logs is interesting..

Wed, 11 Mar 2009 21:58:52 WARNING  Non-error from libvirt: 'Failed to find the network: Is the daemon running ?'


Do you have the libvirtd daemon running on this machine ? (eg do   service libvirtd start)

Comment 2 Pasi Karkkainen 2009-03-21 20:32:22 UTC
Sorry for the delay.. I was away for a while. 

It seems libvirtd had crashed.. there was a segfault from libvirtd in /var/log/messages. This segfault could be a problem of pv_ops dom0 kernel, and not libvirtd itself.. 

I'll have to do some more testing and report back here.

Comment 3 Pasi Karkkainen 2009-03-23 20:38:04 UTC
Ok, now I did more testing.

This "XML description for failed to build sexpr error" happens when libvirtd is not running and you run virt-install.

When I created this bz libvirtd was not running because it had unexpectedly crashed with segfault.. which I believe was because of pv_ops dom0 kernel CONFIG_HIGHPTE bug on 32bit machines. So no need worry about that segfault.. I think.

Should that error message be fixed to say 'libvirtd is not running, cannot continue' instead of giving pretty mysterious error? :)

Comment 4 Pasi Karkkainen 2009-03-23 20:56:00 UTC
Hmm.. actually now it crashed again:

/var/log/messages:

Mar 23 22:48:55 dom0test kernel: libvirtd[2790]: segfault at 62696c00 ip b7e746f5 sp bfa5fd10 error 4 in libvirt.so.0.5.1[b7e1b000+98000]

Comment 5 Pasi Karkkainen 2009-03-23 21:31:52 UTC
gdb traceback from libvirtd crash available here:
http://pasik.reaktio.net/xen/fedora/fedora-10-virt-install-libvirtd-crash.txt

Also attached to this bz. 

It seems to happen when I hit CTRL+C during virt-install execution..

Is that likely caused by (buggy) pv_ops dom0 kernel, or a bug in libvirtd?

Comment 6 Pasi Karkkainen 2009-03-23 21:32:34 UTC
Created attachment 336389 [details]
fedora-10-virt-install-libvirtd-crash.txt

Comment 7 Pasi Karkkainen 2009-03-24 18:06:38 UTC
So yeah.. should I create a separate bz about that libvirtd crash issue? 

About the original problem in this bz: Would be a good idea to fix the error message to say clearly that libvirtd is not running, instead of giving mysterious "XML description for failed to build sexpr error"..

Comment 8 Pasi Karkkainen 2009-03-24 18:07:23 UTC
And also, should I be testing pv_ops dom0 stuff with rawhide instead of F10? :)

Comment 9 Daniel Berrangé 2009-03-24 18:12:12 UTC
Yeah F11 would be nicer, but failing that, at least update to the 0.6.1  libvirt build available in F10 updates-testing, whch may well fix the crash you see

Comment 10 Pasi Karkkainen 2009-03-24 18:41:52 UTC
I just upgraded libvirt stuff to 0.6.1 on my F10 dom0 testbox and it fixed a lot of the problems I had!

libvirtd doesn't seem to crash anymore. 

AND earlier I had some problems with virt-install stalling instead of opening a console for F10 domU installer.. That works now aswell! 

Now I've been able to run CentOS 5.3 PV domU and Fedora 10 PV domU on Fedora 10 pv_ops 2.6.29-rc8 dom0 :) Installing PV domU with virt-install seems to work also.

Thanks!

The PID file problem with libvirtd is still there though with 0.6.1:

[root@dom0test ~]# /etc/init.d/libvirtd start
Starting libvirtd daemon:                                  [  OK  ]

When in reality it said:

error : Failed to open pid file '/var/run/libvirtd.pid' : File exists

and didn't start.

Comment 11 Pasi Karkkainen 2009-03-24 19:06:43 UTC
But yeah, there's another bz about that libvirtd PID issue:
https://bugzilla.redhat.com/show_bug.cgi?id=491766

The original problem of this bz still remains though.. so I guess this bz still has to be open:

if libvirtd is not running print error about it; otherwise virt-install will fail later with "XML description for failed to build sexpr" error.

Comment 12 Daniel Berrangé 2009-03-24 19:18:10 UTC
virt-install doesn't need to print anything in particular.

The problem is in the libvirt Xen driver & the way it converts the XML -> SEXPR. If the daemon is missing, it can't turn this bit:

    <interface type='network'>
      <source network='default'/>
      <mac address='00:16:36:55:e7:dd'/>
    </interface>


into a bridge name required by XenD. It reports a nice error about this that clearly explains the problem....

....unfortunately it then overwrites this useful error with the useless message

"XML description for failed to build sexpr

so we need to fix libvirt Xen driver.

Comment 13 Mark McLoughlin 2009-03-25 15:40:05 UTC
Okay, updated the title to reflect the error overwriting problem

Moving to upstream libvirt bugzilla, since it's not a huge issue for Fedora

Comment 14 Daniel Berrangé 2009-03-31 15:39:40 UTC
Created attachment 337324 [details]
Fix error reporting for missing network

Posted fix upstream

http://www.redhat.com/archives/libvir-list/2009-March/msg00506.html

Comment 15 Daniel Berrangé 2009-06-04 10:58:00 UTC
Addressed in the 0.6.3 release


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