]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
tests: fix the size on the second data LV
authorDimitri Savineau <dsavinea@redhat.com>
Thu, 17 Oct 2019 18:28:45 +0000 (14:28 -0400)
committerDimitri Savineau <savineau.dimitri@gmail.com>
Fri, 18 Oct 2019 18:49:57 +0000 (14:49 -0400)
The commit replaces the pv/vg/lv commands used with the ansible command
module by the lvg and lvol modules.
This also fixes the size of the second data LV because we were only using
50% of the remaining space instead of 100%.

With a 50G device, the result was:
  - data-lv1 was 25G
  - data-lv2 was 12.5G
Instead of:
  - data-lv1 was 25G
  - data-lv2 was 25G

Signed-off-by: Dimitri Savineau <dsavinea@redhat.com>
(cherry picked from commit 2c03c6fcd33ba6b3a3daf73ecd011e87ab41c0a0)

tests/functional/lvm_setup.yml

index 087ed3fb787daba0d5769fc931e48bedfc6c1465..e75653fd073a88c14d3ee622568c13b9ac7c75ca 100644 (file)
         when:
           - not is_atomic
 
-      - name: create physical volume
-        command: pvcreate /dev/sdb
-        failed_when: false
-
       - name: create volume group
-        command: vgcreate test_group /dev/sdb
-        failed_when: false
+        lvg:
+          vg: test_group
+          pvs: /dev/sdb
 
       - name: create logical volume 1
-        command: lvcreate --yes -l 50%FREE -n data-lv1 test_group
-        failed_when: false
+        lvol:
+          vg: test_group
+          lv: data-lv1
+          size: 50%FREE
 
       - name: create logical volume 2
-        command: lvcreate --yes -l 50%FREE -n data-lv2 test_group
-        failed_when: false
+        lvol:
+          vg: test_group
+          lv: data-lv2
+          size: 100%FREE
 
       - name: partition /dev/sdc for journals
         parted:
@@ -69,6 +70,8 @@
           pvs: /dev/sdc2
 
       - name: create journal1 lv
-        command: lvcreate --yes -l 100%FREE -n journal1 journals
-        failed_when: false
+        lvol:
+          vg: journals
+          lv: journal1
+          size: 100%FREE
       when: osd_scenario == 'lvm'