Bug 1073233 - libvirt should forbid doing tunnelled migration with migrateuri using migrateToURI2 api
Summary: libvirt should forbid doing tunnelled migration with migrateuri using migrate...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libvirt
Version: 7.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: rc
: ---
Assignee: Jiri Denemark
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On: 1073232
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-03-06 05:28 UTC by hongming
Modified: 2015-11-19 05:44 UTC (History)
5 users (show)

Fixed In Version: libvirt-1.2.16-1.el7
Doc Type: Bug Fix
Doc Text:
Clone Of: 1073232
Environment:
Last Closed: 2015-11-19 05:44:57 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2015:2202 0 normal SHIPPED_LIVE libvirt bug fix and enhancement update 2015-11-19 08:17:58 UTC

Description hongming 2014-03-06 05:28:41 UTC
The bug also can be reproduced in the latest rhel7 version. so clone it to rhel7. 

+++ This bug was initially created as a clone of Bug #1073232 +++

Description of problem:
libvirt should forbid doing tunnelled migration with migrateuri using migrateToURI2 api. The virsh cmd has done this.
  

Version-Release number of selected component (if applicable):
libvirt-0.10.2-29.el6_5.5.x86_64
libvirt-python-0.10.2-29.el6_5.5.x86_64

How reproducible:
100%

Steps to Reproduce:
On source host

[root@intel-5130-16-1 libvirt-test-API]# virsh list --all
 Id    Name                           State
----------------------------------------------------
 12    rhel6u2                        running


[root@intel-5130-16-1 libvirt-test-API]# virsh migrate --live --p2p rhel6u2 qemu+tcp://10.66.106.34/system  tcp://10.66.106.34:9001
error: migrate: Unexpected migrateuri for peer2peer/direct migration

[root@intel-5130-16-1 libvirt-test-API]# virsh migrate --live --p2p --tunnelled rhel6u2 qemu+tcp://10.66.106.34/system  tcp://10.66.106.34:9001
error: migrate: Unexpected migrateuri for peer2peer/direct migration


[root@intel-5130-16-1 libvirt-test-API]# python
Python 2.6.6 (r266:84292, Oct 12 2012, 14:23:48)
[GCC 4.4.6 20120305 (Red Hat 4.4.6-4)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import libvirt
>>> con = libvirt.open('')
>>> dom = con.lookupByName('rhel6u2')
>>> dom.migrateToURI2( 'qemu+tcp://10.66.106.34/system', 'tcp://10.66.106.34:9001', None, 7, None, 0)  <====Use  live|p2p|tunnelled , successfully migrate
0

[root@intel-5130-16-1 libvirt-test-API]# virsh list --all
 Id    Name                           State
----------------------------------------------------
 -     rhel6u2                        shut off


Check the domain on destination host

[root@ibm-x3850x5-08 0.10.2-29.el6_5.5]# virsh list --all
 Id    Name                           State
----------------------------------------------------
 4     rhel6u2                        running




Actual results:
It can successfully do tunnelled migration with migrateuri using migrateToURI2 api.

Expected results:
libvirt should forbid doing tunnelled migration with migrateuri using migrateToURI2 api


Additional info:

Comment 4 Jiri Denemark 2015-05-04 13:11:15 UTC
Fixed upstream by v1.2.15-18-gb45ec56..v1.2.15-19-g05cda3d:

commit b45ec56f582742596a01ad1107c21d48d7172e7d
Author: Jiri Denemark <jdenemar@redhat.com>
Date:   Thu Apr 30 15:56:07 2015 +0200

    qemu: Forbid unsupported parameters for tunnelled migration
    
    Neither migrate URI nor lister address make any sense for tunnelled
    migration.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1066375
    https://bugzilla.redhat.com/show_bug.cgi?id=1073233
    
    Signed-off-by: Jiri Denemark <jdenemar@redhat.com>

commit 05cda3d3a42dacf18b48dd3efceef2010270855f
Author: Jiri Denemark <jdenemar@redhat.com>
Date:   Thu Apr 30 14:47:46 2015 +0200

    virsh: Don't check migrate parameters
    
    Just pass anything a user specified to the appropriate API. It's the API
    or libvirtd that should be responsible for checking its parameters.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1066375
    https://bugzilla.redhat.com/show_bug.cgi?id=1073233
    
    Signed-off-by: Jiri Denemark <jdenemar@redhat.com>

Comment 6 zhe peng 2015-07-22 06:32:31 UTC
verify with  build :
libvirt-1.2.17-2.el7.x86_64
libvirt-python-1.2.17-1.el7.x86_64

step:
# python
Python 2.7.5 (default, Feb 11 2014, 07:46:25) 
[GCC 4.8.2 20140120 (Red Hat 4.8.2-13)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import libvirt
>>> con = libvirt.open('')
>>> dom = con.lookupByName('rhel6')
>>> dom.migrateToURI2('qemu+ssh://10.66.106.34/system','tcp://10.66.106.34:9001',None,7,None,0)
libvirt: QEMU Driver error : argument unsupported: migration URI is not supported by tunnelled migration
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib64/python2.7/site-packages/libvirt.py", line 1825, in migrateToURI2
    if ret == -1: raise libvirtError ('virDomainMigrateToURI2() failed', dom=self)
libvirt.libvirtError: argument unsupported: migration URI is not supported by tunnelled migration

move to verified.

Comment 8 errata-xmlrpc 2015-11-19 05:44:57 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://rhn.redhat.com/errata/RHBA-2015-2202.html


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