From: Zack Cerza Date: Tue, 2 Aug 2022 05:01:06 +0000 (-0600) Subject: cephadm: Avoid TypeError in download_cephadm() X-Git-Tag: v18.1.0~1099^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=74c3446c256a41e78b2bedc0660653ad893e9853;p=ceph.git cephadm: Avoid TypeError in download_cephadm() Signed-off-by: Zack Cerza --- diff --git a/qa/tasks/cephadm.py b/qa/tasks/cephadm.py index 676453964eab..97906b8a684c 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)