Bug 1247593

Summary: Virt-manager displays wrong guest status after bi-direction migration of multiple guests.
Product: [Community] Virtualization Tools Reporter: Fangge Jin <fjin>
Component: virt-managerAssignee: Cole Robinson <crobinso>
Status: CLOSED DUPLICATE QA Contact:
Severity: medium Docs Contact:
Priority: unspecified    
Version: unspecifiedCC: berrange, crobinso, dyuan, gscrivan, juzhou, mzhan, rbalakri, tzheng, xiaodwan
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-02-27 21:39:52 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:
Attachments:
Description Flags
virt-manager screenshot
none
virt-manager debug log none

Description Fangge Jin 2015-07-28 12:01:51 UTC
Created attachment 1057001 [details]
virt-manager screenshot

Description of problem:
After bi-direction migration of multiple guests completed, some guests are displayed as paused status in virt-manager.

Version-Release number of selected component (if applicable):
virt-manager-1.2.1-4.el7.noarch
libvirt-1.2.17-2.el7.x86_64

How reproducible:
>90%

0.Prepare two hosts, each with 10 running guests:

 On server A(10.66.4.141):
# virsh list
 Id    Name                           State
----------------------------------------------------
 510   mig11                          running
 511   mig17                          running
 512   mig10                          running
 513   mig19                          running
 514   mig16                          running
 515   mig15                          running
 516   mig12                          running
 517   mig18                          running
 518   mig14                          running
 519   mig13                          running


 On server B(10.66.6.6): 
# virsh list
 Id    Name                           State
----------------------------------------------------
 251   mig5                           running
 252   mig0                           running
 253   mig9                           running
 254   mig4                           running
 255   mig2                           running
 256   mig3                           running
 257   mig7                           running
 258   mig1                           running
 259   mig8                           running
 260   mig6                           running


1.Launch virt-manager, connect to server A and server B.

2.Prepare a migration script:
# cat ./migScript.sh
#!/bin/sh
for i in {0..9};
do
ssh root.6.6 /root/test/mig/migrate-cmd.sh mig$i &
/root/test/mig/migrate-cmd.sh mig1$i
done

#cat /root/test/mig/migrate-cmd.sh
#!/bin/sh
virsh migrate --live $1 qemu+tcp://{target ip}/system &

3.Do bi-direction migration on hostA:
# ./migScript.sh

4.Check the guest status after migration completed:
On server A:
# virsh list
Id    Name                           State
----------------------------------------------------
 520   mig2                           running
 521   mig3                           running
 522   mig9                           running
 523   mig5                           running
 524   mig1                           running
 525   mig6                           running
 526   mig7                           running
 527   mig8                           running
 528   mig0                           running
 529   mig4                           running


On server B:
# virsh list
 Id    Name                           State
----------------------------------------------------
 261   mig13                          running
 262   mig11                          running
 263   mig12                          running
 264   mig10                          running
 265   mig14                          running
 266   mig16                          running
 267   mig15                          running
 268   mig18                          running
 269   mig17                          running
 270   mig19                          running


4.Check the guest status in virt-manager, mig15 and mig19 are still in paused status.

5.Close virt-manager and then start it again, all the guests displayed in running status correctly.

Actual results:
As step4.

Expected results:
All the guests are displayed in running status in virt-manager after migration.

Comment 1 Fangge Jin 2015-07-28 12:03:26 UTC
Created attachment 1057002 [details]
virt-manager debug log

Comment 4 Cole Robinson 2015-11-05 01:54:39 UTC
Yeah something is definitely weird with all the instances of these messages in the logs:

  New domain=mig0 requested, but it's already tracked.

That doesn't seem right, but I can't tell offhand what's going on. Would be interesting to see if you can reproduce with virt-manager.git

Comment 5 Xiaodai Wang 2016-08-04 06:58:23 UTC
I can reproduce it with only one guest. After migration, the guest's status is Paused but Running.

My packages:
virt-manager-1.4.0-1.el7.noarch
libvirt-2.0.0-4.el7.x86_64

Comment 7 Cole Robinson 2018-02-27 21:39:52 UTC

*** This bug has been marked as a duplicate of bug 1413707 ***