summaryrefslogtreecommitdiffstats
path: root/src/ceph-volume/ceph_volume/tests/functional/lvm/tox.ini
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-27 18:24:20 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-27 18:24:20 +0000
commit483eb2f56657e8e7f419ab1a4fab8dce9ade8609 (patch)
treee5d88d25d870d5dedacb6bbdbe2a966086a0a5cf /src/ceph-volume/ceph_volume/tests/functional/lvm/tox.ini
parentInitial commit. (diff)
downloadceph-upstream.tar.xz
ceph-upstream.zip
Adding upstream version 14.2.21.upstream/14.2.21upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/ceph-volume/ceph_volume/tests/functional/lvm/tox.ini')
-rw-r--r--src/ceph-volume/ceph_volume/tests/functional/lvm/tox.ini79
1 files changed, 79 insertions, 0 deletions
diff --git a/src/ceph-volume/ceph_volume/tests/functional/lvm/tox.ini b/src/ceph-volume/ceph_volume/tests/functional/lvm/tox.ini
new file mode 100644
index 00000000..0b38c85b
--- /dev/null
+++ b/src/ceph-volume/ceph_volume/tests/functional/lvm/tox.ini
@@ -0,0 +1,79 @@
+[tox]
+envlist = {centos7,xenial}-{filestore,bluestore}-{create,prepare_activate,dmcrypt}
+skipsdist = True
+
+[testenv]
+deps = mock
+whitelist_externals =
+ vagrant
+ bash
+ git
+ cp
+ sleep
+passenv=*
+setenv=
+ ANSIBLE_SSH_ARGS = -F {changedir}/vagrant_ssh_config
+ ANSIBLE_ACTION_PLUGINS = {envdir}/tmp/ceph-ansible/plugins/actions
+ ANSIBLE_STDOUT_CALLBACK = debug
+ ANSIBLE_RETRY_FILES_ENABLED = False
+ ANSIBLE_SSH_RETRIES = 5
+ VAGRANT_CWD = {changedir}
+ CEPH_VOLUME_DEBUG = 1
+ DEBIAN_FRONTEND=noninteractive
+changedir=
+ # plain/unencrypted
+ centos7-filestore-create: {toxinidir}/centos7/filestore/create
+ centos7-bluestore-create: {toxinidir}/centos7/bluestore/create
+ xenial-filestore-create: {toxinidir}/xenial/filestore/create
+ xenial-bluestore-create: {toxinidir}/xenial/bluestore/create
+ # dmcrypt
+ centos7-filestore-dmcrypt: {toxinidir}/centos7/filestore/dmcrypt
+ centos7-bluestore-dmcrypt: {toxinidir}/centos7/bluestore/dmcrypt
+ xenial-filestore-dmcrypt: {toxinidir}/xenial/filestore/dmcrypt
+ xenial-bluestore-dmcrypt: {toxinidir}/xenial/bluestore/dmcrypt
+ # TODO: these are placeholders for now, eventually we want to
+ # test the prepare/activate workflow of ceph-volume as well
+ xenial-filestore-prepare_activate: {toxinidir}/xenial/filestore/prepare_activate
+ xenial-bluestore-prepare_activate: {toxinidir}/xenial/bluestore/prepare_activate
+ centos7-filestore-prepare_activate: {toxinidir}/xenial/filestore/prepare_activate
+ centos7-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
+ 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}
+ bash {toxinidir}/../scripts/generate_ssh_config.sh {changedir}
+
+ # create logical volumes to test with on the vms
+ ansible-playbook -vv -i {changedir}/hosts {envdir}/tmp/ceph-ansible/tests/functional/lvm_setup.yml
+
+ # ad-hoc/local test setup for lvm
+ ansible-playbook -vv -i {changedir}/hosts {changedir}/setup.yml
+
+ cp {toxinidir}/../playbooks/deploy.yml {envdir}/tmp/ceph-ansible
+
+ # use ceph-ansible to deploy a ceph cluster on the vms
+ ansible-playbook -vv -i {changedir}/hosts {envdir}/tmp/ceph-ansible/deploy.yml --extra-vars "fetch_directory={changedir}/fetch ceph_dev_branch={env:CEPH_DEV_BRANCH:master} ceph_dev_sha1={env:CEPH_DEV_SHA1:latest} toxinidir={toxinidir}"
+
+ # prepare nodes for testing with testinfra
+ ansible-playbook -vv -i {changedir}/hosts {envdir}/tmp/ceph-ansible/tests/functional/setup.yml
+
+ # test cluster state using testinfra
+ py.test -n 4 --sudo -v --connection=ansible --ssh-config={changedir}/vagrant_ssh_config --ansible-inventory={changedir}/hosts {toxinidir}/../tests
+
+ # reboot all vms - attempt
+ bash {toxinidir}/../scripts/vagrant_reload.sh {env:VAGRANT_UP_FLAGS:"--no-provision"} {posargs:--provider=virtualbox}
+
+ # after a reboot, osds may take about 20 seconds to come back up
+ sleep 30
+
+ # retest to ensure cluster came back up correctly after rebooting
+ py.test -n 4 --sudo -v --connection=ansible --ssh-config={changedir}/vagrant_ssh_config --ansible-inventory={changedir}/hosts {toxinidir}/../tests
+
+ # destroy an OSD, zap it's device and recreate it using it's ID
+ ansible-playbook -vv -i {changedir}/hosts {changedir}/test.yml
+
+ # retest to ensure cluster came back up correctly
+ py.test -n 4 --sudo -v --connection=ansible --ssh-config={changedir}/vagrant_ssh_config --ansible-inventory={changedir}/hosts {toxinidir}/../tests
+
+ vagrant destroy {env:VAGRANT_DESTROY_FLAGS:"--force"}