]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
facts: fix auto_discovery exclude
authorGuillaume Abrioux <gabrioux@redhat.com>
Mon, 25 Feb 2019 23:07:01 +0000 (00:07 +0100)
committerGuillaume Abrioux <gabrioux@redhat.com>
Mon, 9 Dec 2019 08:32:55 +0000 (09:32 +0100)
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 <gabrioux@redhat.com>
(cherry picked from commit 8f420072727441fd6e6a22a15cc9034a3a678cae)

group_vars/all.yml.sample
group_vars/rhcs.yml.sample
roles/ceph-defaults/defaults/main.yml
roles/ceph-facts/tasks/facts.yml

index 7aae6828e7934d59d4a04662ce59b88d8ff07978..bdf2864a83a65efed04704dfeed16507ccf9960b 100644 (file)
@@ -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
index 75474ac299cbdbf5216af01572922053e128db90..b333373c32fbb3c4100420d20ed605eda89eaf09 100644 (file)
@@ -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
index e65cbf266400040a08ef9c8c05025248873d23f0..e4f50542ad7fe527d95b8ee4fbb8cd07bed11646 100644 (file)
@@ -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
index f723f8d2addcf0912ee2bd482a1d54f2f0db25fd..b8da62b5062406024681b37c6d5790505ebcacf3 100644 (file)
     - 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: