From 8f420072727441fd6e6a22a15cc9034a3a678cae Mon Sep 17 00:00:00 2001 From: Guillaume Abrioux Date: Tue, 26 Feb 2019 00:07:01 +0100 Subject: [PATCH] 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 --- group_vars/all.yml.sample | 2 +- group_vars/rhcs.yml.sample | 2 +- roles/ceph-defaults/defaults/main.yml | 2 +- roles/ceph-facts/tasks/facts.yml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/group_vars/all.yml.sample b/group_vars/all.yml.sample index 3af140991..e952132fb 100644 --- a/group_vars/all.yml.sample +++ b/group_vars/all.yml.sample @@ -371,7 +371,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 281a6826c..9da36cc62 100644 --- a/group_vars/rhcs.yml.sample +++ b/group_vars/rhcs.yml.sample @@ -371,7 +371,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 6dcec816c..8221232df 100644 --- a/roles/ceph-defaults/defaults/main.yml +++ b/roles/ceph-defaults/defaults/main.yml @@ -363,7 +363,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 2f8d6b573..58e9bb717 100644 --- a/roles/ceph-facts/tasks/facts.yml +++ b/roles/ceph-facts/tasks/facts.yml @@ -184,7 +184,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: -- 2.39.5