notario.validate(host_vars, non_collocated_osd_scenario, defined_keys=True)
if host_vars["osd_scenario"] == "lvm":
- notario.validate(host_vars, lvm_osd_scenario, defined_keys=True)
+ if 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.vvvv("Notario Failure: %s" % str(error))
assert value in ["filestore", "bluestore"], "objectstore must be set to 'filestore' or 'bluestore'"
-def validate_lvm_volumes(value):
- if notario_store['osd_objectstore'] == "filestore":
- assert isinstance(value, basestring), "lvm_volumes must contain a 'journal' key when the objectstore is 'filestore'"
-
-
def validate_ceph_stable_release(value):
assert value in CEPH_RELEASES, "ceph_stable_release must be set to one of the following: %s" % ", ".join(CEPH_RELEASES)
assert any([radosgw_address_given, radosgw_address_block_given, radosgw_interface_given]), msg
-
install_options = (
("ceph_origin", ceph_origin_choices),
("containerized_deployment", types.boolean),
("devices", iterables.AllItems(types.string)),
)
-lvm_osd_scenario = ("lvm_volumes", iterables.AllItems((
+lvm_filestore_scenario = ("lvm_volumes", iterables.AllItems((
+ (optional('crush_device_class'), types.string),
+ ('data', types.string),
+ (optional('data_vg'), types.string),
+ ('journal', types.string),
+ (optional('journal_vg'), types.string),
+)))
+
+lvm_bluestore_scenario = ("lvm_volumes", iterables.AllItems((
(optional('crush_device_class'), types.string),
('data', types.string),
(optional('data_vg'), types.string),
(optional('db'), types.string),
(optional('db_vg'), types.string),
- ('journal', optional(validate_lvm_volumes)),
- (optional('journal_vg'), types.string),
(optional('wal'), types.string),
(optional('wal_vg'), types.string),
)))