diff --git a/releasenotes/notes/remove-default-overcloud-ssh-key-7341a84480727234.yaml b/releasenotes/notes/remove-default-overcloud-ssh-key-7341a84480727234.yaml new file mode 100644 index 000000000..3402f1423 --- /dev/null +++ b/releasenotes/notes/remove-default-overcloud-ssh-key-7341a84480727234.yaml @@ -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. diff --git a/tripleoclient/v1/overcloud_deploy.py b/tripleoclient/v1/overcloud_deploy.py index 41e522e77..1f95f5724 100644 --- a/tripleoclient/v1/overcloud_deploy.py +++ b/tripleoclient/v1/overcloud_deploy.py @@ -18,7 +18,6 @@ import argparse import logging import os import os.path -import pwd import re import shutil import six @@ -741,7 +740,6 @@ class DeployOvercloud(command.Command): ) parser.add_argument( '--overcloud-ssh-key', - default=pwd.getpwuid(os.getuid()).pw_name, help=_('Key path for ssh access to overcloud nodes.') ) parser.add_argument( diff --git a/tripleoclient/workflows/deployment.py b/tripleoclient/workflows/deployment.py index 06d99cebd..a1934fd42 100644 --- a/tripleoclient/workflows/deployment.py +++ b/tripleoclient/workflows/deployment.py @@ -118,8 +118,10 @@ def config_download(log, clients, stack, templates, deployed_server, env = os.environ.copy() env.update(dict(OVERCLOUD_HOSTS=' '.join(ips), - OVERCLOUD_SSH_USER=ssh_user, - OVERCLOUD_SSH_KEY=ssh_key)) + OVERCLOUD_SSH_USER=ssh_user)) + + if ssh_key: + env['OVERCLOUD_SSH_KEY'] = ssh_key proc = subprocess.Popen([script_path], env=env, shell=True, stdout=subprocess.PIPE,