Bug 1030477 - [remote-viewer] Disconnects when client_migrate_info destination matches existing connection
[remote-viewer] Disconnects when client_migrate_info destination matches exis...
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: virt-viewer (Show other bugs)
Unspecified Unspecified
unspecified Severity unspecified
: rc
: ---
Assigned To: Daniel Berrange
Virtualization Bugs
Depends On:
Blocks: 1034039
  Show dependency treegraph
Reported: 2013-11-14 09:17 EST by Tomas Jamrisko
Modified: 2013-12-01 18:39 EST (History)
10 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1034039 (view as bug list)
Last Closed: 2013-12-01 18:39:54 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Tomas Jamrisko 2013-11-14 09:17:57 EST
Description of problem:
Client closes when client_migrate_info sent by qemu matches the already established connection

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. Connect to a VM
2. On the VM command line send client_migrate_info where destination and port are the same as the ones you used for connection

Actual results:
Client closes

Expected results:
Client should stay connected
Comment 2 hyao@redhat.com 2013-11-25 01:39:45 EST
I can reproduce this bug with the following packages and steps: 

# rpm -qa virt-viewer 

1. boot the guest with following command 
# /usr/libexec/qemu-kvm -m 4G -cpu SandyBridge -smp 4,sockets=2,cores=2,threads=1 -drive file=/var/lib/libvirt/images/nfs/kvm-rhel6.5-x86_64-raw.img,if=none,id=drive-ide0-0-0,werror=stop,rerror=stop,cache=none -device ide-drive,drive=drive-ide0-0-0,id=ide0-0-0  -boot menu=on -uuid 6d59434d-3f1c-4558-afc3-37e2cc430d6b -rtc-td-hack -no-kvm-pit-reinjection -monitor stdio -name rhel6.1-32 -usb -k en-us -device virtio-serial-pci,id=virtio-serial0,max_ports=16,bus=pci.0,addr=0x7 -chardev socket,id=channel0,host=,port=12345,server,nowait -device virtserialport,bus=virtio-serial0.0,nr=1,chardev=channel0,id=channel0,name=com.redhat.rhevm.vdsm -chardev spicevmc,id=charchannel1,name=vdagent -device virtserialport,bus=virtio-serial0.0,nr=2,chardev=charchannel1,id=channel1,name=com.redhat.spice.0 -spice port=5900,disable-ticketing -vga qxl -global qxl-vga.vram_size=33554432
Warning: option deprecated, use lost_tick_policy property of kvm-pit instead.
QEMU 1.5.3 monitor - type 'help' for more information

2. connect to the vm by remote-viewer 
#remote-viewer spice://

3. send client_migrate_info where destination and port are the same as the ones used for remote-viewer connection. 
(qemu)  client_migrate_info spice 5900

the remote-viewer connnection is closed.
Comment 3 Marc-Andre Lureau 2013-12-01 18:39:54 EST
The seamless migration protocol works by connecting to destination server upon MAIN_MIGRATE_BEGIN_SEAMLESS. The server will break the current connection for the new incoming connection, the exisiting client will quit.

It's not possible to detect this case from client (the same server could have multiple IPs etc)

Since it's an invalid operation in the first place to migrate to the same server instance, and the current behaviour is normal in this case (client will quit because of disconnection) I don't think there is anything to fix.

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