From 953c7ef54925059e6de75c2e11d9d40d909bbbca Mon Sep 17 00:00:00 2001 From: Alfredo Deza Date: Wed, 6 Jun 2018 11:37:21 -0400 Subject: [PATCH] ceph-volume tests functional osd destroy on mons only for dmcrypt Signed-off-by: Alfredo Deza --- .../lvm/centos7/bluestore/dmcrypt/test.yml | 38 +++++++++++---- .../lvm/centos7/filestore/dmcrypt/test.yml | 28 +++++++---- .../lvm/xenial/bluestore/dmcrypt/test.yml | 48 +++++++++++++------ .../lvm/xenial/filestore/dmcrypt/test.yml | 28 +++++++---- 4 files changed, 103 insertions(+), 39 deletions(-) diff --git a/src/ceph-volume/ceph_volume/tests/functional/lvm/centos7/bluestore/dmcrypt/test.yml b/src/ceph-volume/ceph_volume/tests/functional/lvm/centos7/bluestore/dmcrypt/test.yml index 70c018aa7e346..bbdc1035d25db 100644 --- a/src/ceph-volume/ceph_volume/tests/functional/lvm/centos7/bluestore/dmcrypt/test.yml +++ b/src/ceph-volume/ceph_volume/tests/functional/lvm/centos7/bluestore/dmcrypt/test.yml @@ -1,4 +1,3 @@ - - hosts: osds become: yes tasks: @@ -8,9 +7,26 @@ name: ceph-osd@2 state: stopped + - name: stop ceph-osd@0 daemon + service: + name: ceph-osd@0 + state: stopped + +- hosts: mons + become: yes + tasks: + - name: destroy osd.2 command: "ceph osd destroy osd.2 --yes-i-really-mean-it" + - name: destroy osd.0 + command: "ceph osd destroy osd.0 --yes-i-really-mean-it" + +- hosts: osds + become: yes + tasks: + + # osd.2 device - name: zap /dev/sdd1 command: "ceph-volume lvm zap /dev/sdd1 --destroy" environment: @@ -21,14 +37,7 @@ environment: CEPH_VOLUME_DEBUG: 1 - - name: stop ceph-osd@0 daemon - service: - name: ceph-osd@0 - state: stopped - - - name: destroy osd.0 - command: "ceph osd destroy osd.0 --yes-i-really-mean-it" - + # osd.0 lv - name: zap test_group/data-lv1 command: "ceph-volume lvm zap test_group/data-lv1" environment: @@ -44,9 +53,20 @@ name: ceph-osd@0 state: stopped + +- hosts: mons + become: yes + tasks: + - name: destroy osd.0 command: "ceph osd destroy osd.0 --yes-i-really-mean-it" + +- hosts: osds + become: yes + tasks: + + - name: zap test_group/data-lv1 command: "ceph-volume lvm zap test_group/data-lv1" environment: diff --git a/src/ceph-volume/ceph_volume/tests/functional/lvm/centos7/filestore/dmcrypt/test.yml b/src/ceph-volume/ceph_volume/tests/functional/lvm/centos7/filestore/dmcrypt/test.yml index fc3e38c7aee46..49f37d20aade9 100644 --- a/src/ceph-volume/ceph_volume/tests/functional/lvm/centos7/filestore/dmcrypt/test.yml +++ b/src/ceph-volume/ceph_volume/tests/functional/lvm/centos7/filestore/dmcrypt/test.yml @@ -8,9 +8,28 @@ name: ceph-osd@2 state: stopped + - name: stop ceph-osd@0 daemon + service: + name: ceph-osd@0 + state: stopped + + +- hosts: mons + become: yes + tasks: + - name: destroy osd.2 command: "ceph osd destroy osd.2 --yes-i-really-mean-it" + - name: destroy osd.0 + command: "ceph osd destroy osd.0 --yes-i-really-mean-it" + + +- hosts: osds + become: yes + tasks: + + # osd.2 device - name: zap /dev/sdd1 command: "ceph-volume lvm zap /dev/sdd1 --destroy" environment: @@ -26,14 +45,7 @@ environment: CEPH_VOLUME_DEBUG: 1 - - name: stop ceph-osd@0 daemon - service: - name: ceph-osd@0 - state: stopped - - - name: destroy osd.0 - command: "ceph osd destroy osd.0 --yes-i-really-mean-it" - + # osd.0 lv - name: zap test_group/data-lv1 command: "ceph-volume lvm zap test_group/data-lv1" environment: diff --git a/src/ceph-volume/ceph_volume/tests/functional/lvm/xenial/bluestore/dmcrypt/test.yml b/src/ceph-volume/ceph_volume/tests/functional/lvm/xenial/bluestore/dmcrypt/test.yml index 9a60ab2e0ecfa..f93ff2304e3ca 100644 --- a/src/ceph-volume/ceph_volume/tests/functional/lvm/xenial/bluestore/dmcrypt/test.yml +++ b/src/ceph-volume/ceph_volume/tests/functional/lvm/xenial/bluestore/dmcrypt/test.yml @@ -1,4 +1,3 @@ - - hosts: osds become: yes tasks: @@ -8,33 +7,44 @@ name: ceph-osd@2 state: stopped - - name: destroy osd.2 + - name: stop ceph-osd@0 daemon + service: + name: ceph-osd@0 + state: stopped + +- hosts: mons + become: yes + tasks: + + - name: destroy osd.2 command: "ceph osd destroy osd.2 --yes-i-really-mean-it" - - name: zap /dev/sdd1 + - name: destroy osd.0 + command: "ceph osd destroy osd.0 --yes-i-really-mean-it" + + +- hosts: osds + become: yes + tasks: + + # osd.2 device + - name: zap /dev/sdd1 command: "ceph-volume lvm zap /dev/sdd1 --destroy" environment: CEPH_VOLUME_DEBUG: 1 - - name: redeploy osd.2 using /dev/sdd1 + - name: redeploy osd.2 using /dev/sdd1 command: "ceph-volume lvm create --bluestore --data /dev/sdd1 --osd-id 2" environment: CEPH_VOLUME_DEBUG: 1 - - name: stop ceph-osd@0 daemon - service: - name: ceph-osd@0 - state: stopped - - - name: destroy osd.0 - command: "ceph osd destroy osd.0 --yes-i-really-mean-it" - - - name: zap test_group/data-lv1 + # osd.0 lv + - name: zap test_group/data-lv1 command: "ceph-volume lvm zap test_group/data-lv1" environment: CEPH_VOLUME_DEBUG: 1 - - name: redeploy osd.0 using test_group/data-lv1 + - name: redeploy osd.0 using test_group/data-lv1 command: "ceph-volume lvm create --bluestore --data test_group/data-lv1 --osd-id 0" environment: CEPH_VOLUME_DEBUG: 1 @@ -44,9 +54,19 @@ name: ceph-osd@0 state: stopped + +- hosts: mons + become: yes + tasks: + - name: destroy osd.0 command: "ceph osd destroy osd.0 --yes-i-really-mean-it" + +- hosts: osds + become: yes + tasks: + - name: zap test_group/data-lv1 command: "ceph-volume lvm zap test_group/data-lv1" environment: diff --git a/src/ceph-volume/ceph_volume/tests/functional/lvm/xenial/filestore/dmcrypt/test.yml b/src/ceph-volume/ceph_volume/tests/functional/lvm/xenial/filestore/dmcrypt/test.yml index fc3e38c7aee46..49f37d20aade9 100644 --- a/src/ceph-volume/ceph_volume/tests/functional/lvm/xenial/filestore/dmcrypt/test.yml +++ b/src/ceph-volume/ceph_volume/tests/functional/lvm/xenial/filestore/dmcrypt/test.yml @@ -8,9 +8,28 @@ name: ceph-osd@2 state: stopped + - name: stop ceph-osd@0 daemon + service: + name: ceph-osd@0 + state: stopped + + +- hosts: mons + become: yes + tasks: + - name: destroy osd.2 command: "ceph osd destroy osd.2 --yes-i-really-mean-it" + - name: destroy osd.0 + command: "ceph osd destroy osd.0 --yes-i-really-mean-it" + + +- hosts: osds + become: yes + tasks: + + # osd.2 device - name: zap /dev/sdd1 command: "ceph-volume lvm zap /dev/sdd1 --destroy" environment: @@ -26,14 +45,7 @@ environment: CEPH_VOLUME_DEBUG: 1 - - name: stop ceph-osd@0 daemon - service: - name: ceph-osd@0 - state: stopped - - - name: destroy osd.0 - command: "ceph osd destroy osd.0 --yes-i-really-mean-it" - + # osd.0 lv - name: zap test_group/data-lv1 command: "ceph-volume lvm zap test_group/data-lv1" environment: -- 2.39.5