]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
qa/tasks: fix cephadm config image check
authorGeorgios Kyratsas <gkyratsas@suse.com>
Fri, 3 Jul 2020 14:01:54 +0000 (16:01 +0200)
committerSebastian Wagner <sebastian.wagner@suse.com>
Wed, 15 Jul 2020 08:50:52 +0000 (10:50 +0200)
Check container_image_name only if ceph cluster image is not pre-defined in config.
We shouldn't care about container_image_name if there cephadm or ceph already have image defined.

Signed-off-by: Georgios Kyratsas <gkyratsas@suse.com>
(cherry picked from commit 390ca4d92fe2e0467eec9161de1b7bdc1c62891f)

qa/tasks/cephadm.py

index 29c1e97b707844f709061dae744aa048cab37737..42b6f3e9834e6804d78ada42db1c7fabc0669583 100644 (file)
@@ -1150,17 +1150,17 @@ def task(ctx, config):
     container_registry_mirror = mirrors.get('docker.io',
                                             container_registry_mirror)
 
-    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.")
 
     if not hasattr(ctx.ceph[cluster_name], 'image'):
         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')