From: John Mulligan Date: Mon, 19 Jun 2023 16:54:24 +0000 (-0400) Subject: cephadm: dont set ctx.image if json deploy image is unset X-Git-Tag: v18.2.1~326^2~48 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=07fcd64eb8dace69b87b63fcf6356d7e49cc1d0d;p=ceph-ci.git cephadm: dont set ctx.image if json deploy image is unset 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 --- diff --git a/src/cephadm/cephadm.py b/src/cephadm/cephadm.py index 43d1f0a88d2..71d65d821de 100755 --- a/src/cephadm/cephadm.py +++ b/src/cephadm/cephadm.py @@ -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: