]> git.apps.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>
Mon, 28 May 2018 20:04:35 +0000 (22:04 +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>
tests/functional/setup.yml
tox.ini

index 9101011972642eb413df8e42b9ba3c59cbdc1489..f93ab9b8217a5dc9541b601fe2f6c73bd26a78aa 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 76e372877d44faafcc309640b4db96919a43f916..e482cde724d26dea0fbe255f79fae8d05e421828 100644 (file)
--- a/tox.ini
+++ b/tox.ini
@@ -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