]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
validate: do not validate devices or lvm_volumes in osd_auto_discovery case
authorGuillaume Abrioux <gabrioux@redhat.com>
Wed, 14 Aug 2019 12:20:58 +0000 (14:20 +0200)
committerGuillaume Abrioux <gabrioux@redhat.com>
Tue, 20 Aug 2019 07:12:20 +0000 (09:12 +0200)
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 <gabrioux@redhat.com>
plugins/actions/validate.py

index dbe4a303877ef925884d77a1116fe740e570e1e4..fa755b1716fc7edc8506378fa1068ec98adfedf9 100644 (file)
@@ -96,16 +96,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))