Bug 510426 - Command 'virsh nodedev-create': error: out of memory
Summary: Command 'virsh nodedev-create': error: out of memory
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: libvirt
Version: 5.4
Hardware: All
OS: Linux
low
medium
Target Milestone: rc
: ---
Assignee: Cole Robinson
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-07-09 08:21 UTC by zhanghaiyan
Modified: 2010-03-30 08:10 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-03-30 08:10:38 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Backport of upstream changeset (612 bytes, text/plain)
2009-12-09 18:02 UTC, Cole Robinson
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2010:0205 0 normal SHIPPED_LIVE libvirt bug fix and enhancement update 2010-03-29 12:27:37 UTC

Description zhanghaiyan 2009-07-09 08:21:48 UTC
Description of problem:
Failed to create node device from .xml file, got out of memory error

Version-Release number of selected component (if applicable):
libvirt-0.6.3-14.el5
RHEL5.4-Server-x86_64-xen
2.6.18-156.el5xen

How reproducible:
100%

Steps to Reproduce:
1.# virsh nodedev-list --tree
  ............
  +-pci_8086_29b2
  +-pci_8086_29b3
  +-pci_8086_29b4
  +-pci_8086_29b6
  +-pci_8086_29b7

2.# virsh nodedev-dumpxml pci_8086_29b7
  <device>
  <name>pci_8086_29b7</name>
  <parent>computer</parent>
  <capability type='pci'>
    <domain>0</domain>
    <bus>0</bus>
    <slot>3</slot>
    <function>3</function>
    <product id='0x29b7'>82Q35 Express Serial KT Controller</product>
    <vendor id='0x8086'>Intel Corporation</vendor>
  </capability>
</device>

3. Create node.xml file as below, modify <name> <product id>:
   
  <device>
  <name>pci_8086_29b8</name>
  <parent>computer</parent>
  <capability type='pci'>
    <domain>0</domain>
    <bus>0</bus>
    <slot>3</slot>
    <function>3</function>
    <product id='0x29b8'>82Q35 Express Serial KT Controller</product>
    <vendor id='0x8086'>Intel Corporation</vendor>
  </capability>
</device>

4. # virsh nodedev-create node.xml

Actual results:
Output:
error: Failed to create node device from node.xml
error: out of memory

Expected results:
pci_8086_29b8 is created successfully

Additional info:
After # virsh nodedev-dumpxml pci_8086_29b7, 
have to # service libvirtd restart
This has a Bug 509261 -  nodedev-dumpxml can hang libvirtd

Comment 1 Cole Robinson 2009-12-09 17:37:13 UTC
Pretty sure this is fixed by the following upstream commit:

http://libvirt.org/git/?p=libvirt.git;a=commit;h=4ed2c3773e0c462ba3af628f62357cc6d9b61718

Comment 2 Cole Robinson 2009-12-09 18:02:41 UTC
Created attachment 377259 [details]
Backport of upstream changeset

Applies cleanly and builds fine.

Comment 3 Daniel Veillard 2009-12-15 15:48:14 UTC
libvirt-0.6.3-25.el5 has been built in dist-5E-qu-candidate with the fix,

Daniel

Comment 5 Alex Jia 2009-12-29 08:01:14 UTC
This bug has been verified with libvirt 0.6.3-25.el5 on RHEL-5.5. Already
fixed, but a another error is raised:
"error: Failed to create node device from node.xml
error: this function is not supported by the hypervisor: Device is not a fibre channel HBA"

it seems only can create a fibre channel HBA device from xml,Is it a correct
behavior?

Version-Release number of selected component (if applicable):
[root@dhcp-66-70-62 bug]# uname -a
Linux dhcp-66-70-62.nay.redhat.com 2.6.18-183.el5xen #1 SMP Mon Dec 21 18:46:14 EST 2009 x86_64 x86_64 x86_64 GNU/Linux
[root@dhcp-66-70-62 bug]# rpm -qa|grep libvirt
libvirt-0.6.3-25.el5
libvirt-python-0.6.3-25.el5
libvirt-debuginfo-0.6.3-25.el5
[root@dhcp-66-70-62 bug]# rpm -qa|grep xen
xen-libs-3.0.3-102.el5
xen-devel-3.0.3-102.el5
kmod-gnbd-xen-0.1.5-2.el5
kmod-gfs-xen-0.1.34-9.el5
xen-3.0.3-102.el5
xen-libs-3.0.3-102.el5
kernel-xen-2.6.18-183.el5
kmod-cmirror-xen-0.1.22-3.el5

Steps to Reproduce:

[root@dhcp-66-70-62 ~]# cat node.xml
<device>
  <name>pci_8086_29b8</name>
  <parent>computer</parent>
  <capability type='pci'>
    <domain>0</domain>
    <bus>0</bus>
    <slot>3</slot>
    <function>3</function>
    <product id='0x29b8'>82Q35 Express Serial KT Controller</product>
    <vendor id='0x8086'>Intel Corporation</vendor>
  </capability>
</device>

[root@dhcp-66-70-62 ~]# virsh nodedev-create node.xml
error: Failed to create node device from node.xml
error: this function is not supported by the hypervisor: Device is not a fibre channel HBA

Comment 6 Cole Robinson 2010-01-04 16:23:29 UTC
The error in comment #5 is expected. nodedev-create and nodedev-destroy only work on fibre channel devices, as the error indicates. The improper 'out of memory' error is no longer seen, so it appears this bug is fixed.

Comment 11 errata-xmlrpc 2010-03-30 08:10:38 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/RHBA-2010-0205.html


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