Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ceph-volume tests/functional single (test) playbook to zap and redepl…
…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.
There are no files selected for viewing
35 changes: 35 additions & 0 deletions
35
src/ceph-volume/ceph_volume/tests/functional/batch/playbooks/test.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |