From: Eduard Egorov Date: Tue, 25 Oct 2016 06:19:42 +0000 (+0000) Subject: Fix 'raw_journal_devices' to be initialized as a list in ceph-common defaults. Add... X-Git-Tag: v2.0~17^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F1024%2Fhead;p=ceph-ansible.git Fix 'raw_journal_devices' to be initialized as a list in ceph-common defaults. Add empty 'devices' list there as well. Adjust 'devices' and 'raw_journal_devices' checks. This is done for preventing of their use-before-definition for osd scenarios checks (should be removed after a refactor has properly seperated all the checks into appropriate roles). Signed-off-by: Eduard Egorov --- diff --git a/group_vars/all.sample b/group_vars/all.sample index 0f68fa5dc..f84749c63 100644 --- a/group_vars/all.sample +++ b/group_vars/all.sample @@ -368,7 +368,8 @@ dummy: #bluestore: False #dmcrypt_journal_collocation: False #dmcrypt_dedicated_journal: False -#raw_journal_devices: {} +#raw_journal_devices: [] +#devices: [] #osd_auto_discovery: False diff --git a/roles/ceph-common/defaults/main.yml b/roles/ceph-common/defaults/main.yml index 31de9cd70..92b7c99ea 100644 --- a/roles/ceph-common/defaults/main.yml +++ b/roles/ceph-common/defaults/main.yml @@ -360,7 +360,8 @@ osd_directory: False bluestore: False dmcrypt_journal_collocation: False dmcrypt_dedicated_journal: False -raw_journal_devices: {} +raw_journal_devices: [] +devices: [] osd_auto_discovery: False diff --git a/roles/ceph-common/tasks/checks/check_mandatory_vars.yml b/roles/ceph-common/tasks/checks/check_mandatory_vars.yml index 975049511..f8858b0cc 100644 --- a/roles/ceph-common/tasks/checks/check_mandatory_vars.yml +++ b/roles/ceph-common/tasks/checks/check_mandatory_vars.yml @@ -106,17 +106,17 @@ - osd_group_name in group_names - journal_collocation - not osd_auto_discovery - - devices is not defined + - devices|length == 0 - name: verify journal devices have been provided fail: - msg: "please provide devices to your osd scenario" + msg: "please provide devices and raw journal devices to your osd scenario" when: - osd_group_name is defined - osd_group_name in group_names - raw_multi_journal - - raw_journal_devices is not defined - or devices is not defined + - raw_journal_devices|length == 0 + or devices|length == 0 - name: verify directories have been provided fail: