]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
ceph-volume tests/functional single (test) playbook to zap and redeploy batch operations
authorAlfredo Deza <adeza@redhat.com>
Thu, 6 Sep 2018 13:34:11 +0000 (09:34 -0400)
committerAlfredo Deza <adeza@redhat.com>
Thu, 6 Sep 2018 20:37:35 +0000 (16:37 -0400)
Signed-off-by: Alfredo Deza <adeza@redhat.com>
(cherry picked from commit 23330c0107a9f9ee436338c112b1852fd36e34a3)

src/ceph-volume/ceph_volume/tests/functional/batch/playbooks/test.yml [new file with mode: 0644]

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 (file)
index 0000000..eb28745
--- /dev/null
@@ -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