From aded2c190f56f02d7544f47b9b07b7c42b97729b Mon Sep 17 00:00:00 2001 From: Andrew Schoen Date: Thu, 7 Mar 2019 11:57:03 -0600 Subject: [PATCH] ceph-volume: use `simple scan` and `simple activate --all` in tests In a couple of the functional tests for simple we should run `simple scan` without any arguments and `simple activate --all` to increase the test coverage. We want to test pointing at a diretory and scanning all running OSDs. Signed-off-by: Andrew Schoen (cherry picked from commit 87c33f149a83bb1175bfb473b226e8c46e4e2a6e) --- .../centos7/bluestore/dmcrypt-luks/test.yml | 22 +++---------------- .../simple/xenial/filestore/activate/test.yml | 22 +++---------------- 2 files changed, 6 insertions(+), 38 deletions(-) diff --git a/src/ceph-volume/ceph_volume/tests/functional/simple/centos7/bluestore/dmcrypt-luks/test.yml b/src/ceph-volume/ceph_volume/tests/functional/simple/centos7/bluestore/dmcrypt-luks/test.yml index 24e2c0353c942..55ae7cc8eb943 100644 --- a/src/ceph-volume/ceph_volume/tests/functional/simple/centos7/bluestore/dmcrypt-luks/test.yml +++ b/src/ceph-volume/ceph_volume/tests/functional/simple/centos7/bluestore/dmcrypt-luks/test.yml @@ -4,28 +4,12 @@ become: yes tasks: - - name: list all OSD directories - find: - paths: /var/lib/ceph/osd - file_type: directory - register: osd_paths - - - name: scan all OSD directories - command: "ceph-volume --cluster={{ cluster }} simple scan {{ item.path }}" + - name: scan all running OSDs + command: "ceph-volume --cluster={{ cluster }} simple scan" environment: CEPH_VOLUME_DEBUG: 1 - with_items: - - "{{ osd_paths.files }}" - - - name: list all OSD JSON files - find: - paths: /etc/ceph/osd - file_type: file - register: osd_configs - name: activate all scanned OSDs - command: "ceph-volume --cluster={{ cluster }} simple activate --file {{ item.path }}" + command: "ceph-volume --cluster={{ cluster }} simple activate --all" environment: CEPH_VOLUME_DEBUG: 1 - with_items: - - "{{ osd_configs.files }}" diff --git a/src/ceph-volume/ceph_volume/tests/functional/simple/xenial/filestore/activate/test.yml b/src/ceph-volume/ceph_volume/tests/functional/simple/xenial/filestore/activate/test.yml index 24e2c0353c942..55ae7cc8eb943 100644 --- a/src/ceph-volume/ceph_volume/tests/functional/simple/xenial/filestore/activate/test.yml +++ b/src/ceph-volume/ceph_volume/tests/functional/simple/xenial/filestore/activate/test.yml @@ -4,28 +4,12 @@ become: yes tasks: - - name: list all OSD directories - find: - paths: /var/lib/ceph/osd - file_type: directory - register: osd_paths - - - name: scan all OSD directories - command: "ceph-volume --cluster={{ cluster }} simple scan {{ item.path }}" + - name: scan all running OSDs + command: "ceph-volume --cluster={{ cluster }} simple scan" environment: CEPH_VOLUME_DEBUG: 1 - with_items: - - "{{ osd_paths.files }}" - - - name: list all OSD JSON files - find: - paths: /etc/ceph/osd - file_type: file - register: osd_configs - name: activate all scanned OSDs - command: "ceph-volume --cluster={{ cluster }} simple activate --file {{ item.path }}" + command: "ceph-volume --cluster={{ cluster }} simple activate --all" environment: CEPH_VOLUME_DEBUG: 1 - with_items: - - "{{ osd_configs.files }}" -- 2.39.5