mirror of https://github.com/ceph/ceph-ansible.git
ceph-volume: add the journal_size and block_db_size options
These can be used for the the --journal-size and --block-db-size options of `lvm batch`. Signed-off-by: Andrew Schoen <aschoen@redhat.com>pull/3206/head
parent
82ec5a29f2
commit
8bb131c712
|
@ -95,6 +95,19 @@ options:
|
|||
- Only applicable if action is 'batch'.
|
||||
required: false
|
||||
default: 1
|
||||
journal_size:
|
||||
description:
|
||||
- The size in MB of filestore journals.
|
||||
- Only applicable if action is 'batch'.
|
||||
required: false
|
||||
default: 5120
|
||||
block_db_size:
|
||||
description:
|
||||
- The size in bytes of bluestore block db lvs.
|
||||
- The default of -1 means to create them as big as possible.
|
||||
- Only applicable if action is 'batch'.
|
||||
required: false
|
||||
default: -1
|
||||
|
||||
|
||||
author:
|
||||
|
@ -158,6 +171,8 @@ def batch(module):
|
|||
crush_device_class = module.params.get('crush_device_class', None)
|
||||
dmcrypt = module.params['dmcrypt']
|
||||
osds_per_device = module.params['osds_per_device']
|
||||
journal_size = module.params['journal_size']
|
||||
block_db_size = module.params['block_db_size']
|
||||
|
||||
if not batch_devices:
|
||||
module.fail_json(msg='batch_devices must be provided if action is "batch"', changed=False, rc=1)
|
||||
|
@ -181,6 +196,12 @@ def batch(module):
|
|||
if osds_per_device > 1:
|
||||
cmd.extend(["--osds-per-device", osds_per_device])
|
||||
|
||||
if objectstore == "filestore":
|
||||
cmd.extend(["--journal-size", journal_size])
|
||||
|
||||
if objectstore == "bluestore" and block_db_size != -1:
|
||||
cmd.extend(["--block-db-size", block_db_size])
|
||||
|
||||
cmd.extend(batch_devices)
|
||||
|
||||
result = dict(
|
||||
|
@ -407,6 +428,8 @@ def run_module():
|
|||
dmcrypt=dict(type='bool', required=False, default=False),
|
||||
batch_devices=dict(type='list', required=False, default=[]),
|
||||
osds_per_device=dict(type='int', required=False, default=1),
|
||||
journal_size=dict(type='int', required=False, default=5120),
|
||||
block_db_size=dict(type='int', required=False, default=-1),
|
||||
)
|
||||
|
||||
module = AnsibleModule(
|
||||
|
|
Loading…
Reference in New Issue