RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 825600 - spice client could not disconnect after update graphics with connected='disconnect'
Summary: spice client could not disconnect after update graphics with connected='disco...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: libvirt
Version: 6.3
Hardware: Unspecified
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Peter Krempa
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-05-28 03:03 UTC by yanbing du
Modified: 2013-02-21 07:15 UTC (History)
7 users (show)

Fixed In Version: libvirt-0.9.13-3.el6
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-02-21 07:15:41 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2013:0276 0 normal SHIPPED_LIVE Moderate: libvirt security, bug fix, and enhancement update 2013-02-20 21:18:26 UTC

Description yanbing du 2012-05-28 03:03:43 UTC
Description of problem:
set attribute connected='disconnect' of <graphics> element. Then with the same password, after updating device , spice client could not disconnect.


Version-Release number of selected component (if applicable):
libvirt-0.9.10-21.el6
spice-server-0.10.1-6.el6.x86_64
spice-glib-0.11-9.el6.x86_64
spice-gtk-0.11-9.el6.x86_64
spice-client-0.8.2-15.el6.x86_64
spice-gtk-python-0.11-9.el6.x86_64


How reproducible:
100%

Steps to Reproduce:
# virsh dumpxml --security-info spice-test
<graphics type='spice' port='5900' autoport='yes' listen='0.0.0.0' passwd='aaabbb' connected='disconnect'>
      <listen type='address' address='0.0.0.0'/>
    </graphics>
2. Start the guest and open the spice client.
# spicec -h 127.0.0.1 -p 5900 -w aaabbb
3. Prepare a graphics xml file for guest update
#cat spice-new.xml
<graphics type='spice' port='5900' autoport='yes' listen='0.0.0.0' passwd='aaabbb' connected='disconnect'/>
4. update the guest with the xml 
# virsh update-device spice-test spcie-new.xml 
Device updated successfully
  
Actual results:
spice client could not disconnect

Expected results:
with the same password , after updating device , spice console gets disconnected

Additional info:
In bug 707212, this problem is covered and verified.
https://bugzilla.redhat.com/show_bug.cgi?id=707212#c13

Comment 2 Andrew Cathrow 2012-05-28 19:33:47 UTC
Are we sure this is libvirt specific, eg does this work with commandline/qemu -

Comment 4 yanbing du 2012-06-01 02:49:53 UTC
(In reply to comment #2)
> Are we sure this is libvirt specific, eg does this work with
> commandline/qemu -

In fact, this feature work with qemu, you can reference to bug 707212 - support connected paramater in set_password.
"when issueing a setVmTicket with a spice connection there is an additional parameter available in qemu that determines the behavior with an existing client."
libvirt add this parameter to export it in libvirt side. In fact, it works well when update the graphics with different password, but fail with the same password.

Comment 5 Peter Krempa 2012-06-14 13:21:54 UTC
Fixed upstream:

commit e0f0131d33e283f1b76c05eb7bef4bbbb3f2fd72
Author: Peter Krempa <pkrempa>
Date:   Thu Jun 14 14:48:42 2012 +0200

    qemu: Enable disconnecting SPICE clients without changing password
    
    Libvirt updates the configuration of SPICE server only when something
    changes. This is unfortunate when the user wants to disconnect a
    existing spice session when the connected attribute is already
    "disconnect".
    
    This patch modifies the conditions for calling the password updater to
    be called when nothing changes, but the connected attribute is already
    "disconnect".

Comment 7 zhe peng 2012-07-24 06:00:57 UTC
can reproduce with libvirt-0.9.10-21.el6

verify with:
libvirt-0.9.13-3.el6.x86_64
spice-gtk-0.11-11.el6.x86_64
spice-server-0.10.1-10.el6.x86_64

step:
  1:prepare a guest with spice,and set spice password to 'redhat'
  2:virsh dumpxml $guest --security-info
  ......
  <graphics type='spice' port='5900' tlsPort='5907' autoport='yes' listen='0.0.0.0' keymap='en-us' passwd='redhat' passwdValidTo='2022-02-27T19:46:10' connected='disconnect'>
      <listen type='address' address='0.0.0.0'/>
      <channel name='main' mode='secure'/>
      <channel name='inputs' mode='secure'/>
    </graphics>
  ......
  3:start the guest and connect the console with virt-viewer or spicec:
   remote-viewer spice://127.0.0.1/?port=5900\&tls-port=5907 --spice-host-subject="C=IL,L=Raanana,O=Red Hat,CN=my server" --spice-ca-file='/etc/pki/libvirt-spice/ca-cert.pem' or
   spicec -h 127.0.0.1 -p 5900 -s 5907 -w redhat --host-subject "C=IL,L=Raanana,O=Red Hat,CN=my server" --ca-file '/etc/pki/libvirt-spice/ca-cert.pem'
  4:prepare a xml
  #cat spice-new.xml
  <graphics type='spice' port='5900' tlsPort='5907' autoport='yes' listen='0.0.0.0' keymap='en-us' passwd='redhat' passwdValidTo='2022-02-27T19:46:10' connected='disconnect'>
      <listen type='address' address='0.0.0.0'/>
            <channel name='main' mode='secure'/>
                  <channel name='inputs' mode='secure'/>
                      </graphics>
  5:update the guest with the xml 
   # virsh update-device $guest spcie-new.xml 
   Device updated successfully

  with the same password , after updating device , spice console gets disconnected. verification passed.

Comment 8 errata-xmlrpc 2013-02-21 07:15:41 UTC
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.