whitelist os-apply-config group in 55-heat-config

This patch whitelists the os-apply-config 'group' from getting logged
as an error message because there is no hook script. This is a legacy
group used in TripleO for several things.

Change-Id: If128d8e707548815defc72212c59ad53348b5adf
Closes-bug: #1715497
This commit is contained in:
Dan Prince 2017-09-06 17:30:01 -04:00
parent 6e8e631d34
commit 1179f411de
1 changed files with 5 additions and 2 deletions

View File

@ -20,6 +20,8 @@ import stat
import subprocess
import sys
# legacy groups that have never had a hook script
WHITELISTED_MISSING_HOOK_SCRIPTS = ['os-apply-config']
HOOKS_DIR_PATHS = (
os.environ.get('HEAT_CONFIG_HOOKS'),
'/usr/libexec/heat-config/hooks',
@ -128,8 +130,9 @@ def invoke_hook(c, log):
hook_path = find_hook_path(c['group'])
if not hook_path:
log.error('Skipping group %s with no hook script %s' % (
c['group'], hook_path))
if not c['group'] in WHITELISTED_MISSING_HOOK_SCRIPTS:
log.error('Skipping group %s with no hook script %s' % (
c['group'], hook_path))
return
# write out config, which indicates it is deployed regardless of