]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
cephadm: Avoid TypeError in download_cephadm()
authorZack Cerza <zack@redhat.com>
Tue, 2 Aug 2022 05:01:06 +0000 (23:01 -0600)
committerZack Cerza <zack@redhat.com>
Mon, 26 Sep 2022 21:35:08 +0000 (15:35 -0600)
Signed-off-by: Zack Cerza <zack@redhat.com>
qa/tasks/cephadm.py

index 676453964eabd0d90aae016b3ee53419bbc16da9..97906b8a684c598c9d0ca1119ceee6d59df9ec88 100644 (file)
@@ -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)