]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
Merge pull request #35927 from gekios/wip-cephadm-image-fix
authorGeorgios Kyratsas <34770824+gekios@users.noreply.github.com>
Thu, 9 Jul 2020 12:47:37 +0000 (14:47 +0200)
committerGitHub <noreply@github.com>
Thu, 9 Jul 2020 12:47:37 +0000 (14:47 +0200)
qa/tasks: fix cephadm config image check

1  2 
qa/tasks/cephadm.py

index 228fc7449142abcfae40111851cae5b860dbd12a,34b445133c0e2fc2a7fddcd53d0866a84fc0f05e..211286c4f8a25de81708b5df74a55800ef7428a0
@@@ -1155,14 -1149,15 +1149,20 @@@ def task(ctx, config)
          ctx.ceph[cluster_name].image = config.get('image')
      ref = None
      if not ctx.ceph[cluster_name].image:
+         if not container_image_name:
+             raise Exception("Configuration error occurred. "
+                             "The 'image' value is undefined for 'cephadm' task. "
+                             "Please provide corresponding options in the task's "
+                             "config, task 'overrides', or teuthology 'defaults' "
+                             "section.")
          sha1 = config.get('sha1')
 +        flavor = config.get('flavor', 'default')
 +
          if sha1:
 -            ctx.ceph[cluster_name].image = container_image_name + ':' + sha1
 +            if flavor == "crimson":
 +                ctx.ceph[cluster_name].image = container_image_name + ':' + sha1 + '-' + flavor
 +            else:
 +                ctx.ceph[cluster_name].image = container_image_name + ':' + sha1
              ref = sha1
          else:
              # hmm, fall back to branch?