Nodepool Raising SSHException

asked 2014-05-23 06:33:49 -0600

mstrisoline gravatar image

updated 2014-05-23 07:25:59 -0600

I have been looking into nodepool to expand our jenkins test infrastructure and keep running into this error.

It appears that paramiko is failing to establish the connection because of unknown host keys. I have tried to set the client ssh_config to use StrictHostKeyChecking no but it doesn't seem to acknowledge that within paramiko itself. I Have tested the keys being used and they do work successfully from the server running nodepool.

root@nodepool:/root# nodepool image-update nova00 fedora20-qcow2
INFO:nodepool.ImageUpdater:Creating image id: 36 with hostname for fedora20-qcow2 in nova00
INFO:requests.packages.urllib3.connectionpool:Starting new HTTP connection (1):
INFO:requests.packages.urllib3.connectionpool:Starting new HTTP connection (1):
INFO:paramiko.transport:Connected (version 2.0, client OpenSSH_6.3)
/usr/local/lib/python2.7/dist-packages/paramiko/ UserWarning: Unknown ssh-rsa host key for 58183977c83ae4c0d4fda09c181efaf7
  (key.get_name(), hostname, hexlify(key.get_fingerprint())))
ERROR:nodepool.ImageUpdater:Exception updating image fedora20-qcow2 in nova00:
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/nodepool/", line 700, in _run
  File "/usr/local/lib/python2.7/dist-packages/nodepool/", line 778, in updateImage
    self.bootstrapServer(server, key, use_password=use_password)
  File "/usr/local/lib/python2.7/dist-packages/nodepool/", line 821, in bootstrapServer
  File "/usr/local/lib/python2.7/dist-packages/nodepool/", line 48, in ssh_connect
    client = SSHClient(ip, username, **connect_kwargs)
  File "/usr/local/lib/python2.7/dist-packages/nodepool/", line 30, in __init__
  File "/usr/local/lib/python2.7/dist-packages/paramiko/", line 273, in connect
    self._auth(username, password, pkey, key_filenames, allow_agent, look_for_keys)
  File "/usr/local/lib/python2.7/dist-packages/paramiko/", line 457, in _auth
    raise SSHException('No authentication methods available')
SSHException: No authentication methods available
INFO:nodepool.NodePool:Deleted image id: 36

Included is the nodepool.yaml

script-dir: .
dburi: 'mysql://nodepool@localhost/nodepool'

  check: '*/15 * * * *'
  cleanup: '*/1 * * * *'
  update-image: '14 2 * * *'

  - tcp://localhost:8888

  - name: fedora20-qcow2
    image: fedora20-qcow2
    min-ready: 1
      - name: nova00

  - name: nova00
    keypair: 'jenkins-key'
    username: 'admin'
    password: 'admin'
    auth-url: ''
    project-id: 'admin'
    max-servers: 3
    pool: 'ext-net'
    boot-timeout: 120
    launch-timeout: 900
      - net-id: 'b22df07b-0cb6-4226-91e3-ac206af727d4'
      - name: fedora20-qcow2
        base-image: 'fedora20-qcow2'
        min-ram: 2048
        username: fedora
        private-key: /var/lib/jenkins/.ssh/id_rsa

  - name: test-infra-jenkins
      user: jenkins
      apikey: **************************

So I added some debugging to this:

lass SSHClient(object):
    def __init__(self, ip, username, password=None, pkey=None,
                 key_filename=None, log=None):
        print "ip: %s" % (ip)
        print "username: %s" % (username)
        print "password: %s" % (password)
        print "pkey: %s" % (pkey)
        print "key_filename: %s" % (key_filename)
        print log

        client = paramiko.SSHClient()
        client.connect(ip, username=username, password=password, pkey=pkey,
        self.client = client
        self.log = log

And this is the output:

root@nodepool:/# nodepool -c /etc/nodepool/nodepool.yaml image-update nova00 fedora20-qcow2
INFO:nodepool ...
edit retag flag offensive close merge delete