From 07fcd64eb8dace69b87b63fcf6356d7e49cc1d0d Mon Sep 17 00:00:00 2001 From: John Mulligan Date: Mon, 19 Jun 2023 12:54:24 -0400 Subject: [PATCH] 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 --- src/cephadm/cephadm.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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: -- 2.39.5