Actions
Bug #8904
closedteuthology BadHostKeyException on vps.
Status:
Closed
Priority:
Normal
Assignee:
-
Category:
-
% Done:
0%
Source:
Q/A
Tags:
Backport:
Regression:
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Crash signature (v1):
Crash signature (v2):
Description
teuthology/task/internal.py loses the host key in the commented out code below.
def connect(ctx, config): """ Open a connection to a remote host. """ log.info('Opening connections...') from ..orchestra import remote from ..orchestra import cluster remotes = [] machs = [] for name in ctx.config['targets'].iterkeys(): machs.append(name) for t, key in ctx.config['targets'].iteritems(): log.debug('connecting to %s', t) try: if ctx.config['sshkeys'] == 'ignore': key = None except (AttributeError, KeyError): pass """ DOES ANYONE KNOW WHY THESE NEXT 3 LINES ARE HERE? if key.startswith('ssh-rsa ') or key.startswith('ssh-dss '): if teuthology.is_vm(t): key = None """ remotes.append( remote.Remote(name=t, host_key=key, keep_alive=True, console=None)) ctx.cluster = cluster.Cluster() if 'roles' in ctx.config: for rem, roles in zip(remotes, ctx.config['roles']): assert all(isinstance(role, str) for role in roles), \ "Roles in config must be strings: %r" % roles ctx.cluster.add(rem, roles) log.info('roles: %s - %s' % (rem, roles)) else: for rem in remotes: ctx.cluster.add(rem, rem.name)
The results of running teuthology install before the indicated lines were commented out were:
014-07-22 14:02:56,542.542 INFO:teuthology.task.internal:Opening connections... 2014-07-22 14:02:56,543.543 DEBUG:teuthology.task.internal:connecting to ubuntu@vpm042.front.sepia.ceph.com 2014-07-22 14:03:05,148.148 INFO:teuthology.orchestra.connection:{'username': 'ubuntu', 'hostname': 'vpm042.front.sepia.ceph.com', 'timeout': 60} 2014-07-22 14:03:06,713.713 DEBUG:teuthology.task.internal:connecting to ubuntu@vpm034.front.sepia.ceph.com 2014-07-22 14:03:14,992.992 INFO:teuthology.orchestra.connection:{'username': 'ubuntu', 'hostname': 'vpm034.front.sepia.ceph.com', 'timeout': 60} 2014-07-22 14:03:16,201.201 ERROR:teuthology.run_tasks:Saw exception from tasks. Traceback (most recent call last): File "/home/wusui/src/teuthology/teuthology/run_tasks.py", line 43, in run_tasks manager = run_one_task(taskname, ctx=ctx, config=config) File "/home/wusui/src/teuthology/teuthology/run_tasks.py", line 31, in run_one_task return fn(**kwargs) File "/home/wusui/src/teuthology/teuthology/task/internal.py", line 221, in connect remote.Remote(name=t, host_key=key, keep_alive=True, console=None)) File "/home/wusui/src/teuthology/teuthology/orchestra/remote.py", line 50, in __init__ self.ssh = ssh or self.connect() File "/home/wusui/src/teuthology/teuthology/orchestra/remote.py", line 55, in connect keep_alive=self.keep_alive) File "/home/wusui/src/teuthology/teuthology/orchestra/connection.py", line 99, in connect ssh.connect(**connect_args) File "/home/wusui/src/teuthology/virtualenv/local/lib/python2.7/site-packages/paramiko/client.py", line 262, in connect raise BadHostKeyException(hostname, server_key, our_server_key) BadHostKeyException: ('vpm034.front.sepia.ceph.com', <paramiko.rsakey.RSAKey object at 0x2a0cf50>, <paramiko.rsakey.RSAKey object at 0x28e4490>) 2014-07-22 14:03:16,203.203 DEBUG:teuthology.run_tasks:Exception was not quenched, exiting: BadHostKeyException: ('vpm034.front.sepia.ceph.com', <paramiko.rsakey.RSAKey object at 0x2a0cf50>, <paramiko.rsakey.RSAKey object at 0x28e4490>) 2014-07-22 14:03:16,209.209 INFO:teuthology.run:Summary data: {failure_reason: '(''vpm034.front.sepia.ceph.com'', <paramiko.rsakey.RSAKey object at 0x2a0cf50>, <paramiko.rsakey.RSAKey object at 0x28e4490>)', owner: wusui@aardvark, success: false}
Things seem to work better without those lines.
Updated by Anonymous almost 10 years ago
- Status changed from New to Closed
This was caused by a bad yaml file.
Actions