Bug 1152981

Summary: no error meessage if input a wrong spice password
Product: Red Hat Enterprise Linux 7 Reporter: CongDong <codong>
Component: virt-managerAssignee: Giuseppe Scrivano <gscrivan>
Status: CLOSED ERRATA QA Contact: Virtualization Bugs <virt-bugs>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.1CC: cfergeau, codong, fidencio, gscrivan, juzhou, mzhan, rbalakri, tzheng
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: virt-manager-1.1.0-5.el7 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-03-05 10:07:21 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description CongDong 2014-10-15 10:24:37 UTC
Description of problem:
Set a spice password for a guest, if input a wrong passwd
when open the guest with virt-manager, no error message
comes out and the console will be black. 

Version-Release number of selected component (if applicable):
virt-manager-1.1.0-4.el7.noarch

How reproducible:
100%

Steps to Reproduce:
1. Install a spice guest and set the spice password : "aabb"
# virt-manager
Click "Details-> Display spice -> Check on option Password -> input password : aabb -> Click Apply"

2. # virt-manager, click "run" and open the guest
double click on the guest to open it, input a wrong passwd like "ccdd"
in the input dialog

3. click "Login"

Actual results:
After step 3, the console will be black, and no error message to
tell the password is wrong or go back to input password again.

Expected results:
There should come out a message to tell user the password is wrong or
go back to input again.

Additional info:

Comment 2 Giuseppe Scrivano 2014-10-15 13:27:09 UTC
I've investigated it on Fedora 20 where I could reproduce the same issue and it looks like a problem in the python bindings of spice-gtk, that does not report a SpiceClientGLib.ChannelEvent.ERROR_AUTH event when the password is not correct.  
I've compared the code to virt-viewer (it works correctly), which is doing the same thing as virt-manager using the C version of spice-gtk.

Comment 3 Christophe Fergeau 2014-10-21 12:06:17 UTC
The problem is that the main channel gets recreated after an ERR_AUTH, and virt-manager is not reconnecting to the channel-event signal on this new main channel.
diff --git a/virtManager/console.py b/virtManager/console.py
index 67bfe10..dc2f813 100644
--- a/virtManager/console.py
+++ b/virtManager/console.py
@@ -405,6 +406,7 @@ class SpiceViewer(Viewer):
             self.console.disconnected()
         elif event == SpiceClientGLib.ChannelEvent.ERROR_AUTH:
             self.console.activate_auth_page()
+            self.main_channel = None
         elif event in [SpiceClientGLib.ChannelEvent.ERROR_CONNECT,
                        SpiceClientGLib.ChannelEvent.ERROR_IO,
                        SpiceClientGLib.ChannelEvent.ERROR_LINK,

avoids the issue on my Fedora 21

Comment 8 zhoujunqin 2014-11-03 06:40:06 UTC
I can reproduce this issue with package:
virt-manager-1.1.0-4.el7.noarch
then try to verify with new build:
virt-manager-1.1.0-5.el7.noarch

Steps:
1. Install a spice guest and set the spice password : "aabb"
# virt-manager
Click "Details-> Display spice -> Check on option Password -> input password : aabb -> Click Apply"

2. # virt-manager, click "run" and open the guest
double click on the guest to open it, input a wrong passwd like "ccdd"
in the input dialogue.
3. click "Login"

Result: After step3 with wrong password, we cannot login the guest, and display going back to input password again.
So move this bug from ON_QA to VERIFIED.

Comment 10 errata-xmlrpc 2015-03-05 10:07:21 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.

https://rhn.redhat.com/errata/RHBA-2015-0427.html