Merge "Fix debug logging during cluster upgrade" into stable/victoria

This commit is contained in:
Zuul 2021-03-29 11:59:35 +00:00 committed by Gerrit Code Review
commit bc0cd02892
1 changed files with 3 additions and 1 deletions

View File

@ -331,15 +331,17 @@ class FedoraKubernetesDriver(KubernetesDriver):
LOG.debug(("Cluster template %s does not contain a " LOG.debug(("Cluster template %s does not contain a "
"valid kube_tag"), cluster_template.name) "valid kube_tag"), cluster_template.name)
# If both keys are present, only ostree_commit is chosen.
for ostree_tag in ["ostree_commit", "ostree_remote"]: for ostree_tag in ["ostree_commit", "ostree_remote"]:
try: try:
ostree_param = { ostree_param = {
ostree_tag: cluster_template.labels[ostree_tag] ostree_tag: cluster_template.labels[ostree_tag]
} }
heat_params.update(ostree_param) heat_params.update(ostree_param)
break
except KeyError: except KeyError:
LOG.debug("Cluster template %s does not define %s", LOG.debug("Cluster template %s does not define %s",
(cluster_template.name, ostree_tag)) cluster_template.name, ostree_tag)
upgrade_labels = ['kube_tag', 'ostree_remote', 'ostree_commit'] upgrade_labels = ['kube_tag', 'ostree_remote', 'ostree_commit']
if not any([u in heat_params.keys() for u in upgrade_labels]): if not any([u in heat_params.keys() for u in upgrade_labels]):