From c5b082848fa3bb1545af5371d631ce983ea81210 Mon Sep 17 00:00:00 2001 From: Andrew Schoen Date: Thu, 10 Jan 2019 11:22:53 -0600 Subject: [PATCH] validate: do not validate lvm config if osd_auto_discovery is true If osd_auto_discovery is set with the lvm scenario it's expected for lvm_volumes and devices to be empty. Signed-off-by: Andrew Schoen --- plugins/actions/validate.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/plugins/actions/validate.py b/plugins/actions/validate.py index e32c926ab..5d4a12505 100644 --- a/plugins/actions/validate.py +++ b/plugins/actions/validate.py @@ -90,12 +90,13 @@ class ActionModule(ActionBase): notario.validate(host_vars, non_collocated_osd_scenario, defined_keys=True) if host_vars["osd_scenario"] == "lvm": - 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) - elif notario_store['osd_objectstore'] == 'bluestore': - notario.validate(host_vars, lvm_bluestore_scenario, defined_keys=True) + if not host_vars.get("osd_auto_discovery", False): + 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) + elif notario_store['osd_objectstore'] == 'bluestore': + notario.validate(host_vars, lvm_bluestore_scenario, defined_keys=True) except Invalid as error: display.vvv("Notario Failure: %s" % str(error))