From 74c3446c256a41e78b2bedc0660653ad893e9853 Mon Sep 17 00:00:00 2001 From: Zack Cerza Date: Mon, 1 Aug 2022 23:01:06 -0600 Subject: [PATCH] cephadm: Avoid TypeError in download_cephadm() Signed-off-by: Zack Cerza --- qa/tasks/cephadm.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/qa/tasks/cephadm.py b/qa/tasks/cephadm.py index 676453964ea..97906b8a684 100644 --- a/qa/tasks/cephadm.py +++ b/qa/tasks/cephadm.py @@ -1606,7 +1606,7 @@ def task(ctx, config): if not hasattr(ctx.ceph[cluster_name], 'image'): ctx.ceph[cluster_name].image = config.get('image') - ref = None + ref = ctx.config.get("branch", "main") if not ctx.ceph[cluster_name].image: if not container_image_name: raise Exception("Configuration error occurred. " @@ -1624,10 +1624,8 @@ def task(ctx, config): ctx.ceph[cluster_name].image = container_image_name + ':' + sha1 ref = sha1 else: - # hmm, fall back to branch? - branch = config.get('branch', 'master') - ref = branch - ctx.ceph[cluster_name].image = container_image_name + ':' + branch + # fall back to using the branch value + ctx.ceph[cluster_name].image = container_image_name + ':' + ref log.info('Cluster image is %s' % ctx.ceph[cluster_name].image) -- 2.47.3