]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
tests: avoid yum failures
authorGuillaume Abrioux <gabrioux@redhat.com>
Mon, 28 May 2018 10:02:49 +0000 (12:02 +0200)
committerGuillaume Abrioux <gabrioux@redhat.com>
Wed, 30 May 2018 11:21:32 +0000 (13:21 +0200)
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>
(cherry picked from commit 98cb6ed8f602d9c54b63c5381a17dbca75df6bc2)
Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
tests/functional/setup.yml
tox.ini

index 881da27979ac4074c9c737257e11a5cb06300c61..04a6c028ead469b53f6a099a189310a4124d65f3 100644 (file)
         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'
\ No newline at end of file
diff --git a/tox.ini b/tox.ini
index 31616d0588fd9be0f3628eb1350cb627754c3399..9c1bc9cc337f62bcb18dfe0b397a026e5a75379b 100644 (file)
--- a/tox.ini
+++ b/tox.ini
@@ -204,6 +204,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} \
@@ -215,8 +217,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