]> git.apps.os.sepia.ceph.com Git - ceph-cm-ansible.git/commitdiff
testnode: Exclude dm devices from list of physical volumes 396/head
authorDavid Galloway <dgallowa@redhat.com>
Tue, 24 Apr 2018 19:28:42 +0000 (15:28 -0400)
committerDavid Galloway <dgallowa@redhat.com>
Tue, 24 Apr 2018 19:34:17 +0000 (15:34 -0400)
This was actually happening because when the playbook first runs, the
setup module is run and sees the device mapper devices.  We zap them
later in the playbook but ansible doesn't know that.  We could just
re-run the setup module but this method will instead guarantee we don't
use dm-* devices.

Fixes: https://tracker.ceph.com/issues/23845
Signed-off-by: David Galloway <dgallowa@redhat.com>
roles/testnode/tasks/configure_lvm.yml

index e61719d180e3b8072ea423a655f901bbf40c47b2..773cce1fd9952bbe6a1e8986b96225ed80172475 100644 (file)
@@ -9,7 +9,7 @@
 
 - name: Combine list of non-root disks
   set_fact:
-      disks_for_vg: "{{ ansible_devices.keys() | sort | reject('match',root_disk) | reject('match','loop') | reject('match','ram') | map('regex_replace','^','/dev/') | join(',') }}"
+      disks_for_vg: "{{ ansible_devices.keys() | sort | reject('match',root_disk) | reject('match','loop') | reject('match','ram') | reject('match','dm-') | map('regex_replace','^','/dev/') | join(',') }}"
   when: quick_lvs_to_create is defined
 
 - set_fact: vg_name=vg_hdd