mirror of https://github.com/ceph/ceph-ansible.git
osd: add wal_devices option support to ceph_volume module
This commit adds the `wal_devices` option support to the
ceph_volume module.
passing a devices list in `bluestore_wal_devices` will make ceph-volume
creating 1 vg using these devices to create block.wal partitions.
Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit 09e04a9197
)
pull/4475/head
parent
a33791be25
commit
69ec26e045
|
@ -44,11 +44,19 @@ dummy:
|
||||||
# Declare devices to be used as block.db devices
|
# Declare devices to be used as block.db devices
|
||||||
|
|
||||||
#dedicated_devices:
|
#dedicated_devices:
|
||||||
# - /dev/sda
|
# - /dev/sdx
|
||||||
# - /dev/sdb
|
# - /dev/sdy
|
||||||
|
|
||||||
#dedicated_devices: []
|
#dedicated_devices: []
|
||||||
|
|
||||||
|
# Declare devices to be used as block.wal devices
|
||||||
|
|
||||||
|
#bluestore_wal_devices:
|
||||||
|
# - /dev/nvme0n1
|
||||||
|
# - /dev/nvme0n2
|
||||||
|
|
||||||
|
#bluestore_wal_devices: []
|
||||||
|
|
||||||
#'osd_auto_discovery' mode prevents you from filling out the 'devices' variable above.
|
#'osd_auto_discovery' mode prevents you from filling out the 'devices' variable above.
|
||||||
# Device discovery is based on the Ansible fact 'ansible_devices'
|
# Device discovery is based on the Ansible fact 'ansible_devices'
|
||||||
# which reports all the devices on a system. If chosen, all the disks
|
# which reports all the devices on a system. If chosen, all the disks
|
||||||
|
|
|
@ -280,6 +280,7 @@ def batch(module, container_image):
|
||||||
journal_size = module.params.get('journal_size', None)
|
journal_size = module.params.get('journal_size', None)
|
||||||
block_db_size = module.params.get('block_db_size', None)
|
block_db_size = module.params.get('block_db_size', None)
|
||||||
block_db_devices = module.params.get('block_db_devices', None)
|
block_db_devices = module.params.get('block_db_devices', None)
|
||||||
|
wal_devices = module.params.get('wal_devices', None)
|
||||||
dmcrypt = module.params.get('dmcrypt', None)
|
dmcrypt = module.params.get('dmcrypt', None)
|
||||||
osds_per_device = module.params.get('osds_per_device', 1)
|
osds_per_device = module.params.get('osds_per_device', 1)
|
||||||
|
|
||||||
|
@ -321,6 +322,9 @@ def batch(module, container_image):
|
||||||
if block_db_devices:
|
if block_db_devices:
|
||||||
cmd.extend(['--db-devices', ' '.join(block_db_devices)])
|
cmd.extend(['--db-devices', ' '.join(block_db_devices)])
|
||||||
|
|
||||||
|
if wal_devices:
|
||||||
|
cmd.extend(['--wal-devices', ' '.join(wal_devices)])
|
||||||
|
|
||||||
return cmd
|
return cmd
|
||||||
|
|
||||||
|
|
||||||
|
@ -508,6 +512,7 @@ def run_module():
|
||||||
journal_size=dict(type='str', required=False, default='5120'),
|
journal_size=dict(type='str', required=False, default='5120'),
|
||||||
block_db_size=dict(type='str', required=False, default='-1'),
|
block_db_size=dict(type='str', required=False, default='-1'),
|
||||||
block_db_devices=dict(type='list', required=False, default=[]),
|
block_db_devices=dict(type='list', required=False, default=[]),
|
||||||
|
wal_devices=dict(type='list', required=False, default=[]),
|
||||||
report=dict(type='bool', required=False, default=False),
|
report=dict(type='bool', required=False, default=False),
|
||||||
containerized=dict(type='str', required=False, default=False),
|
containerized=dict(type='str', required=False, default=False),
|
||||||
osd_fsid=dict(type='str', required=False),
|
osd_fsid=dict(type='str', required=False),
|
||||||
|
|
|
@ -36,11 +36,19 @@ devices: []
|
||||||
# Declare devices to be used as block.db devices
|
# Declare devices to be used as block.db devices
|
||||||
|
|
||||||
#dedicated_devices:
|
#dedicated_devices:
|
||||||
# - /dev/sda
|
# - /dev/sdx
|
||||||
# - /dev/sdb
|
# - /dev/sdy
|
||||||
|
|
||||||
dedicated_devices: []
|
dedicated_devices: []
|
||||||
|
|
||||||
|
# Declare devices to be used as block.wal devices
|
||||||
|
|
||||||
|
#bluestore_wal_devices:
|
||||||
|
# - /dev/nvme0n1
|
||||||
|
# - /dev/nvme0n2
|
||||||
|
|
||||||
|
bluestore_wal_devices: []
|
||||||
|
|
||||||
#'osd_auto_discovery' mode prevents you from filling out the 'devices' variable above.
|
#'osd_auto_discovery' mode prevents you from filling out the 'devices' variable above.
|
||||||
# Device discovery is based on the Ansible fact 'ansible_devices'
|
# Device discovery is based on the Ansible fact 'ansible_devices'
|
||||||
# which reports all the devices on a system. If chosen, all the disks
|
# which reports all the devices on a system. If chosen, all the disks
|
||||||
|
|
|
@ -11,6 +11,7 @@
|
||||||
journal_size: "{{ journal_size }}"
|
journal_size: "{{ journal_size }}"
|
||||||
block_db_size: "{{ block_db_size }}"
|
block_db_size: "{{ block_db_size }}"
|
||||||
block_db_devices: "{{ dedicated_devices | unique if dedicated_devices | length > 0 else omit }}"
|
block_db_devices: "{{ dedicated_devices | unique if dedicated_devices | length > 0 else omit }}"
|
||||||
|
wal_devices: "{{ bluestore_wal_devices | unique if bluestore_wal_devices | length > 0 else omit }}"
|
||||||
action: "batch"
|
action: "batch"
|
||||||
environment:
|
environment:
|
||||||
CEPH_VOLUME_DEBUG: 1
|
CEPH_VOLUME_DEBUG: 1
|
||||||
|
|
Loading…
Reference in New Issue