2016-11-30 01:14:03 +08:00
|
|
|
---
|
2016-12-09 21:45:05 +08:00
|
|
|
- name: make sure public_network configured
|
|
|
|
fail:
|
|
|
|
msg: "public_network must be configured. Ceph public network"
|
2017-09-15 06:48:53 +08:00
|
|
|
when:
|
|
|
|
- public_network == '0.0.0.0/0'
|
2016-12-09 21:45:05 +08:00
|
|
|
|
|
|
|
- name: make sure cluster_network configured
|
|
|
|
fail:
|
|
|
|
msg: "cluster_network must be configured. Ceph replication network"
|
2016-12-15 21:50:04 +08:00
|
|
|
when:
|
|
|
|
- cluster_network == '0.0.0.0/0'
|
2017-04-13 01:57:33 +08:00
|
|
|
- not containerized_deployment
|
2016-12-09 21:45:05 +08:00
|
|
|
|
2016-11-30 01:14:03 +08:00
|
|
|
- name: make sure journal_size configured
|
|
|
|
debug:
|
2017-09-14 13:48:41 +08:00
|
|
|
msg: "WARNING: journal_size is configured to {{ journal_size }}, which is less than 5GB. This is not recommended and can lead to severe issues."
|
2016-11-30 01:14:03 +08:00
|
|
|
when:
|
|
|
|
- journal_size|int < 5120
|
2017-06-29 23:34:54 +08:00
|
|
|
- osd_objectstore == 'filestore'
|
2016-11-30 01:14:03 +08:00
|
|
|
- osd_group_name in group_names
|
|
|
|
|
|
|
|
- name: make sure an osd scenario was chosen
|
|
|
|
fail:
|
|
|
|
msg: "please choose an osd scenario"
|
|
|
|
when:
|
|
|
|
- osd_group_name is defined
|
|
|
|
- osd_group_name in group_names
|
2017-07-27 23:05:59 +08:00
|
|
|
- osd_scenario == 'dummy'
|
2016-11-30 01:14:03 +08:00
|
|
|
|
2017-07-27 23:05:59 +08:00
|
|
|
- name: make sure a valid osd scenario was chosen
|
2016-11-30 01:14:03 +08:00
|
|
|
fail:
|
2017-07-27 23:05:59 +08:00
|
|
|
msg: "please choose an osd scenario, valid scenarios are {{ valid_osd_scenarios }}"
|
2016-11-30 01:14:03 +08:00
|
|
|
when:
|
|
|
|
- osd_group_name is defined
|
|
|
|
- osd_group_name in group_names
|
2017-07-27 23:05:59 +08:00
|
|
|
- not osd_scenario in valid_osd_scenarios
|
2016-11-30 01:14:03 +08:00
|
|
|
|
|
|
|
- name: verify devices have been provided
|
|
|
|
fail:
|
|
|
|
msg: "please provide devices to your osd scenario"
|
|
|
|
when:
|
|
|
|
- osd_group_name is defined
|
|
|
|
- osd_group_name in group_names
|
|
|
|
- not osd_auto_discovery
|
2017-08-04 06:03:04 +08:00
|
|
|
- not osd_scenario == "lvm"
|
2016-11-30 01:14:03 +08:00
|
|
|
- devices|length == 0
|
|
|
|
|
2017-08-03 23:08:34 +08:00
|
|
|
- name: check if osd_scenario lvm is supported by the selected ceph version
|
2017-07-19 23:05:42 +08:00
|
|
|
fail:
|
2017-08-03 23:08:34 +08:00
|
|
|
msg: "osd_scenario lvm is not supported by the selected Ceph version, use Luminous or newer."
|
2017-07-19 23:05:42 +08:00
|
|
|
when:
|
|
|
|
- osd_group_name is defined
|
|
|
|
- osd_group_name in group_names
|
2017-07-27 23:04:53 +08:00
|
|
|
- not containerized_deployment
|
2017-08-03 23:08:34 +08:00
|
|
|
- osd_scenario == "lvm"
|
2017-10-13 00:27:36 +08:00
|
|
|
- ceph_release_num[ceph_release] < ceph_release_num.luminous
|
2017-07-19 23:05:42 +08:00
|
|
|
|
2017-08-03 23:08:34 +08:00
|
|
|
- name: verify osd_objectstore is 'filestore' when using the lvm osd_scenario
|
2017-07-27 00:26:57 +08:00
|
|
|
fail:
|
2017-08-03 23:08:34 +08:00
|
|
|
msg: "the lvm osd_scenario currently only works for filestore, not bluestore"
|
2017-07-27 00:26:57 +08:00
|
|
|
when:
|
|
|
|
- osd_group_name is defined
|
|
|
|
- osd_group_name in group_names
|
2017-08-03 23:08:34 +08:00
|
|
|
- osd_scenario == "lvm"
|
2017-07-27 00:26:57 +08:00
|
|
|
- not osd_auto_discovery
|
|
|
|
- osd_objectstore != 'filestore'
|
|
|
|
|
2017-07-27 23:04:53 +08:00
|
|
|
- name: verify lvm_volumes have been provided
|
|
|
|
fail:
|
|
|
|
msg: "please provide lvm_volumes to your osd scenario"
|
|
|
|
when:
|
|
|
|
- osd_group_name is defined
|
|
|
|
- osd_group_name in group_names
|
2017-08-03 23:08:34 +08:00
|
|
|
- osd_scenario == "lvm"
|
2017-07-27 23:04:53 +08:00
|
|
|
- not osd_auto_discovery
|
|
|
|
- lvm_volumes|length == 0
|
|
|
|
|
2017-08-23 21:59:57 +08:00
|
|
|
- name: make sure the lvm_volumes variable is a list
|
2017-07-19 23:05:42 +08:00
|
|
|
fail:
|
2017-08-23 21:59:57 +08:00
|
|
|
msg: "lvm_volumes: must be a list"
|
2017-07-19 23:05:42 +08:00
|
|
|
when:
|
|
|
|
- osd_group_name is defined
|
|
|
|
- osd_group_name in group_names
|
|
|
|
- not osd_auto_discovery
|
2017-08-03 23:08:34 +08:00
|
|
|
- osd_scenario == "lvm"
|
2017-08-23 21:59:57 +08:00
|
|
|
- lvm_volumes is string
|
2017-07-19 23:05:42 +08:00
|
|
|
|
2017-07-03 23:10:16 +08:00
|
|
|
- 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
|
|
|
|
|
2017-10-05 22:22:04 +08:00
|
|
|
- name: verify dedicated devices have been provided
|
2016-11-30 01:14:03 +08:00
|
|
|
fail:
|
2017-10-05 22:22:04 +08:00
|
|
|
msg: "please provide devices and dedicated_devices to your osd scenario"
|
2016-11-30 01:14:03 +08:00
|
|
|
when:
|
|
|
|
- osd_group_name is defined
|
|
|
|
- osd_group_name in group_names
|
2017-07-27 23:05:59 +08:00
|
|
|
- osd_scenario == 'non-collocated'
|
|
|
|
- dedicated_devices|length == 0
|
2016-11-30 01:14:03 +08:00
|
|
|
or devices|length == 0
|
|
|
|
|
2017-07-27 23:05:59 +08:00
|
|
|
- name: make sure the dedicated_devices variable is a list
|
2017-07-03 23:10:16 +08:00
|
|
|
fail:
|
2017-07-27 23:05:59 +08:00
|
|
|
msg: "dedicated_devices: must be a list, not a string, i.e. [ \"/dev/sda\" ]"
|
2017-07-03 23:10:16 +08:00
|
|
|
when:
|
|
|
|
- osd_group_name is defined
|
|
|
|
- osd_group_name in group_names
|
2017-07-27 23:05:59 +08:00
|
|
|
- osd_scenario == 'non-collocated'
|
|
|
|
- dedicated_devices is string
|
|
|
|
- dedicated_devices|length == 0
|
2017-07-03 23:10:16 +08:00
|
|
|
or devices|length == 0
|
|
|
|
|
2017-06-29 23:34:54 +08:00
|
|
|
- name: check if bluestore is supported by the selected ceph version
|
2017-06-29 22:52:33 +08:00
|
|
|
fail:
|
2017-06-29 23:34:54 +08:00
|
|
|
msg: "bluestore is not supported by the selected Ceph version, use Luminous or above."
|
2017-06-29 22:52:33 +08:00
|
|
|
when:
|
2017-06-29 23:34:54 +08:00
|
|
|
- osd_group_name is defined
|
2017-06-29 22:52:33 +08:00
|
|
|
- osd_group_name in group_names
|
2017-06-29 23:34:54 +08:00
|
|
|
- osd_objectstore == 'bluestore'
|
2017-10-13 00:27:36 +08:00
|
|
|
- ceph_release_num[ceph_release] < ceph_release_num.luminous
|