Fix ostree_* upgrade

Currently, the code assumes that both
ostree_commit and ostree_remote are present
in cluster_template.labels. If one of them are
missing, the ostree upgrade fails [1] and leaves
the cluster with UPDATE_FAILED status.

By the docs[2], it is understood that users have
the ability to choose only one of the labels.

[1] https://gist.github.com/guilhermesteinmuller/7bf9f51e421283783cf737900797232c
[2] https://github.com/openstack/magnum/blob/master/doc/source/user/rolling-upgrade.rst

Change-Id: I0f65169305ba74c082b65bf39083def278404b93
This commit is contained in:
guilhermesteinmuller
2020-11-30 16:19:48 -03:00
committed by Feilong Wang
parent 8dcf91b2d3
commit 439548e3de

View File

@@ -332,6 +332,8 @@ class FedoraKubernetesDriver(KubernetesDriver):
"valid kube_tag"), cluster_template.name)
for ostree_tag in ["ostree_commit", "ostree_remote"]:
if ostree_tag not in cluster_template.labels:
continue
try:
ostree_param = {
ostree_tag: cluster_template.labels[ostree_tag]