mirror of https://github.com/ceph/ceph-ansible.git
tests: retry to fire up VMs on vagrant failure
Add a script to retry several times to fire up VMs to avoid vagrant
failures.
Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
Co-authored-by: Andrew Schoen <aschoen@redhat.com>
(cherry picked from commit 1ecb3a9352
)
pull/4928/head
parent
7c2918d684
commit
2c96155c32
|
@ -0,0 +1,12 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
retries=0
|
||||||
|
until [ $retries -ge 5 ]
|
||||||
|
do
|
||||||
|
echo "Attempting to start VMs. Attempts: $retries"
|
||||||
|
timeout 10m vagrant up "$@" && break
|
||||||
|
retries=$[$retries+1]
|
||||||
|
sleep 5
|
||||||
|
done
|
||||||
|
|
||||||
|
sleep 10
|
2
tox.ini
2
tox.ini
|
@ -423,7 +423,7 @@ changedir=
|
||||||
lvm_auto_discovery: {toxinidir}/tests/functional/lvm-auto-discovery{env:CONTAINER_DIR:}
|
lvm_auto_discovery: {toxinidir}/tests/functional/lvm-auto-discovery{env:CONTAINER_DIR:}
|
||||||
|
|
||||||
commands=
|
commands=
|
||||||
vagrant up --no-provision {posargs:--provider=virtualbox}
|
bash {toxinidir}/tests/scripts/vagrant_up.sh --no-provision {posargs:--provider=virtualbox}
|
||||||
bash {toxinidir}/tests/scripts/generate_ssh_config.sh {changedir}
|
bash {toxinidir}/tests/scripts/generate_ssh_config.sh {changedir}
|
||||||
|
|
||||||
# configure lvm
|
# configure lvm
|
||||||
|
|
Loading…
Reference in New Issue