Bug 982840

Summary: virt-viewer can't connect guest display console if only SPICE TLS autoport specified
Product: Red Hat Enterprise Linux 6 Reporter: zhe peng <zpeng>
Component: virt-viewerAssignee: Daniel Berrangé <berrange>
Status: CLOSED ERRATA QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.4CC: acathrow, cfergeau, codong, dblechte, dyuan, lcui, marcandre.lureau, mzhan, tzheng
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: virt-viewer-0.5.6-5.el6 Doc Type: Bug Fix
Doc Text:
Cause: libvirt guest configured with only SPICE TLS autoport. Consequence: virt-viewer can't connect to guest console Fix: Rework setup logic to check presence of any port, plain or tls. Result: virt-viewer can connect successfully to TLS-only guest.
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-11-21 08:11:35 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 zhe peng 2013-07-10 02:25:14 UTC
Description of problem:
virt-viewer can't connect guest display console if only SPICE TLS autoport specified

Version-Release number of selected component:
virt-viewer-0.5.6-2.el6.x86_64

How reproducible:
100%

Steps:
 1.config tls env.
 2.edit guest xml:
 ....
<graphics type='spice' tlsPort='-1' autoport='no' listen='0' keymap='en-us'>
      <listen type='address' address='0'/>
    </graphics>
 ....
 3.start guest,check qemu cmd line:
  .....
  -spice port=0,tls-port=5900,addr=0,disable-ticketing,x509-dir=/etc/pki/libvirt-spice,seamless-migration=on
  .....
  use virt-viewer can't connect the guest console,get error "Cannot determine the graphic address for the guest spice"
  
  #remote-viewer spice://$ip/?tls-port=5900 --spice-host-subject="C=IL,L=Raanana,O=Red Hat,CN=my server" --spice-ca-file='/etc/pki/libvirt-spice/ca-cert.pem'
  remote-viewer can connect.
 

Actual results:
see steps

Expected results:
can connect the guest

additional info:

Comment 2 Christophe Fergeau 2013-07-10 16:01:54 UTC
I can reproduce that one.

Comment 3 Christophe Fergeau 2013-07-10 16:26:15 UTC
Patch sent to https://www.redhat.com/archives/virt-tools-list/2013-July/msg00046.html

Comment 4 Christophe Fergeau 2013-07-11 07:11:32 UTC
Marc-André, the fix is pushed at https://git.fedorahosted.org/cgit/virt-viewer.git/commit/?id=59ca6bd8a7eda9a0bf14d23f77d0a89f2bafbeaa
Do you want me to add this patch to the virt-viewer package and push a build? Shall I just add the patch? Or do you prefer to handle it all next time you do a virt-viewer build? Let me know what is better for you!

Comment 5 Marc-Andre Lureau 2013-07-11 10:57:47 UTC
(In reply to Christophe Fergeau from comment #4)
> Marc-André, the fix is pushed at
> https://git.fedorahosted.org/cgit/virt-viewer.git/commit/
> ?id=59ca6bd8a7eda9a0bf14d23f77d0a89f2bafbeaa
> Do you want me to add this patch to the virt-viewer package and push a
> build? Shall I just add the patch? Or do you prefer to handle it all next
> time you do a virt-viewer build? Let me know what is better for you!

add the patch (in the patch git repo), do a build, add it to errata, whenever you want!

Comment 7 CongDong 2013-07-30 01:34:57 UTC
I tried with the virt-viewer-0.5.6-5.el6.
If I didn't update the glib2, the error message when I install virt-viewer is:

Error: Package: virt-viewer-0.5.6-6.el6.x86_64 (/virt-viewer-0.5.6-6.el6.x86_64)
           Requires: gtk2 >= 2.20
           Installed: gtk2-2.18.9-12.el6.x86_64 (@anaconda-RedHatEnterpriseLinux-201301301459.x86_64/6.4)
               gtk2 = 2.18.9-12.el6
Error: Package: virt-viewer-0.5.6-6.el6.x86_64 (/virt-viewer-0.5.6-6.el6.x86_64)
           Requires: glib2 >= 2.26
           Installed: glib2-2.22.5-7.el6.x86_64 (@anaconda-RedHatEnterpriseLinux-201301301459.x86_64/6.4)
               glib2 = 2.22.5-7.el6
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest

As the result, set VERIFIED

Comment 8 CongDong 2013-07-30 05:42:45 UTC
(In reply to CongDong from comment #7)
> I tried with the virt-viewer-0.5.6-5.el6.
> If I didn't update the glib2, the error message when I install virt-viewer
> is:
> 
> Error: Package: virt-viewer-0.5.6-6.el6.x86_64
> (/virt-viewer-0.5.6-6.el6.x86_64)
>            Requires: gtk2 >= 2.20
>            Installed: gtk2-2.18.9-12.el6.x86_64
> (@anaconda-RedHatEnterpriseLinux-201301301459.x86_64/6.4)
>                gtk2 = 2.18.9-12.el6
> Error: Package: virt-viewer-0.5.6-6.el6.x86_64
> (/virt-viewer-0.5.6-6.el6.x86_64)
>            Requires: glib2 >= 2.26
>            Installed: glib2-2.22.5-7.el6.x86_64
> (@anaconda-RedHatEnterpriseLinux-201301301459.x86_64/6.4)
>                glib2 = 2.22.5-7.el6
>  You could try using --skip-broken to work around the problem
>  You could try running: rpm -Va --nofiles --nodigest
> 
> As the result, set VERIFIED

Sorry, I file the wrong comment, I'll verify it later.

Comment 9 CongDong 2013-07-30 06:25:12 UTC
I can reproduce this with virt-viewer-0.5.6-2.el6.x86_64.

Steps:
As the steps in description.

# virt-viewer C --spice-ca-file='/etc/pki/libvirt-spice/ca-cert.pem' --spice-host-subject="C=IL,L=Raanana,O=Red Hat,CN=my server"

#remote-viewer spice://127.0.0.1/?tls-port=5901 --spice-host-subject="C=IL,L=Raanana,O=Red Hat,CN=my server" --spice-ca-file='/etc/pki/libvirt-spice/ca-cert.pem'

Result:
virt-viewer can't connect vm, but remote-viewer works well.



Verify:
Steps:
As the steps in description.

Result:
virt-viewer and remote-viewer can connect vm successfully both.

As the result , set VERIFIED.

Comment 10 errata-xmlrpc 2013-11-21 08:11:35 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-2013-1578.html