Bug 971558 - spice via gi just prints warning if http proxy fails, would prefer the error be raised to the client
spice via gi just prints warning if http proxy fails, would prefer the error ...
Status: CLOSED UPSTREAM
Product: Fedora
Classification: Fedora
Component: virt-manager (Show other bugs)
19
All Linux
unspecified Severity high
: ---
: ---
Assigned To: Cole Robinson
Fedora Extras Quality Assurance
: Reopened
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-06-06 15:54 EDT by Marcelo Ricardo Leitner
Modified: 2013-09-01 13:26 EDT (History)
10 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-09-01 13:26:52 EDT
Type: Bug
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 Marcelo Ricardo Leitner 2013-06-06 15:54:57 EDT
Hi,

I just upgraded to F19. I have:
virt-manager-0.10.0-0.5.gitde1695b2.fc19.noarch

And when I open a guest console via virt-manager, if it has a dot in the name, it remains a gray screen and doesn't go any further. If guest name doesn't contain the dot, it works.

It happens because I have a local proxy, and when guest name has a dot, it tries to connect via proxy:

1370548338.179      0 ::1 TCP_DENIED/403 3535 CONNECT 127.0.0.1:5901 - HIER_NONE/- text/html
1370548338.180      0 127.0.0.1 TCP_DENIED/403 3537 CONNECT 127.0.0.1:5901 - HIER_NONE/- text/html

Instead of whatever it should be doing.

When it doesn't have a dot, it doesn't access the proxy.

Using  http_proxy= virt-manager  works around the issue.
Comment 1 Marcelo Ricardo Leitner 2013-06-07 10:25:18 EDT
Well.. not so sure about guest name anymore:

Installed another guest, named Fedora2, and same issue: can't open console via virt-manager when http_proxy environment var is configured, even though no proxy request is done.

Fedora2 is not a dns resolvable in here, just in case.

Guest name that works: sf00000000  (where 0 are actual numbers)
Comment 2 Cole Robinson 2013-06-12 16:04:10 EDT
Please provide virt-manager --debug when reproducing, something weird must be going on.

Also 'sudo virsh dumpxml $vmname' of the working VM and the non working VMs
Comment 3 Marcelo Ricardo Leitner 2013-06-13 14:27:32 EDT
Shame on me for not noticing this difference before. --debug allowed me to spot it:

My guests that work, are using VNC. My guests that aren't working, are using Spice, and spice requests are issued through proxy, while vnc ones aren't:

2013-06-13 15:20:51,865 (console:1138): Starting connect process for proto=spice trans=None connhost=localhost connuser=None connport=None gaddr=127.0.0.1 gport=5902 gsocket=N
one
2013-06-13 15:20:51,866 (console:561): spice uri: spice://127.0.0.1?port=5902

(virt-manager:11263): GSpice-WARNING **: HTTP proxy connection failed: 403 Forbidden

2013-06-13 15:21:07,640 (console:413): VNC connection to 127.0.0.1:5902
2013-06-13 15:21:07,927 (console:1053): Viewer connected

And I failed to notice that Forbidden logged in my proxy log, ugh.

Allowed Spice through the proxy and it worked.

Is it really intended to run Spice through the proxy?? If yes, I think we are done here, thanks.
Comment 4 Cole Robinson 2013-06-13 14:38:44 EDT
Yeah I think that's expected behavior. If anything VNC not acknowledging proxy settings is the bug. Closing
Comment 5 Marcelo Ricardo Leitner 2013-06-14 08:18:04 EDT
Hey Cole, but shouldn't we display a better error message, in case of spice/proxy thing? Like we do when connect() fail. I mean, relying on --debug or proxy logs (not always available to one who needs it) to catch this is too internal.

Thanks,
Marcelo.
Comment 6 Cole Robinson 2013-06-14 08:36:13 EDT
(In reply to Marcelo Ricardo Leitner from comment #5)
> Hey Cole, but shouldn't we display a better error message, in case of
> spice/proxy thing? Like we do when connect() fail. I mean, relying on
> --debug or proxy logs (not always available to one who needs it) to catch
> this is too internal.
> 

Agreed it would be nice if we had a way to get this error programmatically in clients, but I don't think spice-gtk gives us a way to do that. Reassigning.
Comment 7 Marc-Andre Lureau 2013-06-14 10:47:31 EDT
Did you set the SPICE_PROXY variable? I wonder why the spice http proxy is involved here.

Regarding error handling, spice-gtk does provide some (although it would need to be impreved, yes), and virt-viewer shows a dialog on connection error. It seems to work in this case too, when proxy fails.

There is a channel-event signal, and the event in this case is SPICE_CHANNEL_ERROR_CONNECT
Comment 8 Marcelo Ricardo Leitner 2013-06-14 10:54:23 EDT
(In reply to Marc-Andre Lureau from comment #7)
> Did you set the SPICE_PROXY variable? I wonder why the spice http proxy is
> involved here.

Nope:
$ export | grep -i proxy
declare -x ftp_proxy="http://localhost:3128/"
declare -x http_proxy="http://localhost:3128/"
$

That was my surprise too, why it was using it.
Comment 9 Cole Robinson 2013-09-01 13:26:52 EDT
Thanks for the pointer Marc-Andre. virt-manager catches spice connection errors now:

commit 82ef6ba1737d1dbe98c70e99bea299e584148ef8
Author: Cole Robinson <crobinso@redhat.com>
Date:   Sun Sep 1 13:25:37 2013 -0400

    console: Catch spice connection errors (bz #971558)

Just closing as UPSTREAM, this will hit Fedora when we rebase

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