From 11f094f3074b95c583fdf20e09f1d01ecf27e039 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Harald=20Jens=C3=A5s?= Date: Tue, 20 Mar 2018 20:37:41 +0100 Subject: [PATCH] Fix pre-flight validation undercloud-passwords.conf Change Ib0c2e3ffd81742441400d27857afae457d71a424 moved the undercloud-passwords.conf to constants.UNDERCLOUD_OUTPUT_DIR. Re running undercloud installer fails becuase the preflight validation does not find the password file if it the output directory is not $HOME. This changes the preflight code too use the constant specifying the output dir. Change-Id: Ib7dfe35b64509cb28ed4e2b5946a66aa4c8af95d --- tripleoclient/v1/undercloud_preflight.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tripleoclient/v1/undercloud_preflight.py b/tripleoclient/v1/undercloud_preflight.py index 7ac343363..e27075f52 100644 --- a/tripleoclient/v1/undercloud_preflight.py +++ b/tripleoclient/v1/undercloud_preflight.py @@ -25,6 +25,8 @@ import psutil from oslo_config import cfg +from tripleoclient import constants + class FailedValidation(Exception): pass @@ -34,7 +36,9 @@ CONF = cfg.CONF # We need 8 GB, leave a little room for variation in what 8 GB means on # different platforms. REQUIRED_MB = 7680 -PASSWORD_PATH = os.path.expanduser('~/undercloud-passwords.conf') +PASSWORD_PATH = '%s/%s' % (constants.UNDERCLOUD_OUTPUT_DIR, + 'undercloud-passwords.conf') + LOG = logging.getLogger(__name__ + ".UndercloudSetup")