From cd984f042b93be48345b09648700bd83a26845cb Mon Sep 17 00:00:00 2001 From: Micah Abbott Date: Tue, 26 Jun 2018 14:22:26 -0400 Subject: [PATCH] dprr: modify list of "popular" images for CentOS based streams The i-s-t has been failing for longer than I would care to admit because of CentOS/sig-atomic-buildscripts#329 and there's been little movement in the direction of fixing that. So we'll workaround the deficincieny by using two lists of images, one that works for CentOS derived streams and another that works for the rest. --- roles/docker_pull_run_remove/tasks/main.yml | 16 ++++++++++++---- roles/docker_pull_run_remove/vars/main.yml | 10 ++++++++++ 2 files changed, 22 insertions(+), 4 deletions(-) diff --git a/roles/docker_pull_run_remove/tasks/main.yml b/roles/docker_pull_run_remove/tasks/main.yml index 69b8217..26affd4 100644 --- a/roles/docker_pull_run_remove/tasks/main.yml +++ b/roles/docker_pull_run_remove/tasks/main.yml @@ -3,9 +3,17 @@ # # popular_images is defined in roles/docker_pull_run_remove/vars/main.yml # +- when: "'CentOS' in ansible_distribution" + set_fact: + dprr_images: "{{ centos_popular_images }}" + +- when: "'CentOS' not in ansible_distribution" + set_fact: + dprr_images: "{{ popular_images }}" + - name: Pull the popular container images command: "docker pull {{ item }}" - with_items: "{{ popular_images }}" + with_items: "{{ dprr_images }}" register: dpd retries: 5 delay: 60 @@ -13,13 +21,13 @@ - name: Run the popular container images command: "docker run --rm {{ item }} echo 'hello'" - with_items: "{{ popular_images }}" + with_items: "{{ dprr_images }}" # Test for https://bugzilla.redhat.com/show_bug.cgi?id=1585735 - name: Run the popular container images with cpu-shares flag command: "docker run --cpu-shares 2 --rm {{ item }} echo 'hello'" - with_items: "{{ popular_images }}" + with_items: "{{ dprr_images }}" - name: Remove the popular container images command: "docker rmi {{ item }}" - with_items: "{{ popular_images }}" + with_items: "{{ dprr_images }}" diff --git a/roles/docker_pull_run_remove/vars/main.yml b/roles/docker_pull_run_remove/vars/main.yml index 4958e2e..f14bf56 100644 --- a/roles/docker_pull_run_remove/vars/main.yml +++ b/roles/docker_pull_run_remove/vars/main.yml @@ -8,3 +8,13 @@ popular_images: - registry.fedoraproject.org/fedora - registry.centos.org/centos/centos - registry.access.redhat.com/rhel + +# Until https://github.com/CentOS/sig-atomic-buildscripts/issues/329 +# is resolved, we will use a different list of images for CentOS AH +# streams +centos_popular_images: + - docker.io/alpine + - docker.io/busybox + - docker.io/ubuntu + - registry.fedoraproject.org/fedora + - registry.centos.org/centos/centos