From 23330c0107a9f9ee436338c112b1852fd36e34a3 Mon Sep 17 00:00:00 2001 From: Alfredo Deza Date: Thu, 6 Sep 2018 09:34:11 -0400 Subject: [PATCH] ceph-volume tests/functional single (test) playbook to zap and redeploy batch operations Signed-off-by: Alfredo Deza --- .../tests/functional/batch/playbooks/test.yml | 35 +++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 src/ceph-volume/ceph_volume/tests/functional/batch/playbooks/test.yml 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 new file mode 100644 index 00000000000..eb28745b534 --- /dev/null +++ b/src/ceph-volume/ceph_volume/tests/functional/batch/playbooks/test.yml @@ -0,0 +1,35 @@ + +- hosts: osds + become: yes + tasks: + + - name: stop ceph-osd daemons + service: + name: "ceph-osd@{{ item }}" + state: stopped + with_items: "{{ osd_ids }}" + + +- hosts: mons + become: yes + tasks: + + - name: purge osds + command: "ceph --cluster {{ cluster }} osd purge osd.{{ item }} --yes-i-really-mean-it" + with_items: "{{ osd_ids }}" + + +- hosts: osds + become: yes + tasks: + + - name: zap devices used for OSDs + command: "ceph-volume --cluster {{ cluster }} lvm zap {{ item }} --destroy" + with_items: "{{ devices }}" + environment: + CEPH_VOLUME_DEBUG: 1 + + - name: batch create devices again + 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 -- 2.39.5