tests: avoid yum failures

In the CI we can see at many times failures like following:

`Failure talking to yum: Cannot find a valid baseurl for repo:
base/7/x86_64`

It seems the fastest mirror detection is sometimes counterproductive and
leads yum to fail.

This fix has been added in the `setup.yml`.
This playbook was used until now only just before playing `testinfra`
and could be used before running ceph-ansible so we can add some
provisionning tasks.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
Co-authored-by: Erwan Velu <evelu@redhat.com>
pull/2651/head
Guillaume Abrioux 2018-05-28 12:02:49 +02:00
parent 144b2fcebc
commit 98cb6ed8f6
2 changed files with 10 additions and 2 deletions

View File

@ -22,3 +22,11 @@
state: present
when:
- not is_atomic
- name: disable fastest mirror detection
ini_file:
path: /etc/yum/pluginconf.d/fastestmirror.conf
section: main
option: enabled
value: 0
when: ansible_distribution == 'CentOS'

View File

@ -211,6 +211,8 @@ commands=
rhcs: ansible-playbook -vv -i {changedir}/hosts {toxinidir}/tests/functional/rhcs_setup.yml --extra-vars "ceph_docker_registry={env:CEPH_DOCKER_REGISTRY:docker.io} repo_url={env:REPO_URL:} rhel7_repo_url={env:RHEL7_REPO_URL:}" --skip-tags "vagrant_setup"
ansible-playbook -vv -i {changedir}/hosts {toxinidir}/tests/functional/setup.yml
ansible-playbook -vv -i {changedir}/hosts {toxinidir}/{env:PLAYBOOK:site.yml.sample} --extra-vars "\
delegate_facts_host={env:DELEGATE_FACTS_HOST:True} \
fetch_directory={env:FETCH_DIRECTORY:{changedir}/fetch} \
@ -222,8 +224,6 @@ commands=
ceph_dev_sha1={env:CEPH_DEV_SHA1:latest} \
"
ansible-playbook -vv -i {changedir}/hosts {toxinidir}/tests/functional/setup.yml
# wait 2 minutes for services to be ready
sleep 120
# test cluster state using ceph-ansible tests