Bug 867724 - Libvirt sometimes fails to wait on spice to migrate
Libvirt sometimes fails to wait on spice to migrate
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: libvirt (Show other bugs)
Unspecified Unspecified
unspecified Severity unspecified
: rc
: 6.4
Assigned To: Michal Privoznik
Virtualization Bugs
: 867737 (view as bug list)
Depends On:
Blocks: 836133
  Show dependency treegraph
Reported: 2012-10-18 03:56 EDT by Michal Privoznik
Modified: 2013-02-21 02:10 EST (History)
9 users (show)

See Also:
Fixed In Version: libvirt-0.10.2-5.el6
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2013-02-21 02:10:31 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)
full libvirtd log (7.52 MB, text/plain)
2012-10-25 04:28 EDT, zhe peng
no flags Details

  None (edit)
Description Michal Privoznik 2012-10-18 03:56:35 EDT
Description of problem:

Libvirt currently holds up migration and lets spice to migrate its internal data. During this, libvirt repeatedly asks 'query-spice' to determine if it has completed. Qemu replies with a boolean. However, libvirt expects string so the conversion will fail and libvirt simply fallbacks into pre-seamless mode by proclaiming migration as finished.

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


How reproducible:

few times, when spice hasn't migrated its state yet and 'false' is reported to 'query-spice'

Steps to Reproduce:
Actual results:

libvirt prematurely kills qemu

Expected results:

libvirt kills qemu after query-spice reported 'true'.

Additional info:

Upstream patch has been proposed:
Comment 2 Michal Privoznik 2012-10-18 04:23:45 EDT
*** Bug 867737 has been marked as a duplicate of this bug. ***
Comment 5 zhe peng 2012-10-25 04:25:17 EDT
I can reproduce this with libvirt-0.10.2-2.el6.x86_64

verify with pkgs:

 1: prepare two machine for migration 
 2: on source, create a windows guest with spice
  <graphics type='spice' autoport='yes' listen='' keymap='en-us'>
      <listen type='address' address=''/>
 3: start guest ,use virt-viewer/remote-viewer to connect guest
  #virsh start $guest
  #virt-viewer $guest
  #remote-viewer spice://$source/?port=5901
 4: migrate guest to target
  #virsh migrate win7_64 qemu+ssh://target.redhat.com/system
 5: check qemu process,make sure seamless-migration=on
  #ps -ef | grep kvm
  -spice port=5901,addr=,disable-ticketing,seamless-migration=on -k en-US -vga qxl -global qxl-vga.vram_size=67108864 -device qxl,id=video1,vram_size=67108864,bus=pci.0,addr=0x7 -device intel-hda,id=sound0,bus=pci.0,addr=0x6
  6:after migrate finished,virt-viewer still connect the guest and worked well
  7:check libvirt log
 2012-10-25 21:42:11.089+0000: 27729: debug : virJSONValueToString:1133 :  result={"execute":"query-spice","id":"libvirt-123"}
 2012-10-25 21:42:11.089+0000: 27729: debug : qemuMonitorJSONCommandWithFd:263 : Send command '{"execute":"query-spice","id":"libvirt-123"}' for write with FD -1
   2012-10-25 21:42:11.090+0000: 27724: debug : qemuMonitorIOProcess:353 : QEMU_MONITOR_IO_PROCESS: mon=0x7fc6a4007250 buf={"return": {"migrated": false, "enabled": true, "auth": "none", "port": 5901, "host": "", "channels": [{"port": "54078", "family": "ipv4", "channel-type": 1, "connection-id": 1804289383, "host": "", "channel-id": 0, "tls": false}, {"port": "54083", "family": "ipv4", "channel-type": 9, "connection-id": 1804289383, "host": "", "channel-id": 0, "tls": false}, {"port": "54084", "family": "ipv4", "channel-type": 2, "connection-id": 1804289383, "host": "", "channel-id": 1, "tls": false}, {"port": "54089", "family": "ipv4", "channel-type": 4, "connection-id": 1804289383, "host": "", "channel-id": 1, "tls": false}, {"port": "54088", "family": "ipv4", "channel-type": 3, "connection-id": 1804289383, "host": "", "channel-id": 0, "tls": false}, {"port": "54085", "family": "ipv4", "channel-type": 2, "connection-id": 1804289383, "host": "", "channel-id": 0, "tls": false}, {"port": "54091", "family": "ipv4", "channel-type": 4, "connection-id": 1804289383, "host": len=1023
 2012-10-25 21:42:20.543+0000: 27724: debug : qemuMonitorIOProcess:353 : QEMU_MONITOR_IO_PROCESS: mon=0x7fc6a4007250 buf={"return": {"migrated": true, "enabled": true, "auth": "none", "port": 5901, "host": "", "channels": []}, "id": "libvirt-325"}^M
2012-10-25 21:42:20.543+0000: 27724: debug : qemuMonitorJSONIOProcessLine:150 : Line [{"return": {"migrated": true, "enabled": true, "auth": "none", "port": 5901, "host": "", "channels": []}, "id": "libvirt-325"}]
2012-10-25 21:42:20.543+0000: 27724: debug : virJSONValueFromString:975 : string={"return": {"migrated": true, "enabled": true, "auth": "none", "port": 5901, "host": "", "channels": []}, "id": "libvirt-325"}
   Verification passed.
Comment 6 zhe peng 2012-10-25 04:28:10 EDT
Created attachment 633223 [details]
full libvirtd log
Comment 7 errata-xmlrpc 2013-02-21 02:10:31 EST
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.


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