From 5cca8fc604b83bf46126e04658a6fceb5af2a704 Mon Sep 17 00:00:00 2001 From: Jan Fajerski Date: Tue, 16 Jun 2020 13:47:16 +0200 Subject: [PATCH] ceph-volume: fix lvm functional tests This is related to https://github.com/ceph/ceph-ansible/pull/5413 and adjusts the tests to work with the related ansible fix. Fixes: https://tracker.ceph.com/issues/46131 Signed-off-by: Jan Fajerski (cherry picked from commit a0134bb06508738e83456af7e440f418153053b0) --- src/ceph-volume/ceph_volume/tests/functional/batch/tox.ini | 2 +- .../ceph_volume/tests/functional/group_vars/bluestore_lvm | 3 +++ .../tests/functional/group_vars/bluestore_lvm_dmcrypt | 3 +++ .../ceph_volume/tests/functional/group_vars/filestore_lvm | 3 +++ .../tests/functional/group_vars/filestore_lvm_dmcrypt | 3 +++ .../tests/functional/lvm/playbooks/test_bluestore.yml | 4 ++-- .../tests/functional/lvm/playbooks/test_filestore.yml | 4 ++-- src/ceph-volume/ceph_volume/tests/functional/lvm/tox.ini | 2 +- 8 files changed, 18 insertions(+), 6 deletions(-) diff --git a/src/ceph-volume/ceph_volume/tests/functional/batch/tox.ini b/src/ceph-volume/ceph_volume/tests/functional/batch/tox.ini index 829a928d13c33..f7969fe9bde07 100644 --- a/src/ceph-volume/ceph_volume/tests/functional/batch/tox.ini +++ b/src/ceph-volume/ceph_volume/tests/functional/batch/tox.ini @@ -34,7 +34,7 @@ changedir= centos8-bluestore-mixed_type_explicit: {toxinidir}/centos8/bluestore/mixed-type-explicit centos8-bluestore-mixed_type_dmcrypt_explicit: {toxinidir}/centos8/bluestore/mixed-type-dmcrypt-explicit commands= - git clone -b {env:CEPH_ANSIBLE_BRANCH:master} --single-branch https://github.com/ceph/ceph-ansible.git {envdir}/tmp/ceph-ansible + git clone -b {env:CEPH_ANSIBLE_BRANCH:master} --single-branch {env:CEPH_ANSIBLE_CLONE:"https://github.com/ceph/ceph-ansible.git"} {envdir}/tmp/ceph-ansible python -m pip install -r {envdir}/tmp/ceph-ansible/tests/requirements.txt # bash {toxinidir}/../scripts/vagrant_up.sh {env:VAGRANT_UP_FLAGS:""} {posargs:--provider=virtualbox} diff --git a/src/ceph-volume/ceph_volume/tests/functional/group_vars/bluestore_lvm b/src/ceph-volume/ceph_volume/tests/functional/group_vars/bluestore_lvm index 65dc95233026a..c333af3e522c1 100644 --- a/src/ceph-volume/ceph_volume/tests/functional/group_vars/bluestore_lvm +++ b/src/ceph-volume/ceph_volume/tests/functional/group_vars/bluestore_lvm @@ -11,6 +11,9 @@ osd_scenario: lvm ceph_origin: 'repository' ceph_repository: 'dev' copy_admin_key: false +pv_devices: + - /dev/vdb + - /dev/vdc lvm_volumes: - data: data-lv1 data_vg: test_group diff --git a/src/ceph-volume/ceph_volume/tests/functional/group_vars/bluestore_lvm_dmcrypt b/src/ceph-volume/ceph_volume/tests/functional/group_vars/bluestore_lvm_dmcrypt index 93c870a36db00..d73637763bc5b 100644 --- a/src/ceph-volume/ceph_volume/tests/functional/group_vars/bluestore_lvm_dmcrypt +++ b/src/ceph-volume/ceph_volume/tests/functional/group_vars/bluestore_lvm_dmcrypt @@ -12,6 +12,9 @@ osd_scenario: lvm ceph_origin: 'repository' ceph_repository: 'dev' copy_admin_key: false +pv_devices: + - /dev/vdb + - /dev/vdc lvm_volumes: - data: data-lv1 data_vg: test_group diff --git a/src/ceph-volume/ceph_volume/tests/functional/group_vars/filestore_lvm b/src/ceph-volume/ceph_volume/tests/functional/group_vars/filestore_lvm index cc40419d6e690..f5f26e7cef885 100644 --- a/src/ceph-volume/ceph_volume/tests/functional/group_vars/filestore_lvm +++ b/src/ceph-volume/ceph_volume/tests/functional/group_vars/filestore_lvm @@ -11,6 +11,9 @@ osd_scenario: lvm ceph_origin: 'repository' ceph_repository: 'dev' copy_admin_key: false +pv_devices: + - /dev/vdb + - /dev/vdc # test-volume is created by tests/functional/lvm_setup.yml from /dev/sda lvm_volumes: - data: data-lv1 diff --git a/src/ceph-volume/ceph_volume/tests/functional/group_vars/filestore_lvm_dmcrypt b/src/ceph-volume/ceph_volume/tests/functional/group_vars/filestore_lvm_dmcrypt index d0910837275f0..e5c08727108e6 100644 --- a/src/ceph-volume/ceph_volume/tests/functional/group_vars/filestore_lvm_dmcrypt +++ b/src/ceph-volume/ceph_volume/tests/functional/group_vars/filestore_lvm_dmcrypt @@ -12,6 +12,9 @@ osd_scenario: lvm ceph_origin: 'repository' ceph_repository: 'dev' copy_admin_key: false +pv_devices: + - /dev/vdb + - /dev/vdc # test-volume is created by tests/functional/lvm_setup.yml from /dev/sda lvm_volumes: - data: data-lv1 diff --git a/src/ceph-volume/ceph_volume/tests/functional/lvm/playbooks/test_bluestore.yml b/src/ceph-volume/ceph_volume/tests/functional/lvm/playbooks/test_bluestore.yml index e8cf077c6cb82..2cf83e477fbd6 100644 --- a/src/ceph-volume/ceph_volume/tests/functional/lvm/playbooks/test_bluestore.yml +++ b/src/ceph-volume/ceph_volume/tests/functional/lvm/playbooks/test_bluestore.yml @@ -114,8 +114,8 @@ suffix: sparse register: tmpdir - - name: create a 5GB sparse file - command: fallocate -l 5G {{ tmpdir.path }}/sparse.file + - name: create a 1GB sparse file + command: fallocate -l 1G {{ tmpdir.path }}/sparse.file - name: find an empty loop device command: losetup -f diff --git a/src/ceph-volume/ceph_volume/tests/functional/lvm/playbooks/test_filestore.yml b/src/ceph-volume/ceph_volume/tests/functional/lvm/playbooks/test_filestore.yml index 9239a36246534..42ee40a1baa65 100644 --- a/src/ceph-volume/ceph_volume/tests/functional/lvm/playbooks/test_filestore.yml +++ b/src/ceph-volume/ceph_volume/tests/functional/lvm/playbooks/test_filestore.yml @@ -135,8 +135,8 @@ suffix: sparse register: tmpdir - - name: create a 5GB sparse file - command: fallocate -l 5G {{ tmpdir.path }}/sparse.file + - name: create a 1GB sparse file + command: fallocate -l 1G {{ tmpdir.path }}/sparse.file - name: find an empty loop device command: losetup -f diff --git a/src/ceph-volume/ceph_volume/tests/functional/lvm/tox.ini b/src/ceph-volume/ceph_volume/tests/functional/lvm/tox.ini index 1dd7c999f0baa..2b63875bf438d 100644 --- a/src/ceph-volume/ceph_volume/tests/functional/lvm/tox.ini +++ b/src/ceph-volume/ceph_volume/tests/functional/lvm/tox.ini @@ -32,7 +32,7 @@ changedir= centos8-filestore-prepare_activate: {toxinidir}/xenial/filestore/prepare_activate centos8-bluestore-prepare_activate: {toxinidir}/xenial/bluestore/prepare_activate commands= - git clone -b {env:CEPH_ANSIBLE_BRANCH:master} --single-branch https://github.com/ceph/ceph-ansible.git {envdir}/tmp/ceph-ansible + git clone -b {env:CEPH_ANSIBLE_BRANCH:master} --single-branch {env:CEPH_ANSIBLE_CLONE:"https://github.com/ceph/ceph-ansible.git"} {envdir}/tmp/ceph-ansible pip install -r {envdir}/tmp/ceph-ansible/tests/requirements.txt bash {toxinidir}/../scripts/vagrant_up.sh {env:VAGRANT_UP_FLAGS:"--no-provision"} {posargs:--provider=virtualbox} -- 2.39.5