From b55fc7240d31732d38119c421b479cd3f426e669 Mon Sep 17 00:00:00 2001 From: Jesse Pretorius Date: Thu, 22 Jun 2017 17:36:42 +0100 Subject: [PATCH] Work around bad DNS resolution OpenStack-Infra DNS resolution of images.linuxcontainers.org is failing very often. This works around it by adding the appropriate entries into /etc/hosts on the host. Change-Id: I3fc1ad39d112d07bf4b1bc85d9c0f44ef91cfba5 --- .../bootstrap-host/tasks/prepare_aio_config.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/tests/roles/bootstrap-host/tasks/prepare_aio_config.yml b/tests/roles/bootstrap-host/tasks/prepare_aio_config.yml index b89edbd3dc..0ae3fce1ac 100644 --- a/tests/roles/bootstrap-host/tasks/prepare_aio_config.yml +++ b/tests/roles/bootstrap-host/tasks/prepare_aio_config.yml @@ -91,6 +91,19 @@ path: /etc/pip.conf register: pip_conf_file +# This is a very dirty hack due to images.linuxcontainers.org +# constantly failing to resolve in openstack-infra. +- name: Implement hard-coded hosts entries for consistently failing name + lineinfile: + path: "/etc/hosts" + line: "{{ item }}" + state: present + with_items: + - "91.189.91.21 images.linuxcontainers.org us.images.linuxcontainers.org" + - "91.189.88.37 images.linuxcontainers.org uk.images.linuxcontainers.org" + when: + - nodepool_dir.stat.exists + - name: Determine the fastest available OpenStack-Infra wheel mirror command: "{{ bootstrap_host_aio_script_path }}/fastest-infra-wheel-mirror.py" register: fastest_wheel_mirror