Merge "Fix sysinv-helm command."

This commit is contained in:
Zuul 2024-03-04 19:00:26 +00:00 committed by Gerrit Code Review
commit ff0a24e8db
1 changed files with 9 additions and 0 deletions

View File

@ -2398,6 +2398,15 @@ class AppOperator(object):
then overwrite needs to be enabled to do the replacement
"""
# sysinv-helm command execution produces an empty cache. If empty, prime the
# cache with expected keys.
if not bool(apps_metadata_dict):
for k in [constants.APP_METADATA_APPS,
constants.APP_METADATA_PLATFORM_MANAGED_APP,
constants.APP_METADATA_DESIRED_STATES]:
apps_metadata_dict[k] = {}
if not overwrite and \
app_name in apps_metadata_dict[constants.APP_METADATA_APPS]:
LOG.info("Updating metadata for app {} skipped because metadata "