Remove default for --overcloud-ssh-key

The default value for --overcloud-ssh-key was wrong (it was actually a
username). Instead of using a default value at all, just remove the
default since we can't sanely pick one.

Change-Id: I57a7293f0cc08b0fab0ee7c2f0b4c0a8b2bd2f44
Closes-Bug: #1736606
This commit is contained in:
James Slagle 2017-12-05 17:43:01 -05:00
parent cc5fee3cab
commit ea80a56987
3 changed files with 9 additions and 4 deletions

View File

@ -0,0 +1,5 @@
---
fixes:
- The default value for --overcloud-ssh-key was wrong (it was actually a
username). Instead of using a default value at all, just remove the default
since we can't sanely pick one.

View File

@ -18,7 +18,6 @@ import argparse
import logging import logging
import os import os
import os.path import os.path
import pwd
import re import re
import shutil import shutil
import six import six
@ -741,7 +740,6 @@ class DeployOvercloud(command.Command):
) )
parser.add_argument( parser.add_argument(
'--overcloud-ssh-key', '--overcloud-ssh-key',
default=pwd.getpwuid(os.getuid()).pw_name,
help=_('Key path for ssh access to overcloud nodes.') help=_('Key path for ssh access to overcloud nodes.')
) )
parser.add_argument( parser.add_argument(

View File

@ -118,8 +118,10 @@ def config_download(log, clients, stack, templates, deployed_server,
env = os.environ.copy() env = os.environ.copy()
env.update(dict(OVERCLOUD_HOSTS=' '.join(ips), env.update(dict(OVERCLOUD_HOSTS=' '.join(ips),
OVERCLOUD_SSH_USER=ssh_user, OVERCLOUD_SSH_USER=ssh_user))
OVERCLOUD_SSH_KEY=ssh_key))
if ssh_key:
env['OVERCLOUD_SSH_KEY'] = ssh_key
proc = subprocess.Popen([script_path], env=env, shell=True, proc = subprocess.Popen([script_path], env=env, shell=True,
stdout=subprocess.PIPE, stdout=subprocess.PIPE,