Bug 510427
Summary: | creating node device error | ||||||
---|---|---|---|---|---|---|---|
Product: | Red Hat Enterprise Linux 5 | Reporter: | Alex Jia <ajia> | ||||
Component: | libvirt | Assignee: | Daniel Veillard <veillard> | ||||
Status: | CLOSED ERRATA | QA Contact: | Virtualization Bugs <virt-bugs> | ||||
Severity: | medium | Docs Contact: | |||||
Priority: | medium | ||||||
Version: | 5.4 | CC: | hbrock, jialiu, virt-maint, xen-maint, yoyzhang | ||||
Target Milestone: | rc | ||||||
Target Release: | --- | ||||||
Hardware: | All | ||||||
OS: | Linux | ||||||
Whiteboard: | |||||||
Fixed In Version: | Doc Type: | Bug Fix | |||||
Doc Text: | Story Points: | --- | |||||
Clone Of: | Environment: | ||||||
Last Closed: | 2010-03-30 08:09:43 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: | |||||||
Attachments: |
|
Description
Alex Jia
2009-07-09 08:31:30 UTC
yup problem from python/generator.py creating in the class virConnect: [...] def createXML(self, xmlDesc, flags): """Create a new device on the VM host machine, for example, virtual HBAs created using vport_create. """ ret = libvirtmod.virNodeDeviceCreateXML(self._o, xmlDesc, flags) if ret is None:raise libvirtError('virNodeDeviceCreateXML() failed', conn=self) __tmp = virNodeDevice(self, _obj=ret) return __tmp def createXML(self, xmlDesc, flags): """Launch a new guest domain, based on an XML description similar to the one returned by virDomainGetXMLDesc() This function may requires privileged access to the hypervisor. The domain is not persistent, so its definition will disappear when it is destroyed, or if the host is restarted (see virDomainDefineXML() to define persistent domains). """ ret = libvirtmod.virDomainCreateXML(self._o, xmlDesc, flags) if ret is None:raise libvirtError('virDomainCreateXML() failed', conn=self) __tmp = virDomain(self,_obj=ret) return __tmp two methods with the same name for different libvirt entry points. After applying the fix from upstream for the nameFixup() function in generator.py, the virNodeDeviceCreateXML entry point is now mapped to the following method: def nodeDeviceCreateXML(self, xmlDesc, flags): """Create a new device on the VM host machine, for example, virtual HBAs created using vport_create. """ ret = libvirtmod.virNodeDeviceCreateXML(self._o, xmlDesc, flags) if ret is None:raise libvirtError('virNodeDeviceCreateXML() failed', conn=self) __tmp = virNodeDevice(self, _obj=ret) return __tmp Daniel Created attachment 369911 [details]
patch for python generator and generated output
This is directly backported from upstream current code,
Daniel
libvirt-0.6.3-25.el5 has been built in dist-5E-qu-candidate with the fix, Daniel This bug has been verified with libvirt 0.6.3-25.el5 on RHEL-5.4. Already fixed, set status to VERIFIED. This bug has been verified with libvirt 0.6.3-25.el5 on RHEL-5.5.Already fixed, set status to VERIFIED. The same name "createXML" error has been fixed,but I met another error when creating a node device from xml: "libvir: Node Device error : this function is not supported by the hypervisor: Device is not a fibre channel HBA" I think that it should be another bug: https://bugzilla.redhat.com/show_bug.cgi?id=510426 Version-Release number of selected component (if applicable): [root@dhcp-66-70-62 ~]# 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 ~]# 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 ~]# 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 ~]# python Python 2.4.3 (#1, Jun 11 2009, 14:09:37) [GCC 4.1.2 20080704 (Red Hat 4.1.2-44)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import libvirt >>> conn = libvirt.open(None) >>> caps = conn.getCapabilities() >>> conn.listDevices(caps, 0) [] >>> conn.numOfDevices(caps, 0) 0 >>> dev = conn.nodeDeviceLookupByName("storage_model_DVD__RW_DH_16A6S") >>> devxml = dev.XMLDesc(0) >>> print devxml <device> <name>storage_model_DVD__RW_DH_16A6S</name> <parent>pci_8086_2922_scsi_host_3_scsi_device_lun0</parent> <capability type='storage'> <block>/dev/scd0</block> <bus>pci</bus> <drive_type>cdrom</drive_type> <model>DVD+-RW DH-16A6S</model> <vendor>PLDS</vendor> <capability type='removable'> <media_available>0</media_available> <media_size>0</media_size> </capability> </capability> </device> >>> node = conn.nodeDeviceCreateXML(devxml, 0) libvir: Node Device error : this function is not supported by the hypervisor: Device is not a fibre channel HBA Traceback (most recent call last): File "<stdin>", line 1, in ? File "/usr/lib64/python2.4/site-packages/libvirt.py", line 1162, in nodeDeviceCreateXML if ret is None:raise libvirtError('virNodeDeviceCreateXML() failed', conn=self) libvirt.libvirtError: this function is not supported by the hypervisor: Device is not a fibre channel HBA 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 |