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
This commit is contained in:
Harald Jensås 2018-03-20 20:37:41 +01:00
parent e3695e44b5
commit 11f094f307
1 changed files with 5 additions and 1 deletions

View File

@ -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")