nova generate wrong spice channel type 'pty', which should be 'spicevmc'
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
| OpenStack Compute (nova) |
Medium
|
m4cr0v | ||
| Newton |
Medium
|
Matt Riedemann | ||
| Ocata |
Medium
|
Matt Riedemann |
Bug Description
Description
===========
In openstack kilo release(I know it's somekind of out of date, howerver I noticed that the code cause this issue still exists in the latest nova.git repo), if you use spice as the default console, the type of a spice channel(used by apice agent) is 'pyt', which should be 'spicevmc'.
Steps to reproduce
==================
1. Modify the nova.conf to use spice as default console.
Edit /etc/nova/
[default]
vnc_enabled=false
[spice]
html5proxy_
server_
server_
enabled=true
keymap=en-us
2. Modify the nova-compute log level to debug(For convenience, I just edit the log code from LOG.debug to LOG.error.)
The log code is in:
/usr/lib/
def to_xml(self, pretty_print=True):
root = self.format_dom()
xml_str = etree.tostring(
return xml_str
Restart the openstack-
3. Start an instance.
4. Check the printed xml in /var/log/
2016-10-18 16:54:36.848 7061 ERROR nova.virt.
Expected result
===============
The channel type should be 'spicevmc', like this:
<channel type='spicevmc'>
<target type='virtio' name='com.
</channel>
I confirmed the expect result from the following aspects:
1. Firstly, the test code in nova/tests/
1411 class LibvirtConfigGu
1412 def test_config_
1413 obj = config.
1414 obj.type = "spicevmc"
1415
1416 xml = obj.to_xml()
1417 self.assertXmlE
1418 <channel type="spicevmc">
1419 <target type='virtio'/>
1420 </channel>""")
1421
1422 def test_config_
1423 obj = config.
1424 obj.type = "spicevmc"
1425 obj.target_name = "com.redhat.
1426
1427 xml = obj.to_xml()
1428 self.assertXmlE
1429 <channel type="spicevmc">
1430 <target type='virtio' name='com.
1431 </channel>""")
2. Secondly, if we use the channel whose type is 'pty', and install vdagent or spice-guest-
(C:\Windows\
1724::INFO:
1724::INFO:
1724::INFO:
1724::INFO:
1724::INFO:
1724::INFO:
1724::INFO:
1724::INFO:
The mouse cursor moves slowly, you also cannot use clipboard between the guest os and the client.
If I modify the channel type to 'spicevmc', all the problems disappeared. And the mouse is released automatically if you move it out of the spice window, there is no need to press Ctrl+Alt.
Actual result
=============
The channel type for spice agent is 'pty':
<channel type='pty'>
<target type='virtio' name='com.
</channel>
Environment
===========
1. OS and openstack release
[root@node3 ~]# cat /etc/redhat-release
CentOS Linux release 7.2.1511 (Core)
[root@node3 ~]# uname -a
Linux node3 3.10.0-
[root@node3 ~]# rpm -qa | grep nova
openstack-
openstack-
python-
python-
2. Hypervisor
Libvirt + QEMU + KVM
[root@node3 ~]# rpm -qa | grep libvirt
libvirt-
libvirt-
libvirt-
libvirt-
libvirt-
libvirt-
libvirt-
libvirt-
libvirt-
libvirt-
libvirt-
[root@node3 ~]# rpm -qa | grep qemu
libvirt-
qemu-kvm-
ipxe-roms-
qemu-img-
qemu-kvm-
Logs & Configs
==============
Normal vdagent log if I use the 'spicevmc' channel type:
1284::INFO:
1284::INFO:
1284::INFO:
1284::INFO:
1284::INFO:
1284::INFO:
1284::INFO:
1284::INFO:
1284::INFO:
1284::INFO:
1284::INFO:
1284::INFO:
1284::INFO:
1284::INFO:
1284::INFO:
1284::INFO:
1284::INFO:
1284::INFO:
1284::INFO:
1284::INFO:
1284::INFO:
1284::INFO:
1284::INFO:
1284::INFO:
1284::INFO:
1284::INFO:
1284::INFO:
1284::INFO:
1284::INFO:
1284::INFO:
1284::INFO:
1284::INFO:
1284::INFO:
Patch
==============
From 2309f146f08c0d0
From: m4cr0v <email address hidden>
Date: Tue, 18 Oct 2016 20:55:22 +0800
Subject: [PATCH] Fix type of the channel for spice agent.
The type of the channel for spice agent should be 'spicevmc' instead of 'pty'.
---
nova/virt/
1 file changed, 1 insertion(+)
diff --git a/nova/
index b0bba46..6ddf65e 100644
--- a/nova/
+++ b/nova/
@@ -4491,6 +4491,7 @@ class LibvirtDriver(
if (CONF.spice.enabled and CONF.spice.
+ channel.type = 'spicevmc'
--
1.8.3.1
m4cr0v (m4cr0v) wrote : | #1 |
description: | updated |
description: | updated |
description: | updated |
m4cr0v (m4cr0v) wrote : | #3 |
Hi, I checked the link you posted, it seems not related to this bug.
Changed in nova: | |
assignee: | nobody → sireeshak (sireeshak) |
Changed in nova: | |
assignee: | sireeshak (sireeshak) → m4cr0v (m4cr0v) |
Sean Dague (sdague) wrote : | #4 |
Please submit the patch to gerrit. We don't do patches out of launchpad.
Changed in nova: | |
status: | New → Incomplete |
Change abandoned by Sean Dague (<email address hidden>) on branch: master
Review: https:/
Reason: This review is > 6 weeks without comment, and failed Jenkins the last time it was checked. We are abandoning this for now. Feel free to reactivate the review by pressing the restore button and leaving a 'recheck' comment to get fresh test results.
Fix proposed to branch: master
Review: https:/
Changed in nova: | |
status: | Incomplete → In Progress |
Changed in nova: | |
importance: | Undecided → Medium |
tags: | added: libvirt newton-backport-potential ocata-backport-potential spice |
Reviewed: https:/
Committed: https:/
Submitter: Jenkins
Branch: master
commit f4be97d8cf8811a
Author: m4cr0v <email address hidden>
Date: Tue Dec 13 16:17:34 2016 +0800
Fix spice channel type
nova generate wrong spice channel type 'pty', which should be 'spicevmc'
Closes-Bug: #1634495
Change-Id: I58e9a8df9f40f9
Changed in nova: | |
status: | In Progress → Fix Released |
Fix proposed to branch: stable/ocata
Review: https:/
Fix proposed to branch: stable/newton
Review: https:/
Reviewed: https:/
Committed: https:/
Submitter: Jenkins
Branch: stable/newton
commit 725f500d5e8e205
Author: m4cr0v <email address hidden>
Date: Tue Dec 13 16:17:34 2016 +0800
Fix spice channel type
nova generate wrong spice channel type 'pty', which should be 'spicevmc'
Closes-Bug: #1634495
Change-Id: I58e9a8df9f40f9
(cherry picked from commit f4be97d8cf8811a
Reviewed: https:/
Committed: https:/
Submitter: Jenkins
Branch: stable/ocata
commit c0fd42738819712
Author: m4cr0v <email address hidden>
Date: Tue Dec 13 16:17:34 2016 +0800
Fix spice channel type
nova generate wrong spice channel type 'pty', which should be 'spicevmc'
Closes-Bug: #1634495
Change-Id: I58e9a8df9f40f9
(cherry picked from commit f4be97d8cf8811a
This issue was fixed in the openstack/nova 15.0.1 release.
This issue was fixed in the openstack/nova 14.0.5 release.
This issue was fixed in the openstack/nova 16.0.0.0b1 development milestone.
Related fix proposed to branch: master /review. openstack. org/389262
Review: https:/