]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
cephadm: dont set ctx.image if json deploy image is unset
authorJohn Mulligan <jmulligan@redhat.com>
Mon, 19 Jun 2023 16:54:24 +0000 (12:54 -0400)
committerAdam King <adking@redhat.com>
Thu, 31 Aug 2023 17:35:15 +0000 (13:35 -0400)
If no image has been provided in the "deploy from" json do not set
ctx.image to it (empty-string or None) as we may have had a valid
value passed on the --image CLI option.

Signed-off-by: John Mulligan <jmulligan@redhat.com>
src/cephadm/cephadm.py

index 43d1f0a88d225b858f7ad5625afb5f8425fb0570..71d65d821de8b052aa971006e9a0a0d7d0e99a8d 100755 (executable)
@@ -6308,8 +6308,9 @@ def apply_deploy_config_to_ctx(
     similar to how cli options on `deploy` are bound to the context.
     """
     ctx.name = config_data['name']
-    if 'image' in config_data:
-        ctx.image = config_data['image']
+    image = config_data.get('image', '')
+    if image:
+        ctx.image = image
     if 'fsid' in config_data:
         ctx.fsid = config_data['fsid']
     if 'meta' in config_data: