]> 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)
committerJohn Mulligan <jmulligan@redhat.com>
Wed, 21 Jun 2023 17:19:16 +0000 (13:19 -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 bb86f50237d0cea8ce6e87c0745bed660bcafa44..8f39ca8084d724a294768d63ac1f26426020375c 100755 (executable)
@@ -6273,8 +6273,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: