Add support for 'admin' user for OVH

OVH images have, of course, yet another 'root' user they would like
us to use instead of root.

Change-Id: If8cc3d31862e352eed40fc041a4c6c695a35063a
This commit is contained in:
James E. Blair 2015-09-16 10:32:17 -07:00
parent e186820ca5
commit 3fc24b6b7f
2 changed files with 3 additions and 1 deletions

View File

@ -67,7 +67,7 @@ def bootstrap_server(server, admin_pass, key, cert, environment, name,
else:
ssh_kwargs['password'] = admin_pass
for username in ['root', 'ubuntu', 'centos']:
for username in ['root', 'ubuntu', 'centos', 'admin']:
ssh_client = utils.ssh_connect(ip, username, ssh_kwargs, timeout=600)
if ssh_client:
break

View File

@ -179,6 +179,8 @@ def ssh_connect(ip, username, connect_kwargs={}, timeout=60):
except socket.error as e:
print "While testing ssh access:", e
time.sleep(5)
except paramiko.ssh_exception.AuthenticationException:
return None
ret, out = client.ssh("echo access okay")
if "access okay" in out: