Summary: | Sub-element of driver "queues , cmd_per_lun, max_sectors " for controller cannot be set at the same time | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 7 | Reporter: | Pei Zhang <pzhang> |
Component: | libvirt | Assignee: | Michal Privoznik <mprivozn> |
Status: | CLOSED ERRATA | QA Contact: | Virtualization Bugs <virt-bugs> |
Severity: | medium | Docs Contact: | |
Priority: | medium | ||
Version: | 7.1 | CC: | dyuan, lhuang, mprivozn, mzhan, rbalakri, xuzhang |
Target Milestone: | rc | Keywords: | Upstream |
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | libvirt-1.2.13-1.el7 | Doc Type: | Bug Fix |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2015-11-19 06:07:10 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: |
Description
Pei Zhang
2015-01-07 10:33:52 UTC
I've just pushed the patch upstream: commit 97fac17c77d9bdfacafff1c5c39b2df3c1530614 Author: Luyao Huang <lhuang> AuthorDate: Wed Jan 7 18:39:37 2015 +0800 Commit: Michal Privoznik <mprivozn> CommitDate: Fri Jan 9 16:01:55 2015 +0100 conf: Correctly format controller's driver https://bugzilla.redhat.com/show_bug.cgi?id=1179684 The way that we currently generate the <driver/> for <controller/> is just madness: <controller type='scsi' index='0' model='virtio-scsi'> <driver queues='12'/> <driver cmd_per_lun='123'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/> </controller> It's obvious that we should be aiming at the following: <controller type='scsi' index='0' model='virtio-scsi'> <driver queues='12' cmd_per_lun='123'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/> </controller> Signed-off-by: Luyao Huang <lhuang> v1.2.11-123-g97fac17 Verified as below: [root@localhost ~]# rpm -q libvirt libvirt-1.2.15-1.el7.x86_64 1. For a wrong/invalid multi-drvier line controller XML, add below device to domain, then save the XML [root@localhost ~]# cat scsi.xml <controller type='scsi' index='1' model='virtio-scsi'> <driver max_sectors='512'/> <driver queues='3'/> <driver cmd_per_lun='10'/> </controller> a. When meeting the error prompt, press "n", the <driver> is <optional> type, no <zeroOrMore> type [root@localhost ~]# virsh edit r71 error: XML document failed to validate against schema: Unable to validate doc against /usr/share/libvirt/schemas/domain.rng Extra element devices in interleave Element domain failed to validate content Failed. Try again? [y,n,i,f,?]: <==== press "n" b. When meeting the error prompt, press "i", due to virDomainControllerDefParseXML just save the elements of last <driver>, the virDomainControllerDefFormat will format the saved elements. [root@localhost ~]# virsh edit r71 error: XML document failed to validate against schema: Unable to validate doc against /usr/share/libvirt/schemas/domain.rng Extra element devices in interleave Element domain failed to validate content Failed. Try again? [y,n,i,f,?]: <==== press "i" Domain r71 XML configuration edited. [root@localhost ~]# virsh dumpxml r71 | grep "scsi" -A4 <controller type='scsi' index='1' model='virtio-scsi'> <driver cmd_per_lun='10'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/> </controller> <controller type='usb' index='0' model='ich9-ehci1'> 2. Using a vaild controller XML with single dirver line [root@localhost ~]# cat scsi1.xml <controller type='scsi' index='1' model='virtio-scsi'> <driver queues='3' cmd_per_lun='10' max_sectors='512'/> </controller> [root@localhost ~]# [root@localhost ~]# virsh edit r71 Domain r71 XML configuration edited. [root@localhost ~]# virsh dumpxml r71 | grep "scsi" -A4 <controller type='scsi' index='1' model='virtio-scsi'> <driver queues='3' cmd_per_lun='10' max_sectors='512'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/> </controller> <controller type='usb' index='0' model='ich9-ehci1'> Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://rhn.redhat.com/errata/RHBA-2015-2202.html |