Your message dated Sat, 12 Sep 2015 00:32:07 +0200
with message-id <[email protected]>
and subject line Fixed in paramiko 1.15.0
has caused the Debian Bug report #753290,
regarding [fabric] does not handle all ssh_config file representations
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
753290: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=753290
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: fabric
Version: 1.8.2-1
Severity: minor

--- Please enter the report below this line. ---
Not sure this is not a python-paramiko bug

I have a very simple fabfile:
===== fabfile.py =====
from fabric.api import run, env

env.use_ssh_config = True

def host_type():
    run('hostname -f')
    run('lsb_release -a')
================

If I run this with a ~.ssh/config like:
===== ~/.ssh/config =====
Host *
  User = root
  Compression = yes
  ControlMaster = auto
  ControlPath = ~/.ssh/sock/ssh_%r@%h:%p
  ControlPersist = 2h
  ForwardAgent = yes
  HashKnownHosts = no
  ServerAliveInterval = 250
  IdentityFile ~/.ssh/id_rsa
===================

I got errors like this:
==========
fab -H test_host host_type                                                      
                                                                                
                     1 ↵
[test_host] Executing task 'host_type'
[test_host] run: hostname -f
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/fabric/main.py", line 743, in main
    *args, **kwargs
  File "/usr/lib/python2.7/dist-packages/fabric/tasks.py", line 368, in execute
    multiprocessing
  File "/usr/lib/python2.7/dist-packages/fabric/tasks.py", line 264, in _execute
    return task.run(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/fabric/tasks.py", line 171, in run
    return self.wrapped(*args, **kwargs)
  File "/home/lminoza/src/fab/fabfile.py", line 7, in host_type
    run('hostname -f')
  File "/usr/lib/python2.7/dist-packages/fabric/network.py", line 639, in 
host_prompting_wrapper
    return func(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/fabric/operations.py", line 1042, in 
run
    shell_escape=shell_escape)
  File "/usr/lib/python2.7/dist-packages/fabric/operations.py", line 909, in 
_run_command
    channel=default_channel(), command=wrapped_command, pty=pty,
  File "/usr/lib/python2.7/dist-packages/fabric/state.py", line 388, in 
default_channel
    chan = _open_session()
  File "/usr/lib/python2.7/dist-packages/fabric/state.py", line 380, in 
_open_session
    return connections[env.host_string].get_transport().open_session()
  File "/usr/lib/python2.7/dist-packages/fabric/network.py", line 151, in 
__getitem__
    self.connect(key)
  File "/usr/lib/python2.7/dist-packages/fabric/network.py", line 143, in 
connect
    self[key] = connect(user, host, port, cache=self)
  File "/usr/lib/python2.7/dist-packages/fabric/network.py", line 444, in 
connect
    sock=sock
  File "/usr/lib/python2.7/dist-packages/paramiko/client.py", line 273, in 
connect
    self._auth(username, password, pkey, key_filenames, allow_agent, 
look_for_keys)
  File "/usr/lib/python2.7/dist-packages/paramiko/client.py", line 387, in _auth
    key = pkey_class.from_private_key_file(key_filename, password)
  File "/usr/lib/python2.7/dist-packages/paramiko/pkey.py", line 182, in 
from_private_key_file
    key = cls(filename=filename, password=password)
  File "/usr/lib/python2.7/dist-packages/paramiko/rsakey.py", line 55, in 
__init__
    self._from_private_key_file(filename, password)
  File "/usr/lib/python2.7/dist-packages/paramiko/rsakey.py", line 165, in 
_from_private_key_file
    data = self._read_private_key_file('RSA', filename, password)
  File "/usr/lib/python2.7/dist-packages/paramiko/pkey.py", line 254, in 
_read_private_key_file
    with open(filename, 'r') as f:
IOError: [Errno 2] No such file or directory: ' /home/lminoza/.ssh/id_rsa'
==========

It takes me hours to view the space at the beginning of the past on the last 
line. Rewriting my ~/.ssh/config file with single space instead of ' = ' 
between keys and values makes me able to log on my servers and use fabric.

--- System information. ---
Architecture: amd64
Kernel: Linux 3.14-1-amd64

Debian Release: jessie/sid
500 unstable http.debian.net
500 testing-updates http.debian.net
500 testing security.debian.org
500 testing http.debian.net
500 stable-updates http.debian.net
500 stable security.debian.org
500 stable http.debian.net
101 experimental http.debian.net
100 wheezy-backports http.debian.net

--- Package information. ---
Depends (Version) | Installed
===================================-+-===========
python (>= 2.7) | 2.7.6-2
python (<< 2.8) | 2.7.6-2
python-paramiko (>= 1.6) | 1.14.0-2
python-pkg-resources | 4.0.1-1
python-nose | 1.3.3-1


Package's Recommends field is empty.

Suggests (Version) | Installed
===========================-+-===========
libjs-jquery | 1.7.2+dfsg-3





--

Landry MINOZA
MGI Sud-Ouest
Pour le compte du département informatique
de l’établissement public de musée d’Orsay et de l’Orangerie
Chef de projet technique Linux et réseaux
E-mail : [email protected]<mailto:[email protected]>


Tél :01 40 49 47 15


Musée d’Orsay et de l’Orangerie :62 rue de Lille - 75343 Paris Cedex 07 | 
www.musee-orsay.fr<http://www.musee-orsay.fr>

MGI France :5 rue Sextius Michel - 75015 Paris | RCS: Paris B 382 770 584 | 
www.mgi.fr<http://www.mgi.fr>
MGI SO :281 route d'Espagne - 31100 Toulouse | RCS: Toulouse B 421 125 816 | 
www.mgi.fr<http://www.mgi.fr>
MGI Suisse :5 avenue de Rothorn - CH3960 Sierre | TVA 517-269 | 
www.mgiconsultants.ch<http://www.mgiconsultants.ch>


--- End Message ---
--- Begin Message ---
reassign 753290 paramiko 1.14.0-1
fixed 753290 1.15.1-1

I managed to reproduce this with paramiko 1.14.0, which was the latest
version at the time this bug was reported. 1.14.1 and 1.14.2 also has
the same bug.

With paramiko 1.15.0 this bug cannot be reproduced.

https://github.com/paramiko/paramiko/pull/184 seems to be the relevant
upstream change that fixed this.

I used fabric 0.10.2 for all attempts.

-- 
Stein Magnus Jodal

Attachment: signature.asc
Description: Digital signature


--- End Message ---

Reply via email to