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 <aschoen@redhat.com>
pull/3564/head
Andrew Schoen 2019-01-10 11:22:53 -06:00 committed by Sébastien Han
parent 46db5a1e38
commit c5b082848f
1 changed files with 7 additions and 6 deletions

View File

@ -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))