From 61357c8e20d790701850c7087422d38c277764cf Mon Sep 17 00:00:00 2001 From: Andrew Schoen Date: Tue, 12 Sep 2017 15:14:21 -0500 Subject: [PATCH 1/2] tests: no need to create a filesystem on /dev/sdc1 for lvm tests The partition only needs created and given a gpt label so that a PARTUUID will exist on the partition. This task also makes the purge_lvm_osds scenario fail on the second deployment after purging. Signed-off-by: Andrew Schoen --- tests/functional/lvm_setup.yml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/tests/functional/lvm_setup.yml b/tests/functional/lvm_setup.yml index 9b4c71ecc..a3079fd4f 100644 --- a/tests/functional/lvm_setup.yml +++ b/tests/functional/lvm_setup.yml @@ -42,11 +42,6 @@ unit: '%' state: present - - name: create filesystem on /dev/sdc1 - filesystem: - fstype: ext4 - dev: /dev/sdc1 - - name: create journals vg from /dev/sdc2 lvg: vg: journals From 57f2ad7ef1080569e4270a52e10d3e7f87704ca8 Mon Sep 17 00:00:00 2001 From: Andrew Schoen Date: Wed, 13 Sep 2017 15:02:54 -0500 Subject: [PATCH 2/2] tests: delete journal partitions in lvm_setup.yml Delete these before creating them incase they are left around in a purge cluster testing scenario. The purge-cluster.yml playbook does not currently remove partitions used for journals. Signed-off-by: Andrew Schoen --- tests/functional/lvm_setup.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/tests/functional/lvm_setup.yml b/tests/functional/lvm_setup.yml index a3079fd4f..51f90da76 100644 --- a/tests/functional/lvm_setup.yml +++ b/tests/functional/lvm_setup.yml @@ -21,6 +21,21 @@ command: lvcreate --yes -l 50%FREE -n data-lv2 test_group failed_when: false + # purge-cluster.yml does not properly destroy partitions + # used for lvm osd journals, this ensures they are removed + # for that testing scenario + - name: remove /dev/sdc1 if it exists + parted: + device: /dev/sdc + number: 1 + state: absent + + - name: remove /dev/sdc2 if it exists + parted: + device: /dev/sdc + number: 2 + state: absent + - name: partition /dev/sdc for journals parted: device: /dev/sdc