Bug 510426 - Command 'virsh nodedev-create': error: out of memory
Command 'virsh nodedev-create': error: out of memory
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: libvirt (Show other bugs)
5.4
All Linux
low Severity medium
: rc
: ---
Assigned To: Cole Robinson
Virtualization Bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2009-07-09 04:21 EDT by zhanghaiyan
Modified: 2010-03-30 04:10 EDT (History)
8 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2010-03-30 04:10:38 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)
Backport of upstream changeset (612 bytes, text/plain)
2009-12-09 13:02 EST, Cole Robinson
no flags Details

  None (edit)
Description zhanghaiyan 2009-07-09 04:21:48 EDT
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 12:37:13 EST
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 13:02:41 EST
Created attachment 377259 [details]
Backport of upstream changeset

Applies cleanly and builds fine.
Comment 3 Daniel Veillard 2009-12-15 10:48:14 EST
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 03:01:14 EST
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 11:23:29 EST
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 04:10:38 EDT
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.