Bug 1057409

Summary: Migrate guest with Error starts the paused guest.
Product: Red Hat Enterprise Linux 6 Reporter: hyao <hyao>
Component: libvirtAssignee: Martin Kletzander <mkletzan>
Status: CLOSED WONTFIX QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.5CC: acathrow, codong, cwei, dyuan, lcui, mzhan, shyu, tzheng, ydu, zpeng, zsong
Target Milestone: rcKeywords: Upstream
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 1057407 Environment:
Last Closed: 2014-04-04 21:26:48 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:
Bug Depends On: 1057407    
Bug Blocks:    

Description hyao@redhat.com 2014-01-24 02:57:01 UTC
Clone the bug due to reproduce it on rhel6.5 
# rpm -qa libvirt
libvirt-0.10.2-29.el6.x86_64

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

Description of problem:
Migrate guest with Error starts the paused guest.

Version-Release number of selected component (if applicable):
# rpm -qa libvirt
libvirt-1.1.1-18.el7.x86_64

How reproducible:
100%

Steps to Reproduce:
Use the tree http://download.englab.nay.redhat.com/pub/rhel/rel-eng/RHEL-7.0-20140116.1/compose/Server/x86_64/os/ to get two hosts A and B.
Prepare the guest on nfs pool do the following steps on host A and B.
1. On host A:
# virsh list --all
 Id    Name                           State
----------------------------------------------------
 3     mig2                           running
 
Migrate the guest with --suspend option from A to B.
[root@4-116 ~]# virsh migrate mig2 --live qemu+ssh://hostb/system --verbose --suspend
root@hostb's password:
Migration: [100 %]
[root@4-116 ~]# virsh list --all
 Id    Name                           State
----------------------------------------------------
 -     mig2                           shut off

Starts the guest after the migration is done.
[root@4-116 ~]# virsh start mig2  ==> this step is not common.
Domain mig2 started


2. On hostB.

# virsh list --all
 Id    Name                           State
----------------------------------------------------
 10    mig2                           paused

Try to migrate the guest back from B to A with --suspend option
[root@7-204 ~]# virsh migrate mig2 --live qemu+ssh://hosta/system --verbose --suspend
root@hosta's password:
error: Requested operation is not valid: domain is already active as 'mig2' ===> it's right we got the error here.

[root@7-204 ~]# virsh list --all
 Id    Name                           State
----------------------------------------------------
 10    mig2                           running   ==> it doesn't make sense that the error turn on the paused guest.

Comment 2 Martin Kletzander 2014-03-07 08:37:52 UTC
Fixed upstream with v1.2.1-136-g440a1aa:

commit 440a1aa508f7abec635a035158e9b37e179f2db2
Author: Martin Kletzander <mkletzan>
Date:   Thu Feb 6 14:30:59 2014 +0100

    qemu: keep pre-migration domain state after failed migration

Comment 5 RHEL Program Management 2014-04-04 21:26:48 UTC
Development Management has reviewed and declined this request.
You may appeal this decision by reopening this request.