Browse Source

Fix debug logging during cluster upgrade

Incorrectly formatted logging causes error. This PS fixes it.

Story: 2008628
Task: 41833

Change-Id: Iac87a4a56187694d5f5b3454de380de6b6db48fa
changes/99/775599/4
Bharat Kunwar 4 months ago
parent
commit
00f8aa5d67
1 changed files with 3 additions and 1 deletions
  1. +3
    -1
      magnum/drivers/heat/driver.py

+ 3
- 1
magnum/drivers/heat/driver.py 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]):


Loading…
Cancel
Save