Browse Source

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
Dan Prince 1 year ago
parent
commit
1179f411de
1 changed files with 5 additions and 2 deletions
  1. 5
    2
      heat-config/os-refresh-config/configure.d/55-heat-config

+ 5
- 2
heat-config/os-refresh-config/configure.d/55-heat-config View File

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

Loading…
Cancel
Save