Bug 596100 - device hotplug/update changes are not transient
device hotplug/update changes are not transient
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: libvirt (Show other bugs)
6.0
All Linux
low Severity medium
: rc
: ---
Assigned To: Cole Robinson
Virtualization Bugs
:
: 623066 (view as bug list)
Depends On:
Blocks: Rhel6.1LibvirtTier1
  Show dependency treegraph
 
Reported: 2010-05-26 06:18 EDT by Johnny Liu
Modified: 2011-05-19 09:19 EDT (History)
9 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2011-05-19 09:19:03 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Johnny Liu 2010-05-26 06:18:00 EDT
Description of problem:
Change vnc password on the fly via "virsh update-device", then shutdown the guest, re-start the guest, when connect the guest windows, the new password still take effect.
As my understand, after the guest is shutdown, the vnc password should be restored to original password for next connection. 

Version-Release number of selected component (if applicable):
libvirt-0.8.1-6.el6.x86_64
qemu-kvm-0.12.1.2-2.54.el6.x86_64
kernel-2.6.32-27.el6.x86_64

How reproducible:
Always

Steps to Reproduce:
1. Define a domain with a vnc password in xml config file
...
<graphics type='vnc' port='-1' autoport='yes' listen='127.0.0.1' keymap='en-us' passwd='123456'/>
...
2. Start the guest, and use virt-viewer to connect the guest windows with "aaabbb" password
3. Change password on the fly.
# cat vnc_passwd.xml 
<graphics type='vnc' port='-1' autoport='yes' listen='127.0.0.1' keymap='en-us' passwd='222222'/>
# virsh update-device winxp vnc_passwd.xml 
Device updated successfully
4. Connect the guest windows successfully with new password "222222"
5. Shutdown the guest.
6. Start the guest again.
7. Try to Connect the guest windows with old password "123456".

  
Actual results:
With old password "123456", connect failed. With new password "222222", connect is successful.

# virsh dumpxml <guestname>
...
<graphics type='vnc' port='5900' autoport='yes' listen='127.0.0.1' keymap='en-us'/>
...

# cat /etc/libvirt/qemu/<guestname>.xml
...
<graphics type='vnc' port='-1' autoport='yes' listen='127.0.0.1' keymap='en-us' passwd='123456'/>
...

# virsh edit <guestname>
...
<graphics type='vnc' port='-1' autoport='yes' listen='127.0.0.1' keymap='en-us' passwd='222222'/>
...

Expected results:
With old password "123456", connect should be successful.

Additional info:
After I restart libvirtd, the original password take effect.

When I try to run this command with "--persistent", but it failed with the following error, I am not sure it is expected.
# virsh update-device winxp vnc_passwd.xml --persistent
error: Failed to update device from vnc_passwd.xml
error: Requested operation is not valid: cannot modify the persistent configuration of a domain
Comment 2 RHEL Product and Program Management 2010-06-07 11:59:09 EDT
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux major release.  Product Management has requested further
review of this request by Red Hat Engineering, for potential inclusion in a Red
Hat Enterprise Linux Major release.  This request is not yet committed for
inclusion.
Comment 4 Daniel Berrange 2010-10-11 11:44:56 EDT
This may or may not be a bug, if not, we at least need to better document the semantics of changing the password.
Comment 5 Cole Robinson 2010-11-19 10:58:51 EST
This is definitely not intended behavior. AFAICT with current upstream, any hotplug changes are persisted in memory until the domain is redefined or libvirtd is restarted. Pretty sure things didn't work this way in the past (verifying now), but at the very least that behavior is non-obvious.
Comment 6 Daniel Berrange 2010-11-23 06:22:33 EST
Should be addressed by

http://www.redhat.com/archives/libvir-list/2010-November/msg00999.html
Comment 7 Cole Robinson 2010-11-29 14:31:51 EST
*** Bug 623066 has been marked as a duplicate of this bug. ***
Comment 9 Wayne Sun 2011-01-10 21:15:42 EST
Verified.

Packages:
# rpm -qa |grep libvirt
libvirt-client-0.8.7-1.el6.x86_64
libvirt-0.8.7-1.el6.x86_64
libvirt-python-0.8.7-1.el6.x86_64

Steps to Reproduce:
Steps are the same as in the bug description.
Comment 11 Cui Chun 2011-02-09 02:29:43 EST
Rechecked it on the following test environment according to description. It is passed.

Test environment:
libvirt-0.8.7-5.el6
qemu-kvm-0.12.1.2-2.144.el6
kernel-2.6.32-94.el6
Comment 15 errata-xmlrpc 2011-05-19 09:19:03 EDT
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2011-0596.html

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