]> git.apps.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)
committermergify[bot] <mergify[bot]@users.noreply.github.com>
Tue, 26 Feb 2019 03:16:33 +0000 (03:16 +0000)
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>
group_vars/all.yml.sample
group_vars/rhcs.yml.sample
roles/ceph-defaults/defaults/main.yml
roles/ceph-facts/tasks/facts.yml

index 3af140991e2a690c8bc06f112c336082c1e42c8a..e952132fbd9476598ef5b1ee1976d35c83926c6d 100644 (file)
@@ -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
index 281a6826cf9da88cb21e98f049ab7e73e1df8d1b..9da36cc622ff16f551bffb4b4b376a6765e6ebce 100644 (file)
@@ -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
index 6dcec816c39f1601e7bd1fbb4f75bf0071a0291a..8221232df1e8085eb23afa2b838c489812dea1cc 100644 (file)
@@ -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
index 2f8d6b5731fdf235f03da53c9df73b59a0f66154..58e9bb717c709e6b366106ae5e2ac805859d45d4 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: