Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 867724 - Libvirt sometimes fails to wait on spice to migrate
Libvirt sometimes fails to wait on spice to migrate
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: libvirt (Show other bugs)
6.4
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:
Environment:
Last Closed: 2013-02-21 02:10:31 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
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


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2013:0276 normal SHIPPED_LIVE Moderate: libvirt security, bug fix, and enhancement update 2013-02-20 16:18:26 EST

  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):

libvirt-0.10.2-2.el6.x86_64

How reproducible:

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

Steps to Reproduce:
1.
2.
3.
  
Actual results:

libvirt prematurely kills qemu

Expected results:

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

Additional info:

Upstream patch has been proposed:
https://www.redhat.com/archives/libvir-list/2012-October/msg00961.html
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:
libvirt-0.10.2-5.el6.x86_64
kernel-2.6.32-323.el6.x86_64
qemu-kvm-0.12.1.2-2.320.el6.x86_64
spice-server-0.12.0-1.el6.x86_64
spice-gtk-0.14-4.el6.x86_64
spice-protocol-0.12.2-1.el6.noarch
spice-glib-0.14-4.el6.x86_64
virt-viewer-0.5.2-16.el6.x86_64

step:
 1: prepare two machine for migration 
 2: on source, create a windows guest with spice
 .....
  <graphics type='spice' autoport='yes' listen='0.0.0.0' keymap='en-us'>
      <listen type='address' address='0.0.0.0'/>
    </graphics>
 .....
 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=0.0.0.0,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": "0.0.0.0", "channels": [{"port": "54078", "family": "ipv4", "channel-type": 1, "connection-id": 1804289383, "host": "127.0.0.1", "channel-id": 0, "tls": false}, {"port": "54083", "family": "ipv4", "channel-type": 9, "connection-id": 1804289383, "host": "127.0.0.1", "channel-id": 0, "tls": false}, {"port": "54084", "family": "ipv4", "channel-type": 2, "connection-id": 1804289383, "host": "127.0.0.1", "channel-id": 1, "tls": false}, {"port": "54089", "family": "ipv4", "channel-type": 4, "connection-id": 1804289383, "host": "127.0.0.1", "channel-id": 1, "tls": false}, {"port": "54088", "family": "ipv4", "channel-type": 3, "connection-id": 1804289383, "host": "127.0.0.1", "channel-id": 0, "tls": false}, {"port": "54085", "family": "ipv4", "channel-type": 2, "connection-id": 1804289383, "host": "127.0.0.1", "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": "0.0.0.0", "channels": []}, "id": "libvirt-325"}^M
 len=135
2012-10-25 21:42:20.543+0000: 27724: debug : qemuMonitorJSONIOProcessLine:150 : Line [{"return": {"migrated": true, "enabled": true, "auth": "none", "port": 5901, "host": "0.0.0.0", "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": "0.0.0.0", "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.

http://rhn.redhat.com/errata/RHSA-2013-0276.html

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