]> git.proxmox.com Git - ceph.git/blame - ceph/src/ceph-volume/ceph_volume/tests/functional/batch/playbooks/test.yml
import 14.2.4 nautilus point release
[ceph.git] / ceph / src / ceph-volume / ceph_volume / tests / functional / batch / playbooks / test.yml
CommitLineData
91327a77
AA
1
2- hosts: osds
3 become: yes
4 tasks:
5
6 - name: stop ceph-osd daemons
7 service:
8 name: "ceph-osd@{{ item }}"
9 state: stopped
10 with_items: "{{ osd_ids }}"
11
12
13- hosts: mons
14 become: yes
15 tasks:
16
17 - name: purge osds
18 command: "ceph --cluster {{ cluster }} osd purge osd.{{ item }} --yes-i-really-mean-it"
19 with_items: "{{ osd_ids }}"
20
21
22- hosts: osds
23 become: yes
24 tasks:
25
26 - name: zap devices used for OSDs
27 command: "ceph-volume --cluster {{ cluster }} lvm zap {{ item }} --destroy"
28 with_items: "{{ devices }}"
29 environment:
30 CEPH_VOLUME_DEBUG: 1
31
32 - name: batch create devices again
33 command: "ceph-volume --cluster {{ cluster }} lvm batch --yes --{{ osd_objectstore|default('bluestore') }} {{ '--dmcrypt' if dmcrypt|default(false) else '' }} {{ devices | join(' ') }}"
34 environment:
35 CEPH_VOLUME_DEBUG: 1
36
37 - name: ensure batch create is idempotent
38 command: "ceph-volume --cluster {{ cluster }} lvm batch --yes --{{ osd_objectstore|default('bluestore') }} {{ '--dmcrypt' if dmcrypt|default(false) else '' }} {{ devices | join(' ') }}"
39 register: batch_cmd
40 failed_when: false
41 environment:
42 CEPH_VOLUME_DEBUG: 1
43
44 - name: check batch idempotency
45 fail:
46 msg: "lvm batch failed idempotency check"
47 when:
48 - batch_cmd.rc != 0
494da23a 49 - "'strategy changed' not in batch_cmd.stderr"
91327a77
AA
50
51 - name: run batch --report to see if devices get filtered
52 command: "ceph-volume --cluster {{ cluster }} lvm batch --report --format=json --{{ osd_objectstore|default('bluestore') }} {{ '--dmcrypt' if dmcrypt|default(false) else '' }} {{ devices | join(' ') }}"
53 register: report_cmd
54 failed_when: false
55 environment:
56 CEPH_VOLUME_DEBUG: 1
57
58 - name: check batch --report idempotency
59 fail:
60 msg: "lvm batch --report failed idempotency check"
61 when:
494da23a
TL
62 - report_cmd.rc != 0
63 - "'strategy changed' not in report_cmd.stderr"