From: Guillaume Abrioux Date: Mon, 11 Feb 2019 12:52:37 +0000 (+0100) Subject: osd: add possibility to exclude device in osd_auto_discovery X-Git-Tag: v4.0.0rc1~84 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=83d7ef777ec19eb5f96c553d869ec8ad90fd5061;p=ceph-ansible.git osd: add possibility to exclude device in osd_auto_discovery Add a new `osd_auto_discovery_exclude` to give the possibility of excluding some devices in auto_discovery scenario. Signed-off-by: Guillaume Abrioux --- diff --git a/group_vars/all.yml.sample b/group_vars/all.yml.sample index 883bc1c2b..3af140991 100644 --- a/group_vars/all.yml.sample +++ b/group_vars/all.yml.sample @@ -370,6 +370,9 @@ dummy: #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'] + # 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 # be set to 'true' or 'false' to explicitly override those diff --git a/group_vars/rhcs.yml.sample b/group_vars/rhcs.yml.sample index d44c0965b..281a6826c 100644 --- a/group_vars/rhcs.yml.sample +++ b/group_vars/rhcs.yml.sample @@ -370,6 +370,9 @@ ceph_rhcs_version: 3 #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'] + # 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 # be set to 'true' or 'false' to explicitly override those diff --git a/roles/ceph-defaults/defaults/main.yml b/roles/ceph-defaults/defaults/main.yml index 58055c22f..6dcec816c 100644 --- a/roles/ceph-defaults/defaults/main.yml +++ b/roles/ceph-defaults/defaults/main.yml @@ -362,6 +362,9 @@ osd_mkfs_options_xfs: -f -i size=2048 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'] + # 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 # be set to 'true' or 'false' to explicitly override those diff --git a/roles/ceph-facts/tasks/facts.yml b/roles/ceph-facts/tasks/facts.yml index 015eece3b..2f8d6b573 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 - - "'dm-' not in item.key" + - item.key not in osd_auto_discovery_exclude - name: set_fact ceph_uid for debian based system - non container set_fact: