From: Georgios Kyratsas Date: Fri, 3 Jul 2020 14:01:54 +0000 (+0200) Subject: qa/tasks: fix cephadm config image check X-Git-Tag: wip-pdonnell-testing-20200918.022351~719^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=390ca4d92fe2e0467eec9161de1b7bdc1c62891f;p=ceph-ci.git qa/tasks: fix cephadm config image check 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 --- diff --git a/qa/tasks/cephadm.py b/qa/tasks/cephadm.py index cb873aaccc4..34b445133c0 100644 --- a/qa/tasks/cephadm.py +++ b/qa/tasks/cephadm.py @@ -1144,17 +1144,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') if sha1: ctx.ceph[cluster_name].image = container_image_name + ':' + sha1