Bug#513599: [Pkg-libvirt-maintainers] Bug#513599: Can't connect to remote host via ssh without ssh-askpass*

2009-02-08 Thread Sebastian Andrzej Siewior
* Guido Günther | 2009-02-07 18:19:52 [+0100]:

On Thu, Feb 05, 2009 at 01:33:12PM +0100, Sebastian Andrzej Siewior wrote:
 Did you have something like the attached patch in mind?
Yes, but we should check if the error originates from virConnectOpenAuth
to make sure we're not even more confusing.
Could you add that too?
I'm not sure if I understood you. According to the code:
|def openAuth(uri, auth, flags):
|ret = libvirtmod.virConnectOpenAuth(uri, auth, flags)
|if ret is None:raise libvirtError('virConnectOpenAuth() failed')
|return virConnect(_obj=ret)

I would say that the error always originates from virConnectOpenAuth()
since this is the only place where an exception is thrown. The
virConnect() call looks like a constructor which can't fail / does not
throw anything.
I was thinking about parsing value which contains the error message.
However the message depends on the locale and shouldn't be used.
Furthermore I'm always getting connection reset by peer no matter if I
entered my password wrong or had a typo in the hostname.

openAuth() is called for all protocols so I modified my patch to give
this install ssh-askpass just if the protocol is ssh.

 -- Guido

Sebastian
--- a/src/virtManager/connection.py
+++ b/src/virtManager/connection.py
@@ -489,13 +489,19 @@ class vmmConnection(gobject.GObject):
 except:
 self.state = self.STATE_DISCONNECTED
 
+if self.uri.find(+ssh://)  0:
+  hint = \nMaybe you need to install ssh-askpass  + \
+ in order to authenticate.
+else:
+  hint = 
+
 (type, value, stacktrace) = sys.exc_info ()
 # Detailed error message, in English so it can be Googled.
 self.connectError = \
 (Unable to open connection to hypervisor URI '%s':\n %
  str(self.uri)) + \
 str(type) +   + str(value) + \n + \
-traceback.format_exc (stacktrace)
+traceback.format_exc (stacktrace) + hint
 logging.error(self.connectError)
 
 # We want to kill off this thread asap, so schedule a gobject


Bug#513599: [Pkg-libvirt-maintainers] Bug#513599: Can't connect to remote host via ssh without ssh-askpass*

2009-02-07 Thread Guido Günther
On Thu, Feb 05, 2009 at 01:33:12PM +0100, Sebastian Andrzej Siewior wrote:
 Did you have something like the attached patch in mind?
Yes, but we should check if the error originates from virConnectOpenAuth
to make sure we're not even more confusing.
Could you add that too?
 -- Guido



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#513599: [Pkg-libvirt-maintainers] Bug#513599: Can't connect to remote host via ssh without ssh-askpass*

2009-02-07 Thread Sebastian Andrzej Siewior
* Guido Günther | 2009-02-07 18:19:52 [+0100]:

On Thu, Feb 05, 2009 at 01:33:12PM +0100, Sebastian Andrzej Siewior wrote:
 Did you have something like the attached patch in mind?
Yes, but we should check if the error originates from virConnectOpenAuth
to make sure we're not even more confusing.
Could you add that too?
I'm not a python expert but let me look what I can do :)

 -- Guido

Sebastian



--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#513599: [Pkg-libvirt-maintainers] Bug#513599: Can't connect to remote host via ssh without ssh-askpass*

2009-02-05 Thread Guido Günther
On Fri, Jan 30, 2009 at 04:57:18PM +0100, Sebastian Andrzej Siewior wrote:
 Package: virt-manager
 Version: 0.6.0-6
 Severity: wishlist
 
 If someone is connecting to a remote host via ssh virt-manager fails to 
 connect
 if there is no auto-connect available (i.e. the remote key has a sshkey
 with no passphrase).
 The only solution is to install a tool which ask you for a password like
 * ssh-askpass
 * ssh-askpass-fullscreen
 * ssh-askpass-gnome
I wonder if the suggestion alone help to figure out the root of the
problem? Wouldn't it be better to improve the error message provided to
the user?
Cheers,
 -- Guido



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#513599: [Pkg-libvirt-maintainers] Bug#513599: Can't connect to remote host via ssh without ssh-askpass*

2009-02-05 Thread Sebastian Andrzej Siewior
* Guido G?nther | 2009-02-05 11:10:07 [+0100]:

On Fri, Jan 30, 2009 at 04:57:18PM +0100, Sebastian Andrzej Siewior wrote:
 Package: virt-manager
 Version: 0.6.0-6
 Severity: wishlist
 
 If someone is connecting to a remote host via ssh virt-manager fails to 
 connect
 if there is no auto-connect available (i.e. the remote key has a sshkey
 with no passphrase).
 The only solution is to install a tool which ask you for a password like
 * ssh-askpass
 * ssh-askpass-fullscreen
 * ssh-askpass-gnome
I wonder if the suggestion alone help to figure out the root of the
problem? Wouldn't it be better to improve the error message provided to
the user?

Did you have something like the attached patch in mind?

Cheers,
 -- Guido

Sebastian
--- a/src/virtManager/connection.py
+++ b/src/virtManager/connection.py
@@ -495,7 +495,10 @@ class vmmConnection(gobject.GObject):
 (Unable to open connection to hypervisor URI '%s':\n %
  str(self.uri)) + \
 str(type) +   + str(value) + \n + \
-traceback.format_exc (stacktrace)
+traceback.format_exc (stacktrace) + \
+\nMaybe you need to install ssh-askpass in order  + \
+to authenticate.
+
 logging.error(self.connectError)
 
 # We want to kill off this thread asap, so schedule a gobject


Bug#513599: Can't connect to remote host via ssh without ssh-askpass*

2009-01-30 Thread Sebastian Andrzej Siewior
Package: virt-manager
Version: 0.6.0-6
Severity: wishlist

If someone is connecting to a remote host via ssh virt-manager fails to connect
if there is no auto-connect available (i.e. the remote key has a sshkey
with no passphrase).
The only solution is to install a tool which ask you for a password like
* ssh-askpass
* ssh-askpass-fullscreen
* ssh-askpass-gnome

Now, virt-manager will ask for the root password if neccessary and will
not bail out with this error message:
|Unable to open connection to hypervisor URI 'qemu+ssh://r...@box/system':
|class 'libvirt.libvirtError' Connection reset by peer
|Traceback (most recent call last):
|  File /usr/share/virt-manager/virtManager/connection.py, line 486, in 
_open_thread
|None], flags)
|  File /usr/lib/python2.5/site-packages/libvirt.py, line 99, in openAuth
|if ret is None:raise libvirtError('virConnectOpenAuth() failed')
|libvirtError: Connection reset by peer
|

Please add depends/recommends on one of these tools. Maybe upstream
could add a hint or something.

Sebastian



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org