Bug 1607825

Summary: Improve the error msg when define guest with 'none' type video and other video
Product: Red Hat Enterprise Linux 7 Reporter: yafu <yafu>
Component: libvirtAssignee: Erik Skultety <eskultet>
Status: CLOSED ERRATA QA Contact: Lili Zhu <lizhu>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.6CC: dyuan, fjin, lmen, tburke, xuzhang
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: libvirt-4.5.0-6.el7 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-10-30 09:58:28 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:
Embargoed:

Description yafu 2018-07-24 11:03:38 UTC
Description of problem:
Improve the error msg when define guest with 'none' type video and other video

Version-Release number of selected component (if applicable):
libvirt-4.5.0-4.el7.x86_64

How reproducible:
100%

Steps to Reproduce:
1.Prepare guest xml with two videos, one of them is 'none' type:
#vim /tmp/iommu1.xml
 <video>
      <model type='virtio' heads='1' primary='yes'>
        <acceleration accel3d='no'/>
      </model>
      <alias name='ua-04c2decd-4e33-4023-84de-12205c777af6'/>
      <address type='pci' domain='0x0000' bus='0x07' slot='0x00' function='0x0'/>
    </video>
     <video>
      <model type='none'/>
     </video>

2.#virsh define /tmp/iommu1.xml
error: Failed to define domain from /tmp/iommu1.xml
error: unsupported configuration: a '%s' video type must be the only video device defined for the domain

3.

Actual results:


Expected results:
Report error like:
error: Failed to define domain from /tmp/iommu1.xml
error: unsupported configuration: a 'none' video type must be the only video device defined for the domain

Additional info:

Comment 2 Erik Skultety 2018-07-26 14:12:20 UTC
Fixed upstream by:
commit d1c4480390da7243e37daee37f8a40cb439a6a7c                                                                                                                               
Refs: v4.5.0-298-gd1c4480390                                                                                                        
Author:     Han Han <hhan>                                                                                                                                         
AuthorDate: Thu Jul 26 21:52:46 2018 +0800                                                                                                                                    
Commit:     Erik Skultety <eskultet>                                                                                                                               
CommitDate: Thu Jul 26 16:05:59 2018 +0200                                                                                                                                    

    conf: Fix a error msg typo in virDomainVideoDefValidate

    https://bugzilla.redhat.com/show_bug.cgi?id=1607825

    Introduced by commit d48813e8.

    Signed-off-by: Han Han <hhan>                                                                                                                                  
    Reviewed-by: Erik Skultety <eskultet>

Comment 5 Lili Zhu 2018-08-14 06:36:07 UTC
Verify the bug with:
libvirt-4.5.0-6.el7.x86_64

Steps are as follows:

1.Prepare guest xml with two videos, one of them is 'none' type:
# cat guest.xml
....
  <video>
      <model type='cirrus' vram='16384' heads='1' primary='yes'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
    </video>
    <video>
        <model type='none'/>
    </video>
....

2. Define the guest
# virsh define guest.xml
error: Failed to define domain from avocado-vt-vm1.xml
error: unsupported configuration: a 'none' video type must be the only video device defined for the domain

The error msg is as expected, mark the bug as verified.

Comment 7 errata-xmlrpc 2018-10-30 09:58:28 UTC
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://access.redhat.com/errata/RHSA-2018:3113