Bug 1076354 - The new name of guest will change to old when destroy the guest after migration with dname and persistent flag
Summary: The new name of guest will change to old when destroy the guest after migrati...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libvirt
Version: 7.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: rc
: ---
Assignee: Jiri Denemark
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-03-14 07:47 UTC by hongming
Modified: 2015-11-19 05:45 UTC (History)
4 users (show)

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


Attachments (Terms of Use)
libvirtd log on source host (3.51 MB, text/plain)
2014-03-14 08:01 UTC, hongming
no flags Details
libvirtd log on destination host (2.62 MB, text/plain)
2014-03-14 08:02 UTC, hongming
no flags Details


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-14 07:47:46 UTC
Description of problem:
The new name of guest will change to old  when destroy the guest after migration with dname and persistent flag


Version-Release number of selected component (if applicable):
libvirt-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 start rhel6u2
Domain rhel6u2 started

[root@intel-5130-16-1 libvirt-test-API]# virsh migrate --live --persistent rhel6u2 qemu+tcp://10.66.106.34/system tcp://10.66.106.34:9001 rhel6u2-new

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


On destination host
[root@ibm-x3850x5-08 0.10.2-29.el6_5.5]# virsh list --all
 Id    Name                           State
----------------------------------------------------
 8     rhel6u2-new                    running

[root@ibm-x3850x5-08 0.10.2-29.el6_5.5]# virsh destroy rhel6u2-new
Domain rhel6u2-new destroyed

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



Actual results:
The new name of guest will change to old  when destroy the guest after migration with dname and persistent flag 

Expected results:
Successfully rename the persistent gust on destination host 

Additional info:

Comment 1 hongming 2014-03-14 08:01:21 UTC
Created attachment 874260 [details]
libvirtd log on source host

Comment 2 hongming 2014-03-14 08:02:19 UTC
Created attachment 874261 [details]
libvirtd log on destination host

Comment 5 Jiri Denemark 2014-04-04 21:38:11 UTC
This bug was not selected to be addressed in Red Hat Enterprise Linux 6. We will look at it again within the Red Hat Enterprise Linux 7 product.

Comment 8 Jiri Denemark 2015-05-04 21:03:18 UTC
Patch sent upstream for review: https://www.redhat.com/archives/libvir-list/2015-May/msg00049.html

Comment 9 Jiri Denemark 2015-05-05 07:24:37 UTC
Fixed upstream by v1.2.15-25-gfc3601a:

commit fc3601a308922332be6213032dfe43fd963e3f46
Author: Jiri Denemark <jdenemar@redhat.com>
Date:   Mon May 4 22:21:23 2015 +0200

    qemu: Properly rename persistent def after migration
    
    When migrating a domain while changing its name and using
    VIR_MIGRATE_PERSIST_DEST flag, libvirt would fail to properly change the
    name in the persistent definition. The inconsistency results in weird
    behavior when dumping domain XML, destroying the domain, restarting
    libvirtd and likely in several other situations.
    
    Since the new name is already stored in vm->def->name, we just need to
    make sure the persistent definition uses this new name too.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1076354
    
    Signed-off-by: Jiri Denemark <jdenemar@redhat.com>

Comment 11 zhe peng 2015-07-22 07:11:12 UTC
verify with build:
libvirt-1.2.17-2.el7.x86_64

step:
1:prepare migration env.
2:do migration on source:
# virsh migrate --live --persistent rhel6 qemu+ssh://10.66.106.34/system tcp://10.66.106.34:9001 --dname rhel6-new --verbose

3:during migration, check target:
# virsh list --all
 Id    Name                           State
----------------------------------------------------
 11    rhel6-new                      paused

4: after migration
# virsh list --all
 Id    Name                           State
----------------------------------------------------
 11    rhel6-new                      running
# virsh destroy rhel6-new
Domain rhel6-new destroyed
# virsh list --all
 Id    Name                           State
----------------------------------------------------
 -     rhel6-new                      shut off


move to verified.

Comment 13 errata-xmlrpc 2015-11-19 05:45:24 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.