From: Guillaume Abrioux Date: Mon, 25 Feb 2019 23:07:01 +0000 (+0100) Subject: facts: fix auto_discovery exclude X-Git-Tag: v3.2.38~4 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=4f6925890c2071acf99aed1f7699f8eb3edf00b0;p=ceph-ansible.git facts: fix auto_discovery exclude the previous approach was wrong. checking if `item.key` is in `osd_auto_discovery_exclude` (`['dm-', 'loop']`) is incorrect because it will obviously not match. Therefore, the condition will return `True` whatever the device we are checking. Signed-off-by: Guillaume Abrioux (cherry picked from commit 8f420072727441fd6e6a22a15cc9034a3a678cae) --- diff --git a/group_vars/all.yml.sample b/group_vars/all.yml.sample index 7aae6828e..bdf2864a8 100644 --- a/group_vars/all.yml.sample +++ b/group_vars/all.yml.sample @@ -373,7 +373,7 @@ dummy: #osd_objectstore: bluestore # Any device containing these patterns in their path will be excluded. -#osd_auto_discovery_exclude: ['dm-', 'loop'] +#osd_auto_discovery_exclude: "dm-*|loop*" # xattrs. by default, 'filestore xattr use omap' is set to 'true' if # 'osd_mkfs_type' is set to 'ext4'; otherwise it isn't set. This can diff --git a/group_vars/rhcs.yml.sample b/group_vars/rhcs.yml.sample index 75474ac29..b333373c3 100644 --- a/group_vars/rhcs.yml.sample +++ b/group_vars/rhcs.yml.sample @@ -373,7 +373,7 @@ ceph_rhcs_version: 3 #osd_objectstore: bluestore # Any device containing these patterns in their path will be excluded. -#osd_auto_discovery_exclude: ['dm-', 'loop'] +#osd_auto_discovery_exclude: "dm-*|loop*" # xattrs. by default, 'filestore xattr use omap' is set to 'true' if # 'osd_mkfs_type' is set to 'ext4'; otherwise it isn't set. This can diff --git a/roles/ceph-defaults/defaults/main.yml b/roles/ceph-defaults/defaults/main.yml index e65cbf266..e4f50542a 100644 --- a/roles/ceph-defaults/defaults/main.yml +++ b/roles/ceph-defaults/defaults/main.yml @@ -365,7 +365,7 @@ osd_mount_options_xfs: noatime,largeio,inode64,swalloc osd_objectstore: bluestore # Any device containing these patterns in their path will be excluded. -osd_auto_discovery_exclude: ['dm-', 'loop'] +osd_auto_discovery_exclude: "dm-*|loop*" # xattrs. by default, 'filestore xattr use omap' is set to 'true' if # 'osd_mkfs_type' is set to 'ext4'; otherwise it isn't set. This can diff --git a/roles/ceph-facts/tasks/facts.yml b/roles/ceph-facts/tasks/facts.yml index f723f8d2a..b8da62b50 100644 --- a/roles/ceph-facts/tasks/facts.yml +++ b/roles/ceph-facts/tasks/facts.yml @@ -193,7 +193,7 @@ - item.value.sectors != "0" - item.value.partitions|count == 0 - item.value.holders|count == 0 - - item.key not in osd_auto_discovery_exclude + - item.key is not match osd_auto_discovery_exclude - name: set_fact ceph_uid for debian based system - non container set_fact: