Include hiera.datafiles in output for legacy data check

To aid debugging, particularly in CI, include the non-empty data
so we can see where it's coming from.

Change-Id: I7de5c32c6d9ec689ea0d7716daa9c90234991dfa
Related-Bug: #1680996
This commit is contained in:
Steven Hardy 2017-04-10 14:01:18 +01:00
parent 251d7ab695
commit dc343a1070
1 changed files with 4 additions and 3 deletions

View File

@ -49,11 +49,12 @@ def exit_legacy_hiera_detected():
stdout=subprocess.PIPE,
stderr=subprocess.PIPE)
stdout, stderr = subproc.communicate()
if stdout.rstrip() != 'empty':
rs_stdout = stdout.rstrip()
if rs_stdout != 'empty':
err_msg = ('Legacy hieradata from os-apply-config has been '
'detected. Please update all of your interfaces '
'detected - %s. Please update all of your interfaces '
'to use the new heat-agents hiera hook before '
'proceeding')
'proceeding' % rs_stdout)
response = {
'deploy_stdout': stdout,
'deploy_stderr': err_msg,