osd: validate devices variable input

Fail with a sane message if the devices or raw_journal_devices variables
are strings instead of lists during manual device assignment.

Signed-off-by: Douglas Fuller <dfuller@redhat.com>
pull/1644/head
Douglas Fuller 2017-07-03 15:10:16 +00:00
parent 035846217e
commit e5d06a449f
1 changed files with 21 additions and 0 deletions

View File

@ -55,6 +55,15 @@
- not osd_auto_discovery
- devices|length == 0
- name: make sure the devices variable is a list
fail:
msg: "devices: must be a list, not a string, i.e. [ \"/dev/sda\" ]"
when:
- osd_group_name is defined
- osd_group_name in group_names
- not osd_auto_discovery
- devices is string
- name: verify journal devices have been provided
fail:
msg: "please provide devices and raw journal devices to your osd scenario"
@ -66,6 +75,18 @@
- raw_journal_devices|length == 0
or devices|length == 0
- name: make sure the raw_journal_devices variable is a list
fail:
msg: "raw_journal_devices: must be a list, not a string, i.e. [ \"/dev/sda\" ]"
when:
- osd_group_name is defined
- osd_group_name in group_names
- not containerized_deployment
- raw_multi_journal
- raw_journal_devices is string
- raw_journal_devices|length == 0
or devices|length == 0
- name: check if bluestore is supported by the selected ceph version
fail:
msg: "bluestore is not supported by the selected Ceph version, use Luminous or above."