From: Andrew Schoen Date: Wed, 3 Oct 2018 17:13:27 +0000 (-0500) Subject: ceph-volume: add functional tests to ensure lvm batch is idempotent X-Git-Tag: v14.0.1~78^2~12 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=9752d03cc16664cddd9ac7741284a2fb5b31f0e7;p=ceph.git ceph-volume: add functional tests to ensure lvm batch is idempotent Signed-off-by: Andrew Schoen --- diff --git a/src/ceph-volume/ceph_volume/tests/functional/batch/playbooks/test.yml b/src/ceph-volume/ceph_volume/tests/functional/batch/playbooks/test.yml index eb28745b534..1730049f466 100644 --- a/src/ceph-volume/ceph_volume/tests/functional/batch/playbooks/test.yml +++ b/src/ceph-volume/ceph_volume/tests/functional/batch/playbooks/test.yml @@ -33,3 +33,20 @@ command: "ceph-volume --cluster {{ cluster }} lvm batch --yes --{{ osd_objectstore|default('bluestore') }} {{ '--dmcrypt' if dmcrypt|default(false) else '' }} {{ devices | join(' ') }}" environment: CEPH_VOLUME_DEBUG: 1 + + - name: ensure batch create is idempotent + command: "ceph-volume --cluster {{ cluster }} lvm batch --yes --{{ osd_objectstore|default('bluestore') }} {{ '--dmcrypt' if dmcrypt|default(false) else '' }} {{ devices | join(' ') }}" + environment: + CEPH_VOLUME_DEBUG: 1 + + - name: run batch --report to see if devices get filtered + command: "ceph-volume --cluster {{ cluster }} lvm batch --report --format=json --{{ osd_objectstore|default('bluestore') }} {{ '--dmcrypt' if dmcrypt|default(false) else '' }} {{ devices | join(' ') }}" + register: report_cmd + environment: + CEPH_VOLUME_DEBUG: 1 + + - name: verify OSDs will not be created again + fail: + msg: "Devices were not filtered out after redeploy" + when: + - (report_cmd.stdout | from_json).changed