Bug 212272

Summary: libxc does not propagate errors during domain creation back to XenD
Product: Red Hat Enterprise Linux 5 Reporter: Daniel Berrangé <berrange>
Component: xenAssignee: Daniel Berrangé <berrange>
Status: CLOSED ERRATA QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 5.0CC: xen-maint
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: RHEA-2007-0635 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2007-11-07 17:07:31 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:    
Bug Blocks: 213166, 216893    

Description Daniel Berrangé 2006-10-25 22:37:46 UTC
Description of problem:
The libxc library is used by XenD for creating guest domains. When a problem
occurs, it simply returns -1, sets errno to -EINVAL and does an printf to stderr
with the actual error message. This means that XenD does not get back any useful
information about the failure. In turn applications like virt-manager can not
give the user any useful info about what went wrong.

Version-Release number of selected component (if applicable):
xen-3.0.3-2.el5

How reproducible:
Always

Steps to Reproduce:
1. Try to create a VM using a non-PAE kernel on a PAE i686 hypervisor
2.
3.
  
Actual results:
Error message '-EINVAL'

Expected results:
Message about PAE mismatch in guest kernel

Additional info:

Another scenario where current lack of error reporting caused issues
        https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=212090

Comment 1 Daniel Berrangé 2006-10-25 22:41:40 UTC
Patches for libxc posted upstream, but not accepted in current form

http://lists.xensource.com/archives/html/xen-devel/2006-10/msg01041.html

We absolutely must get the patches accepted upstream before trying to
incorporate this change in RHEL, because it will require addition of new APIs &
we definitely don't want to supporting APIs which don't get accepted.


Comment 2 RHEL Program Management 2007-03-21 23:45:39 UTC
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux maintenance release.  Product Management has requested
further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed
products.  This request is not yet committed for inclusion in an Update
release.

Comment 3 Daniel Berrangé 2007-03-27 16:29:19 UTC
Merged upstream:

http://xenbits.xensource.com/xen-unstable.hg?rev/2dd4569e0640

Plus some further fixes / cleanups:

12794:3859131c0b8b1c6ef88db6622321146a9500f998
12809:da87dc126b33d771f50336de30330c81d8eed32d
12812:c519ab0f70f3be3128b1940027a4ad3774df4c58

Should be possible to apply to 3.0.3 without too much change.


Comment 5 Daniel Berrangé 2007-06-15 15:06:39 UTC
This fix was picked up as part of the rebase of libxc to 3.1.0. The fix is built
into xen-3.0.3-27.el5  in dist-5E-qu-candidate


When trying to start a 32-bit non-PAE kernel on a PAE hv I now see

# virsh start break
libvir: Xen Daemon error : POST operation failed: (xend.err "Error creating
domain: (2, 'Invalid kernel', 'xc_dom_compat_check: guest type xen-3.0-x86_32
not supported by xen kernel, sorry\\n')")
error: Failed to start domain break

Which is desired behaviour


Comment 8 errata-xmlrpc 2007-11-07 17:07:31 UTC
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 the 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/RHEA-2007-0635.html