Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 918619

Summary: migration may result in VM running on both source and target hosts
Product: Red Hat Enterprise Linux 6 Reporter: David Jaša <djasa>
Component: libvirtAssignee: Ján Tomko <jtomko>
Status: CLOSED WORKSFORME QA Contact: Virtualization Bugs <virt-bugs>
Severity: high Docs Contact:
Priority: unspecified    
Version: 6.4CC: acathrow, bili, cwei, dallan, dyuan, mzhan, weizhan, xkatop, zhpeng
Target Milestone: beta   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-09-05 13:14:38 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
domain xml
none
guest xml file none

Description David Jaša 2013-03-06 15:32:38 UTC
Created attachment 706068 [details]
domain xml

Description of problem:
migration may result in VM running on both source and target hosts

Version-Release number of selected component (if applicable):
libvirt-0.10.2-18.el6.x86_64
qemu-kvm-0.12.1.2-2.355.el6.x86_64
spice-server-0.12.0-12.el6.x86_64
  (both machines)

How reproducible:
random

Steps to Reproduce:
1. repeat migration back and forth till you get this result
2.
3.
  
Actual results:


Expected results:


Additional info:

Comment 5 David Jaša 2013-03-06 15:40:01 UTC
virsh said (more or less - I got l10n'd output):
error:Unable to read from monitor: Connection terminated by the other side

Comment 6 David Jaša 2013-03-06 16:18:02 UTC
src /etc/libvirt/qemu.conf:
spice_listen = "::"
spice_tls = 1
spice_tls_x509_cert_dir = "/etc/pki/libvirt-spice"

dst /etc/libvirt/qemu.conf:
spice_listen = "0.0.0.0"
spice_tls = 1
spice_tls_x509_cert_dir = "/etc/pki/libvirt-spice"
user = "root"

Comment 7 EricLee 2013-03-07 05:44:36 UTC
Hi David,

Which transport protocol did you use when cross this issue?

I can not reproduce this bug with 'ssh' method for repeating 1024 rounds:

# cat migrate.sh 
#!/bin/bash

# Migrate a guest back and forth between two hosts, printing progress as it goes
GUEST=$1
HOST1=$2
HOST2=$3
OPTIONS="--live  --p2p"
#TRANSPORT="tcp"
#TRANSPORT="tls"
TRANSPORT="ssh"

date
for i in `seq 1 1024`;
do
    echo "Loop ${i}: Migrating ${GUEST} from ${HOST1} to ${HOST2}"
    echo "COMMAND: virsh -c qemu+${TRANSPORT}://root@${HOST1}/system migrate ${OPTIONS} ${GUEST} qemu+${TRANSPORT}://root@${HOST2}/system"
    time virsh -c qemu+${TRANSPORT}://root@${HOST1}/system migrate ${OPTIONS} ${GUEST} qemu+${TRANSPORT}://root@${HOST2}/system

    echo "Loop ${i}: Migrating ${GUEST} back from ${HOST2} to ${HOST1}"
    echo "COMMAND: virsh -c qemu+${TRANSPORT}://root@${HOST2}/system migrate ${OPTIONS} ${GUEST} qemu+${TRANSPORT}://root@${HOST1}/system"
    time virsh -c qemu+${TRANSPORT}://root@${HOST2}/system migrate ${OPTIONS} ${GUEST} qemu+${TRANSPORT}://root@${HOST1}/system
done
date


My /etc/libvirt/qemu.conf file is same with comment #6, and my guest xml as next attachment.

Thanks,
EricLee

Comment 8 EricLee 2013-03-07 05:46:36 UTC
Created attachment 706342 [details]
guest xml file

Comment 9 David Jaša 2013-03-07 10:12:52 UTC
Hi Eric, I used local unix socket to access one host and plain tcp without authentication for other host.

Comment 10 EricLee 2013-03-08 07:26:29 UTC
(In reply to comment #9)
> Hi Eric, I used local unix socket to access one host and plain tcp without
> authentication for other host.

Hi David,

I still can not reproduce it:

# cat migrate.sh 
#!/bin/bash

# Migrate a guest back and forth between two hosts, printing progress as it goes
GUEST=$1
HOST1=$2
HOST2=$3
OPTIONS="--live  --p2p"
TRANSPORT="tcp"
#TRANSPORT="tls"
#TRANSPORT="ssh"

date
for i in `seq 1 512`;
do
    echo "Loop ${i}: Migrating ${GUEST} from ${HOST1} to ${HOST2}"
    echo "COMMAND: virsh -c qemu+ssh://root@${HOST1}/system migrate ${OPTIONS} ${GUEST} qemu+${TRANSPORT}://root@${HOST2}/system"
    time virsh -c qemu+ssh://root@${HOST1}/system migrate ${OPTIONS} ${GUEST} qemu+${TRANSPORT}://root@${HOST2}/system

    echo "Loop ${i}: Migrating ${GUEST} back from ${HOST2} to ${HOST1}"
    echo "COMMAND: virsh -c qemu+${TRANSPORT}://root@${HOST2}/system migrate ${OPTIONS} ${GUEST} qemu+ssh://root@${HOST1}/system"
    time virsh -c qemu+${TRANSPORT}://root@${HOST2}/system migrate ${OPTIONS} ${GUEST} qemu+ssh://root@${HOST1}/system
done
date

Do I miss some important steps?

Thanks,
EricLee

Comment 11 David Jaša 2013-03-08 10:27:05 UTC
No, you don't. It happened to me just once in many occasions, so I'm afraid that only the developer who'll look at the code may pinpoint the root cause and more reliable reproducer.

Comment 12 Ján Tomko 2013-09-05 13:14:38 UTC
I didn't find any issues in the code and I can't reproduce it either.