]> git.proxmox.com Git - ceph.git/blame - ceph/src/ceph-volume/ceph_volume/tests/functional/batch/tox.ini
Add patch for failing prerm scripts
[ceph.git] / ceph / src / ceph-volume / ceph_volume / tests / functional / batch / tox.ini
CommitLineData
1adf2230 1[tox]
11fdf7f2 2envlist = {centos7,xenial}-{bluestore,filestore}-{single_type,single_type_dmcrypt},centos7-{bluestore,filestore}-{mixed_type,mixed_type_dmcrypt,mixed_type_explicit, mixed_type_dmcrypt_explicit}
1adf2230
AA
3skipsdist = True
4
5[testenv]
6whitelist_externals =
7 vagrant
8 bash
9 git
10 cp
11passenv=*
12setenv=
13 ANSIBLE_SSH_ARGS = -F {changedir}/vagrant_ssh_config
14 ANSIBLE_ACTION_PLUGINS = {envdir}/tmp/ceph-ansible/plugins/actions
15 ANSIBLE_STDOUT_CALLBACK = debug
16 ANSIBLE_RETRY_FILES_ENABLED = False
17 ANSIBLE_SSH_RETRIES = 5
18 VAGRANT_CWD = {changedir}
19 CEPH_VOLUME_DEBUG = 1
494da23a 20 DEBIAN_FRONTEND=noninteractive
1adf2230
AA
21changedir=
22 centos7-filestore-single_type: {toxinidir}/centos7/filestore/single-type
23 centos7-filestore-single_type_dmcrypt: {toxinidir}/centos7/filestore/single-type-dmcrypt
91327a77
AA
24 centos7-filestore-mixed_type: {toxinidir}/centos7/filestore/mixed-type
25 centos7-filestore-mixed_type_dmcrypt: {toxinidir}/centos7/filestore/mixed-type-dmcrypt
11fdf7f2
TL
26 centos7-filestore-mixed_type_explicit: {toxinidir}/centos7/filestore/mixed-type-explicit
27 centos7-filestore-mixed_type_dmcrypt_explicit: {toxinidir}/centos7/filestore/mixed-type-dmcrypt-explicit
1adf2230
AA
28 centos7-bluestore-single_type: {toxinidir}/centos7/bluestore/single-type
29 centos7-bluestore-single_type_dmcrypt: {toxinidir}/centos7/bluestore/single-type-dmcrypt
91327a77
AA
30 centos7-bluestore-mixed_type: {toxinidir}/centos7/bluestore/mixed-type
31 centos7-bluestore-mixed_type_dmcrypt: {toxinidir}/centos7/bluestore/mixed-type-dmcrypt
11fdf7f2
TL
32 centos7-bluestore-mixed_type_explicit: {toxinidir}/centos7/bluestore/mixed-type-explicit
33 centos7-bluestore-mixed_type_dmcrypt_explicit: {toxinidir}/centos7/bluestore/mixed-type-dmcrypt-explicit
1adf2230
AA
34 xenial-filestore-single_type: {toxinidir}/xenial/filestore/single-type
35 xenial-filestore-single_type_dmcrypt: {toxinidir}/xenial/filestore/single-type-dmcrypt
36 xenial-bluestore-single_type: {toxinidir}/xenial/bluestore/single-type
37 xenial-bluestore-single_type_dmcrypt: {toxinidir}/xenial/bluestore/single-type-dmcrypt
38commands=
39 git clone -b {env:CEPH_ANSIBLE_BRANCH:master} --single-branch https://github.com/ceph/ceph-ansible.git {envdir}/tmp/ceph-ansible
11fdf7f2 40 python -m pip install -r {envdir}/tmp/ceph-ansible/tests/requirements.txt
1adf2230
AA
41
42 bash {toxinidir}/../scripts/vagrant_up.sh {env:VAGRANT_UP_FLAGS:"--no-provision"} {posargs:--provider=virtualbox}
43 bash {toxinidir}/../scripts/generate_ssh_config.sh {changedir}
44
45 cp {toxinidir}/../playbooks/deploy.yml {envdir}/tmp/ceph-ansible
46
91327a77
AA
47 # individual scenario setup
48 ansible-playbook -vv -i {changedir}/hosts {changedir}/setup.yml
49
1adf2230
AA
50 # use ceph-ansible to deploy a ceph cluster on the vms
51 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}"
52
53 # prepare nodes for testing with testinfra
54 ansible-playbook -vv -i {changedir}/hosts {envdir}/tmp/ceph-ansible/tests/functional/setup.yml
55
81eedcae
TL
56 # test cluster state using testinfra
57 py.test -n 4 --sudo -v --connection=ansible --ssh-config={changedir}/vagrant_ssh_config --ansible-inventory={changedir}/hosts {toxinidir}/../tests
1adf2230
AA
58
59 # reboot all vms - attempt
60 bash {toxinidir}/../scripts/vagrant_reload.sh {env:VAGRANT_UP_FLAGS:"--no-provision"} {posargs:--provider=virtualbox}
61
81eedcae
TL
62 # after a reboot, osds may take about 20 seconds to come back up
63 sleep 30
64
1adf2230 65 # retest to ensure cluster came back up correctly after rebooting
81eedcae 66 py.test -n 4 --sudo -v --connection=ansible --ssh-config={changedir}/vagrant_ssh_config --ansible-inventory={changedir}/hosts {toxinidir}/../tests
1adf2230
AA
67
68 # destroy an OSD, zap it's device and recreate it using it's ID
69 ansible-playbook -vv -i {changedir}/hosts {changedir}/test.yml
70
71 # retest to ensure cluster came back up correctly
81eedcae 72 py.test -n 4 --sudo -v --connection=ansible --ssh-config={changedir}/vagrant_ssh_config --ansible-inventory={changedir}/hosts {toxinidir}/../tests
1adf2230 73
f64942e4
AA
74 # test zap OSDs by ID
75 ansible-playbook -vv -i {changedir}/hosts {changedir}/test_zap.yml
76
1adf2230 77 vagrant destroy {env:VAGRANT_DESTROY_FLAGS:"--force"}