Bug 960958 - Wrong error messages show when controller type in xml is different with guest
Wrong error messages show when controller type in xml is different with guest
Status: CLOSED CURRENTRELEASE
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libvirt (Show other bugs)
7.0
Unspecified Unspecified
medium Severity medium
: rc
: ---
Assigned To: Ján Tomko
Virtualization Bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-05-08 07:50 EDT by tingting zheng
Modified: 2014-06-17 20:50 EDT (History)
9 users (show)

See Also:
Fixed In Version: libvirt-1.0.5-2.el7
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-06-13 05:50:18 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description tingting zheng 2013-05-08 07:50:47 EDT
Description
Wrong error messages show when controller type in xml is different with guest

Version:
libvirt-1.0.5-1.el7.x86_64

How reproducible:
100%

Steps to Reproduce:
1.Prepare guest migration environment.
2.Install a guest and dumpxml for guest on one host.
# virsh dumpxml mig > test-controller.xml
It's controller part is as below:
    <controller type='usb' index='0'>
      <alias name='usb0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
    </controller>
    <controller type='ide' index='0'>
      <alias name='ide0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/>
    </controller>
    <controller type='pci' index='0' model='pci-root'>
      <alias name='pci0'/>
    </controller>

3.Change one controller type in test-controller.xml,eg:change
    <controller type='usb' index='0'>
      <alias name='usb0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
    </controller>
to:
    <controller type='virtio-serial' index='0'>
      <alias name='usb0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
    </controller>

4.Do migration using test-controller.xml,the error messages showed are wrong.
# virsh migrate --live demo --xml test-controller.xml qemu+ssh://10.66.7.153/system
root@10.66.7.153's password:
error: unsupported configuration: Target domain disk controller count 4 does not match source 3

Actual results:
As describes.
error: unsupported configuration: Target domain disk controller count 4 does not match source 3

Expected results:
Something like:
error:Target controller type virtio-serial does not match source usb.

Additional info:
The same error shows when change the index of controller.

# cat /var/log/libvirt/libvirtd.log
2013-05-08 11:17:40.585+0000: 17384: info : libvirt version: 1.0.5, package: 1.el7 (Red Hat, Inc. <http://bugzilla.redhat.com/bugzilla>, 2013-05-02-09:04:52, x86-018.build.eng.bos.redhat.com)
2013-05-08 11:17:40.585+0000: 17384: error : virDomainDefCheckABIStability:12664 : unsupported configuration: Target domain disk controller count 4 does not match source 3
Comment 2 Ján Tomko 2013-05-09 06:09:33 EDT
If you delete the implicit USB controller with index 0 from domain XML, libvirt will auto-add it anyway, which is why the domain with the virtio-serial controller has one more controller.

But I agree that the error message is wrong - only one of those 3 or 4 controller is a disk controller, so the word 'disk' doesn't belong there.

I've proposed a patch to make the error more generic:
https://www.redhat.com/archives/libvir-list/2013-May/msg00636.html
Comment 3 Ján Tomko 2013-05-09 08:30:37 EDT
Fixed upstream by:
commit c075f89fa291478e5244d64cf528ca3e80705d26
Author:     Ján Tomko <jtomko@redhat.com>
AuthorDate: 2013-05-09 11:39:21 +0200
Commit:     Ján Tomko <jtomko@redhat.com>
CommitDate: 2013-05-09 14:25:11 +0200

    don't mention disk controllers in generic controller errors
    
    The controller element supports non-disk controller types too.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=960958

git describe: v1.0.5-110-gc075f89
Comment 4 EricLee 2013-05-21 08:03:04 EDT
Verifying the bug with package:
libvirt-1.0.5-2.el7.x86_64

Steps as the bug description, after step 4 will get error info:
# virsh migrate --live mig --xml test_controller.xml qemu+ssh://xx.xx.xx.xx/system
root@xx.xx.xx.xx's password: 
error: unsupported configuration: Target domain controller count 5 does not match source 4

error info DO NOT shows "disk" as expected.

Setting VERIFIED.
Comment 5 Ludek Smid 2014-06-13 05:50:18 EDT
This request was resolved in Red Hat Enterprise Linux 7.0.

Contact your manager or support representative in case you have further questions about the request.

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