Skip to content

Commit

Permalink
ceph-volume tests/functional single (test) playbook to zap and redepl…
Browse files Browse the repository at this point in the history
…oy batch operations

Signed-off-by: Alfredo Deza <adeza@redhat.com>
(cherry picked from commit 23330c0)
  • Loading branch information
Alfredo Deza committed Sep 6, 2018
1 parent 4352490 commit 2ac791e
Showing 1 changed file with 35 additions and 0 deletions.
@@ -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

0 comments on commit 2ac791e

Please sign in to comment.