Fix debug logging during cluster upgrade

Incorrectly formatted logging causes error. This PS fixes it.

Story: 2008628
Task: 41833

Change-Id: Iac87a4a56187694d5f5b3454de380de6b6db48fa
This commit is contained in:
Bharat Kunwar 2021-02-15 11:05:05 +00:00
parent 3b7a33eb64
commit 00f8aa5d67
1 changed files with 3 additions and 1 deletions

View File

@ -331,6 +331,7 @@ class FedoraKubernetesDriver(KubernetesDriver):
LOG.debug(("Cluster template %s does not contain a "
"valid kube_tag"), cluster_template.name)
# If both keys are present, only ostree_commit is chosen.
for ostree_tag in ["ostree_commit", "ostree_remote"]:
if ostree_tag not in cluster_template.labels:
continue
@ -339,9 +340,10 @@ class FedoraKubernetesDriver(KubernetesDriver):
ostree_tag: cluster_template.labels[ostree_tag]
}
heat_params.update(ostree_param)
break
except KeyError:
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']
if not any([u in heat_params.keys() for u in upgrade_labels]):