From 3fc880ee7a87b27d6fa665767bc8fd6ce15473de Mon Sep 17 00:00:00 2001 From: Guillaume Abrioux Date: Wed, 14 Aug 2019 14:20:58 +0200 Subject: [PATCH] validate: do not validate devices or lvm_volumes in osd_auto_discovery case we shouldn't validate these two variables when `osd_auto_discovery` is set. Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1644623 Signed-off-by: Guillaume Abrioux (cherry picked from commit 243edfbc963baa68af0e0acf8489c4b920f57c1a) --- plugins/actions/validate.py | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/plugins/actions/validate.py b/plugins/actions/validate.py index 14c33327d..8125bc654 100644 --- a/plugins/actions/validate.py +++ b/plugins/actions/validate.py @@ -93,16 +93,16 @@ class ActionModule(ActionBase): if host_vars["osd_group_name"] in host_vars["group_names"]: notario.validate(host_vars, osd_options, defined_keys=True) notario_store['osd_objectstore'] = host_vars["osd_objectstore"] - - if host_vars.get("devices"): - notario.validate( - host_vars, lvm_batch_scenario, defined_keys=True) - elif notario_store['osd_objectstore'] == 'filestore': - notario.validate( - host_vars, lvm_filestore_scenario, defined_keys=True) # noqa E501 - elif notario_store['osd_objectstore'] == 'bluestore': - notario.validate( - host_vars, lvm_bluestore_scenario, defined_keys=True) # noqa E501 + if not host_vars.get('osd_auto_discovery'): + if host_vars.get("devices"): + notario.validate( + host_vars, lvm_batch_scenario, defined_keys=True) + elif notario_store['osd_objectstore'] == 'filestore': + notario.validate( + host_vars, lvm_filestore_scenario, defined_keys=True) # noqa E501 + elif notario_store['osd_objectstore'] == 'bluestore': + notario.validate( + host_vars, lvm_bluestore_scenario, defined_keys=True) # noqa E501 except Invalid as error: display.vvvv("Notario Failure: %s" % str(error))