[virt-tools-list] Fwd: [s3-bug-review] Remote-viewer will disconnect after migration back in seamless SPICE migration when there already has another guest client opened by virt-manager

Xiaodai Wang xiaodwan at redhat.com
Wed Mar 6 09:41:00 UTC 2019


Hi, could you help to check whether it's a bug or not?
It's a problem that virt-manager and virt-viewer race for console
connection.

Thank you!
xiaodwan

---------- Forwarded message ---------
From: Meina Li <meili at redhat.com>
Date: Wed, Mar 6, 2019 at 5:27 PM
Subject: [s3-bug-review] Remote-viewer will disconnect after migration back
in seamless SPICE migration when there already has another guest client
opened by virt-manager
To: <spice-devel at redhat.com>, Xiaodai Wang <xiaodwan at redhat.com>
Cc: s3-bug-review <s3-bug-review at redhat.com>, Fangge Jin <fjin at redhat.com>,
Yanqiu Zhang <yanqzhan at redhat.com>, Junqin Zhou <juzhou at redhat.com>


Hi all,

I encountered a issue when I test seamless SPICE migration. Is anyone can
help me review this question? Thank you very much.


Description of problem:

Remote-viewer will disconnect after migration back in seamless SPICE
migration when there already has another guest client opened by virt-manager


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

libvirt-4.5.0-23.module+el8+2800+2d311f65.x86_64

qemu-kvm-2.12.0-63.module+el8+2833+c7d6d092.x86_64

virt-manager-2.0.0-4.el8.noarch

virt-viewer-7.0-2.el8.x86_64


How reproducible:

100%


Steps to Reproduce:

1. Prepare migration env: Migration env setup
<https://docs.google.com/document/d/1_kVln4N0NddvLU4OQ_hxWDGXLpxc7JeMx1OqZqpdgm0/edit#>


2. Dispatch ssh public key of source host to target host and vice versa.

    # ssh-keygen -t rsa

    # ssh-copy-id -i ~/.ssh/id_rsa.pub root@$target_ip

3. Prepare a guest with spice graphic

  <graphics type='spice' autoport='yes' listen='*0.0.0.0*'/>
    <video>
        <model type='qxl' vram='65536' heads='1'/>
    </video>
4. Open a guest client connection by virt-manager on source host.
5. Connect to guest client by remote-viewer on source host:
    # remote-viewer spice://{source hostA_ip}:port
    --->At this time, the client opened by virt-manager in step4 will
disconnect, it's expected.
6. Do migration from source host to target host and check spice client
status. Spice client still alive.
    # virsh migrate guest qemu+ssh://{target hostB_ip}/system --live
--verbose --p2p --tunnelled
    Migration: [100 %]
 7. Migration back and check spice client status again.
     # virsh migrate guest qemu+ssh://{source hostA_ip}/system  --live
--verbose --p2p --tunnelled
      Migration: [100 %]

Actual results:

In step7, after the migration finish, the spice client will disconnect and
the client opened in step 4 will connect


Expected results:

The spice client still alive


Additional info:
# vim ~/.cache/virt-manager/virt-manager.log
[Wed, 06 Mar 2019 04:20:21 virt-manager 13729] DEBUG (console:827) Viewer
disconnected
[Wed, 06 Mar 2019 04:20:33 virt-manager 13729] DEBUG (connection:745)
domain lifecycle event: domain=lmn80-gui state=VIR_DOMAIN_EVENT_SUSPENDED
reason=VIR_DOMAIN_EVENT_SUSPENDED_MIGRATED
[Wed, 06 Mar 2019 04:20:33 virt-manager 13729] DEBUG (console:713) Starting
connect process for proto=spice trans= connhost=127.0.0.1 connuser=
connport= gaddr=0.0.0.0 gport=5900 gtlsport=None gsocket=None
[Wed, 06 Mar 2019 04:20:33 virt-manager 13729] ERROR (console:732) Error
connection to graphical console
Traceback (most recent call last):
  File "/usr/share/virt-manager/virtManager/console.py", line 730, in
_init_viewer
    self._viewer.console_open()
  File "/usr/share/virt-manager/virtManager/viewers.py", line 233, in
console_open
    return self._open()
  File "/usr/share/virt-manager/virtManager/viewers.py", line 148, in _open
    fd = self._get_fd_for_open()
  File "/usr/share/virt-manager/virtManager/viewers.py", line 142, in
_get_fd_for_open
    return self._vm.open_graphics_fd()
  File "/usr/share/virt-manager/virtManager/domain.py", line 1091, in
open_graphics_fd
    return self._backend.openGraphicsFD(0, flags)
  File "/usr/lib64/python3.6/site-packages/libvirt.py", line 1886, in
openGraphicsFD
    if ret == -1: raise libvirtError ('virDomainOpenGraphicsFD() failed',
dom=self)
libvirt.libvirtError: invalid argument: monitor must not be NULL
[Wed, 06 Mar 2019 04:20:33 virt-manager 13729] DEBUG (connection:820) node
device lifecycle event: nodedev=net_vnet0_fe_54_00_be_42_bd
state=VIR_NODE_DEVICE_EVENT_DELETED reason=0
[Wed, 06 Mar 2019 04:20:33 virt-manager 13729] DEBUG (connection:745)
domain lifecycle event: domain=lmn80-gui state=VIR_DOMAIN_EVENT_STOPPED
reason=VIR_DOMAIN_EVENT_STOPPED_MIGRATED
[Wed, 06 Mar 2019 04:20:33 virt-manager 13729] DEBUG (connection:1142)
nodedev=net_vnet0_fe_54_00_be_42_bd removed
[Wed, 06 Mar 2019 04:20:42 virt-manager 13729] DEBUG (connection:820) node
device lifecycle event: nodedev=net_vnet0_fe_54_00_be_42_bd
state=VIR_NODE_DEVICE_EVENT_CREATED reason=0
[Wed, 06 Mar 2019 04:20:42 virt-manager 13729] DEBUG (connection:760)
domain agent lifecycle event: domain=lmn80-gui
state=VIR_CONNECT_DOMAIN_EVENT_AGENT_LIFECYCLE_STATE_DISCONNECTED reason=1
[Wed, 06 Mar 2019 04:20:42 virt-manager 13729] DEBUG (console:713) Starting
connect process for proto=spice trans= connhost=127.0.0.1 connuser=
connport= gaddr=0.0.0.0 gport=5900 gtlsport=None gsocket=None
[Wed, 06 Mar 2019 04:20:46 virt-manager 13729] DEBUG (connection:745)
domain lifecycle event: domain=lmn80-gui state=VIR_DOMAIN_EVENT_STARTED
reason=VIR_DOMAIN_EVENT_STARTED_MIGRATED
[Wed, 06 Mar 2019 04:20:46 virt-manager 13729] DEBUG (connection:760)
domain agent lifecycle event: domain=lmn80-gui
state=VIR_CONNECT_DOMAIN_EVENT_AGENT_LIFECYCLE_STATE_DISCONNECTED reason=2
[Wed, 06 Mar 2019 04:20:46 virt-manager 13729] DEBUG (connection:745)
domain lifecycle event: domain=lmn80-gui state=VIR_DOMAIN_EVENT_RESUMED
reason=VIR_DOMAIN_EVENT_RESUMED_MIGRATED
[Wed, 06 Mar 2019 04:20:46 virt-manager 13729] DEBUG (connection:760)
domain agent lifecycle event: domain=lmn80-gui
state=VIR_CONNECT_DOMAIN_EVENT_AGENT_LIFECYCLE_STATE_DISCONNECTED reason=2
[Wed, 06 Mar 2019 04:20:46 virt-manager 13729] DEBUG (viewers:593)
Requesting fd for channel: <SpiceClientGLib.UsbredirChannel object at
0x7fc0ec59de58 (SpiceUsbredirChannel at 0x5608351e9c70)>
[Wed, 06 Mar 2019 04:20:46 virt-manager 13729] DEBUG (viewers:593)
Requesting fd for channel: <SpiceClientGLib.UsbredirChannel object at
0x7fc0ec59de58 (SpiceUsbredirChannel at 0x560835243e90)>
[Wed, 06 Mar 2019 04:20:46 virt-manager 13729] DEBUG (viewers:593)
Requesting fd for channel: <SpiceClientGLib.RecordChannel object at
0x7fc0ec59de58 (SpiceRecordChannel at 0x560835265eb0)>
[Wed, 06 Mar 2019 04:20:46 virt-manager 13729] DEBUG (viewers:593)
Requesting fd for channel: <SpiceClientGLib.PlaybackChannel object at
0x7fc0ec59de58 (SpicePlaybackChannel at 0x56083524fba0)>
[Wed, 06 Mar 2019 04:20:46 virt-manager 13729] DEBUG (viewers:593)
Requesting fd for channel: <SpiceClientGLib.DisplayChannel object at
0x7fc0ec59de58 (SpiceDisplayChannel at 0x560835250680)>
[Wed, 06 Mar 2019 04:20:46 virt-manager 13729] DEBUG (console:836) Viewer
connected
[Wed, 06 Mar 2019 04:20:46 virt-manager 13729] DEBUG (viewers:593)
Requesting fd for channel: <SpiceClientGLib.CursorChannel object at
0x7fc0ec786ea0 (SpiceCursorChannel at 0x560835251500)>
[Wed, 06 Mar 2019 04:20:46 virt-manager 13729] DEBUG (viewers:593)
Requesting fd for channel: <SpiceClientGLib.InputsChannel object at
0x7fc0ec786ea0 (SpiceInputsChannel at 0x5608352529e0)>



Best Regards,
Meina Li
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/virt-tools-list/attachments/20190306/e0548aaf/attachment.htm>


More information about the virt-tools-list mailing list