From dc343a1070ba37e2e26e138cd3f809a0a4ec77d7 Mon Sep 17 00:00:00 2001 From: Steven Hardy Date: Mon, 10 Apr 2017 14:01:18 +0100 Subject: [PATCH] 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 --- heat-config-hiera/install.d/hook-hiera.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/heat-config-hiera/install.d/hook-hiera.py b/heat-config-hiera/install.d/hook-hiera.py index adc6aba..e94ac3e 100755 --- a/heat-config-hiera/install.d/hook-hiera.py +++ b/heat-config-hiera/install.d/hook-hiera.py @@ -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,