Bug 690459

Summary: rpmbuild failed on xencapstest when running under xen kernel
Product: Red Hat Enterprise Linux 5 Reporter: dyuan
Component: libvirtAssignee: Jiri Denemark <jdenemar>
Status: CLOSED ERRATA QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 5.6CC: ajia, eblake, jdenemar, jyang, kgrainge, llim, yoyzhang
Target Milestone: rc   
Target Release: ---   
Hardware: ia64   
OS: Linux   
Whiteboard:
Fixed In Version: libvirt-0.8.2-18.el5 Doc Type: Bug Fix
Doc Text:
If you were using the Xen kernel, the rpmbuild command would fail on the xencapstest because of a bug in the code. The bug has been fixed and you can now run rpmbuild successfully when using the Xen kernel.
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-07-21 10:32:17 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:

Description dyuan 2011-03-24 12:04:50 UTC
Description of problem:
rpmbuild failed on xencapstest when running under xen kernel.

Version-Release number of selected component (if applicable):
libvirt-0.8.2-15.el5_6.3

How reproducible:
100%

Steps to Reproduce:
1.
# uname -a
Linux ia64-5s-m1.ss.eng.bos.redhat.com 2.6.18-238.5.1.el5xen #1 SMP Mon Feb 21 06:20:21 EST 2011 ia64 ia64 ia64 GNU/Linux

2. 
# rpmbuild --rebuild --define "dist .el5_6" --define '_topdir /usr/src/redhat' --target=ia64 --rcfile /tmp/tps_rpmrc_h12552:/usr/lib/rpm/rpmrc:/usr/lib/rpm/redhat/rpmrc /mnt/redhat/brewroot/packages/libvirt/0.8.2/15.el5_6.3/src/libvirt-0.8.2-15.el5_6.3.src.rpm 

  
Actual results:
TEST: xencapstest
      !!!!!!!!!!                               10  FAIL
FAIL: xencapstest
TEST: esxutilstest
      ....                                     4   OK
PASS: esxutilstest
...
...
====================
1 of 43 tests failed
====================
make[2]: *** [check-TESTS] Error 1
make[2]: Leaving directory `/usr/src/redhat/BUILD/libvirt-0.8.2/tests'
make[1]: *** [check-am] Error 2
make[1]: Leaving directory `/usr/src/redhat/BUILD/libvirt-0.8.2/tests'
make: *** [check-recursive] Error 1
error: Bad exit status from /var/tmp/rpm-tmp.75328 (%check)


Expected results:
build successfully.

Additional info:

Comment 1 Jiri Denemark 2011-03-24 12:37:00 UTC
Fixed by this upstream commit:

commit c2e9e907429a5e95727e3bc119783dedf7d5ebbd
Author: Matthias Bolte <matthias.bolte>
Date:   Tue Nov 9 23:38:12 2010 +0100

    xencapstest: Don't fail when Xen is installed
    
    xencapstest calls xenHypervisorMakeCapabilitiesInternal with conn == NULL
    which calls xenDaemonNodeGetTopology with conn == NULL when a recent
    enough Xen was detected (sys_interface_version >= SYS_IFACE_MIN_VERS_NUMA).
    But xenDaemonNodeGetTopology insists in having conn != NULL and fails,
    because it expects to be able to talk to an actual xend.
    
    We cannot do that in a 'make check' test. Therefore, only call the xend
    subdriver function when conn isn't NULL.
    
    Reported by Andy Howell and Jim Fehlig.

Comment 2 Jiri Denemark 2011-03-24 13:42:07 UTC
Sent to rhvirt-patches:
http://post-office.corp.redhat.com/archives/rhvirt-patches/2011-March/msg00680.html

Comment 4 Cui Chun 2011-04-07 06:27:38 UTC
Verified it on libvirt-0.8.2-18.el5. It has been fixed.

Steps:
1.run "# rpmbuild --rebuild --define "dist .el5_7" libvirt-0.8.2-18.el5.src.rpm"
2.no error after finished rpmbuild.

Comment 5 Cui Chun 2011-04-08 01:50:07 UTC
Checked it on xen kernel:

# uname -r
2.6.18-248.el5xen

Comment 6 Cui Chun 2011-04-29 02:59:14 UTC
Also met this issue when building RHEL5.6.z in Errata tps-srpmtest.


# rpmbuild --rebuild --define "dist .el5_6" --define '_topdir /usr/src/redhat' --target=ia64 --rcfile /tmp/tps_rpmrc_N24713:/usr/lib/rpm/rpmrc:/usr/lib/rpm/redhat/rpmrc /mnt/redhat/brewroot/packages/libvirt/0.8.2/15.el5_6.4/src/libvirt-0.8.2-15.el5_6.4.src.rpm 

---------------
      ..................                       58  OK
PASS: xmconfigtest
TEST: xencapstest
      !!!!!!!!!!                               10  FAIL
FAIL: xencapstest
TEST: esxutilstest
      ....        


--------------

Comment 7 Kate Grainger 2011-07-18 06:15:18 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
If you were using the Xen kernel, the rpmbuild command would fail on the xencapstest because of a bug in the code. The bug has been fixed and you can now run rpmbuild successfully when using the Xen kernel.

Comment 8 errata-xmlrpc 2011-07-21 10:32:17 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 therefore 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/RHSA-2011-1019.html