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 707212 - support connected paramater in set_password
Summary: support connected paramater in set_password
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: libvirt
Version: 6.2
Hardware: Unspecified
OS: Unspecified
medium
high
Target Milestone: rc
: ---
Assignee: Michal Privoznik
QA Contact: Virtualization Bugs
URL:
Whiteboard:
: 727841 (view as bug list)
Depends On:
Blocks: 689363 730297 818350 818351 818354
TreeView+ depends on / blocked
 
Reported: 2011-05-24 12:15 UTC by Alon Levy
Modified: 2014-08-04 22:08 UTC (History)
15 users (show)

Fixed In Version: libvirt-0.9.4-2.el6
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-12-06 11:10:58 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
/var/log/libvirtd.log (2.33 MB, text/plain)
2011-07-22 09:10 UTC, Vivian Bian
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2011:1513 0 normal SHIPPED_LIVE libvirt bug fix and enhancement update 2011-12-06 01:23:30 UTC

Description Alon Levy 2011-05-24 12:15:50 UTC
Description of problem:
when issueing a setVmTicket with a spice connection there is an additional parameter available in qemu that determines the behavior with an existing client. This needs to be exported to libvirt users.

The complete command that needs to be supported is:
 set_password protocol password action-if-connected

action-if-connected supported (see monitor.c) are:
 fail
 disconnect
 keep

Comment 2 Michal Privoznik 2011-05-30 16:24:34 UTC
Patch sent upstream for review:

https://www.redhat.com/archives/libvir-list/2011-May/msg01854.html

Comment 4 Michal Privoznik 2011-06-13 15:50:15 UTC
Wasn't good enough. Sent another version:

https://www.redhat.com/archives/libvir-list/2011-June/msg00413.html

Comment 5 Michal Privoznik 2011-07-08 15:05:44 UTC
Pushed upstream:

commit 30c43afd73e8c2931dc210562066ba37a8b9fe26
Author: Michal Privoznik <mprivozn>
Date:   Thu May 26 16:15:54 2011 +0200

    graphics: add support for action_if_connected in qemu
    
    This option accepts 3 values:
    -keep, to keep current client connected (Spice+VNC)
    -disconnect, to disconnect client (Spice)
    -fail, to fail setting password if there is a client connected (Spice)

v0.9.3-39-g30c43af

This feature is accesible via 'connected' attribute of <graphics> element.

Comment 7 Vivian Bian 2011-07-18 11:45:13 UTC
tested with 
libvirt-0.9.3-5.el6.x86_64
qemu-kvm-0.12.1.2-2.169.el6.x86_64
kernel-2.6.32-166.el6.x86_64

# virsh dumpxml --security-info spice
<graphics type='spice' port='5900' tlsPort='5901' autoport='yes' listen='0.0.0.0' passwd='aaabbb' connected='disconnect'/>

# cat spice-new.xml
    <graphics type='spice' port='5900' tlsPort='5901' autoport='yes' listen='0.0.0.0' passwd='cccddd' connected='disconnect'/>

# virsh update-device spice spice-new.xml
Device updated successfully

spice client doesn't get disconnected 


# virsh dumpxml --security-info spice
<graphics type='spice' port='5900' tlsPort='5901' autoport='yes' listen='0.0.0.0' passwd='aaabbb' connected='keep'/>

# cat spice-new.xml
    <graphics type='spice' port='5900' tlsPort='5901' autoport='yes' listen='0.0.0.0' passwd='cccddd' connected='keep'/>

# virsh update-device spice spice-new.xml
Device updated successfully

spice client keep connection


# virsh dumpxml --security-info spice
<graphics type='spice' port='5900' tlsPort='5901' autoport='yes' listen='0.0.0.0' passwd='aaabbb' connected='fail'/>

# cat spice-new.xml
    <graphics type='spice' port='5900' tlsPort='5901' autoport='yes' listen='0.0.0.0' passwd='cccddd' connected='fail'/>

# virsh update-device spice spice-new.xml
Device updated successfully

there is no error prompt for spice passwd changing . 


# virsh dumpxml --security-info vnc
<graphics type='vnc' port='-1' autoport='yes' listen='0.0.0.0' passwd='aaabbb' connected='keep'/>

# cat vnc-new.xml
    <graphics type='vnc' port='-1' autoport='yes' listen='0.0.0.0' passwd='cccddd' connected='keep'/>

# virsh update-device spice spice-new.xml
Device updated successfully

vnc connection keeps connected . 


From the result ,we can see the spice part doesn't meet the expected result 
keep = keep them connected, disconnect - disconnect them, fail - fail changing password


Set the bug status to ASSIGNED

Comment 8 Michal Privoznik 2011-07-21 09:53:34 UTC
Vivian,

VNC supports "connected=keep" only. Spice should support all three parameters.
Can you please provide a full libvirt debug log, so I can see what commands are send to QEMU (this means don't set any filter in config)?

Thanks

Comment 9 Vivian Bian 2011-07-22 09:10:51 UTC
Created attachment 514642 [details]
/var/log/libvirtd.log

tested with libvirt-0.9.3-7.el6.x86_64

steps:
1. set log_level=1 and  log_outputs="1:file:/var/log/libvirtd.log" 
2. repeat the steps in comment7 . 

Paste the required log here called libvirtd.log

Comment 12 Vivian Bian 2011-08-01 09:01:51 UTC
VERIFIED with 
libvirt-0.9.4-0rc2.el6.x86_64
qemu-kvm-0.12.1.2-2.175.el6.x86_64


Steps:
# virsh dumpxml --security-info spice
<graphics type='spice' port='5900' tlsPort='5901' autoport='yes'
listen='0.0.0.0' passwd='aaabbb' connected='disconnect'/>

# cat spice-new.xml
    <graphics type='spice' port='5900' tlsPort='5901' autoport='yes'
listen='0.0.0.0' passwd='cccddd' connected='disconnect'/>

# virsh update-device spice spice-new.xml
Device updated successfully

spice console got disconnected 


# virsh dumpxml --security-info spice
<graphics type='spice' port='5900' tlsPort='5901' autoport='yes'
listen='0.0.0.0' passwd='aaabbb' connected='disconnect'/>

# cat spice-new.xml
    <graphics type='spice' port='5900' tlsPort='5901' autoport='yes'
listen='0.0.0.0' passwd='cccddd' connected='keep'/>

# virsh update-device spice spice-new.xml
Device updated successfully

spice console session got kept

# virsh dumpxml --security-info spice
<graphics type='spice' port='5900' tlsPort='5901' autoport='yes'
listen='0.0.0.0' passwd='aaabbb' connected='disconnect'/>

# cat spice-new.xml
    <graphics type='spice' port='5900' tlsPort='5901' autoport='yes'
listen='0.0.0.0' passwd='cccddd' connected='fail'/>

# virsh update-device spice spice-new.xml
error: Failed to update device from spice-new.xml
error: internal error unable to execute QEMU command '__com.redhat_set_password': Could not set password

threw error when failed to update passwd , and spice session kept 


# virsh dumpxml --security-info vnc
<graphics type='vnc' port='-1' autoport='yes' listen='0.0.0.0' passwd='aaabbb'
connected='keep'/>

# cat vnc-new.xml
    <graphics type='vnc' port='-1' autoport='yes' listen='0.0.0.0'
passwd='cccddd' connected='keep'/>

# virsh update-device spice spice-new.xml
Device updated successfully

vnc connection keeps connected . 


So set bug status to VERIFIED

Comment 13 Vivian Bian 2011-08-01 09:21:58 UTC
tried with 
libvirt-0.9.4-0rc2.el6.x86_64
qemu-kvm-0.12.1.2-2.175.el6.x86_64

steps 
# virsh dumpxml --security-info spice
<graphics type='spice' port='5900' tlsPort='5901' autoport='yes'
listen='0.0.0.0' passwd='aaabbb' connected='disconnect'/>

# cat spice-new.xml
    <graphics type='spice' port='5900' tlsPort='5901' autoport='yes'
listen='0.0.0.0' passwd='aaabbb' connected='disconnect'/>

# virsh update-device spice spice-new.xml
Device updated successfully

with the same password , after updating device , spice console DID NOT get disconnected

So have to reassign this bug

Comment 14 Eric Blake 2011-08-02 14:23:29 UTC
next version of patch in POST (but with poor subject line):
http://post-office.corp.redhat.com/archives/rhvirt-patches/2011-July/msg01023.html

Comment 15 Eric Blake 2011-08-03 12:12:30 UTC
*** Bug 727841 has been marked as a duplicate of this bug. ***

Comment 16 Daniel Berrangé 2011-08-03 12:39:14 UTC
The patch committed in CVS does not match what Eric posted in comment #14, so putting this back to POST

Comment 17 Daniel Veillard 2011-08-04 01:57:18 UTC
Yeah I will have to incorporate this in a follow8ing build, possibly
next monday libvirt-0.9.4-2.el6


Daniel

Comment 18 Vivian Bian 2011-08-09 11:00:20 UTC
VERIFIED with 
libvirt-0.9.4-2.el6.x86_64
qemu-kvm-0.12.1.2-2.175.el6.x86_64


Steps:
# virsh dumpxml --security-info spice
<graphics type='spice' port='5900' tlsPort='5901' autoport='yes'
listen='0.0.0.0' passwd='aaabbb' connected='disconnect'/>

# cat spice-new.xml
    <graphics type='spice' port='5900' tlsPort='5901' autoport='yes'
listen='0.0.0.0' passwd='cccddd' connected='disconnect'/>

# virsh update-device spice spice-new.xml
Device updated successfully

spice console got disconnected 


# virsh dumpxml --security-info spice
<graphics type='spice' port='5900' tlsPort='5901' autoport='yes'
listen='0.0.0.0' passwd='aaabbb' connected='disconnect'/>

# cat spice-new.xml
    <graphics type='spice' port='5900' tlsPort='5901' autoport='yes'
listen='0.0.0.0' passwd='cccddd' connected='keep'/>

# virsh update-device spice spice-new.xml
Device updated successfully

spice console session got kept

# virsh dumpxml --security-info spice
<graphics type='spice' port='5900' tlsPort='5901' autoport='yes'
listen='0.0.0.0' passwd='aaabbb' connected='disconnect'/>

# cat spice-new.xml
    <graphics type='spice' port='5900' tlsPort='5901' autoport='yes'
listen='0.0.0.0' passwd='cccddd' connected='fail'/>

# virsh update-device spice spice-new.xml
error: Failed to update device from spice-new.xml
error: internal error unable to execute QEMU command
'__com.redhat_set_password': Could not set password

threw error when failed to update passwd , and spice session kept 


# virsh dumpxml --security-info vnc
<graphics type='vnc' port='-1' autoport='yes' listen='0.0.0.0' passwd='aaabbb'
connected='keep'/>

# cat vnc-new.xml
    <graphics type='vnc' port='-1' autoport='yes' listen='0.0.0.0'
passwd='cccddd' connected='keep'/>

# virsh update-device spice spice-new.xml
Device updated successfully

vnc connection keeps connected . 

# virsh dumpxml --security-info spice
<graphics type='spice' port='5900' tlsPort='5901' autoport='yes'
listen='0.0.0.0' passwd='aaabbb' connected='disconnect'/>

# cat spice-new.xml
    <graphics type='spice' port='5900' tlsPort='5901' autoport='yes'
listen='0.0.0.0' passwd='aaabbb' connected='disconnect'/>

# virsh update-device spice spice-new.xml
Device updated successfully

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

without connected option set , guest could be started successfully . 

So set bug status to VERIFIED

Comment 21 errata-xmlrpc 2011-12-06 11:10:58 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/RHBA-2011-1513.html


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