summaryrefslogtreecommitdiffstats
path: root/apex/overcloud
diff options
context:
space:
mode:
authorTim Rozet <trozet@redhat.com>2017-09-28 15:00:17 -0400
committerTim Rozet <trozet@redhat.com>2017-09-29 16:41:11 -0400
commit8a8cb8e901db314fa59ed5275040b9e49b36663c (patch)
treee2822a2e570ff131b0d0562bbb3fce54e050a268 /apex/overcloud
parentefebeeccabce03946cb5e58ee6a4eac93ec015cd (diff)
Fixes nova migration
Nova migration was failing in rally sanity test. Looking at the keys nova is configured with, the newlines in the private key were being converted to spaces in hieradata, thus making the key invalid. This patch corrects the yaml so it is multiline data. Also, corrects the parameter being set to the right THT parameter and adds sshd service to the control/compute roles which is required for migration to work. JIRA: APEX-525 Change-Id: Ic57db5c0b27df2e1f584f3c1a379e067291d892d Signed-off-by: Tim Rozet <trozet@redhat.com>
Diffstat (limited to 'apex/overcloud')
-rw-r--r--apex/overcloud/overcloud_deploy.py11
1 files changed, 7 insertions, 4 deletions
diff --git a/apex/overcloud/overcloud_deploy.py b/apex/overcloud/overcloud_deploy.py
index ec07b33d..93732bf3 100644
--- a/apex/overcloud/overcloud_deploy.py
+++ b/apex/overcloud/overcloud_deploy.py
@@ -308,8 +308,7 @@ def make_ssh_key():
crypto_serialization.Encoding.OpenSSH,
crypto_serialization.PublicFormat.OpenSSH
)
- pub_key = re.sub('ssh-rsa\s*', '', public_key.decode('utf-8'))
- return private_key.decode('utf-8'), pub_key
+ return private_key.decode('utf-8'), public_key.decode('utf-8')
def prep_env(ds, ns, inv, opnfv_env, net_env, tmp_dir):
@@ -370,9 +369,13 @@ def prep_env(ds, ns, inv, opnfv_env, net_env, tmp_dir):
if 'CloudDomain' in line:
output_line = " CloudDomain: {}".format(ns['domain_name'])
elif 'replace_private_key' in line:
- output_line = " key: '{}'".format(private_key)
+ output_line = " private_key: |\n"
+ key_out = ''
+ for line in private_key.splitlines():
+ key_out += " {}\n".format(line)
+ output_line += key_out
elif 'replace_public_key' in line:
- output_line = " key: '{}'".format(public_key)
+ output_line = " public_key: '{}'".format(public_key)
if ds_opts['sdn_controller'] == 'opendaylight' and \
'odl_vpp_routing_node' in ds_opts: