Skip to content

Commit

Permalink
Merge pull request #383 from luis5tb/download-cache
Browse files Browse the repository at this point in the history
Add frr and ovn_bgp_agent images to download_cache
  • Loading branch information
openshift-ci[bot] authored Oct 4, 2023
2 parents 2ecdfc8 + e823dd2 commit c549151
Show file tree
Hide file tree
Showing 7 changed files with 68 additions and 0 deletions.
16 changes: 16 additions & 0 deletions roles/edpm_download_cache/tasks/container_images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,22 @@
- edpm_ovn
- download_cache

- name: Download images for edpm_frr role
ansible.builtin.include_role:
name: osp.edpm.edpm_frr
tasks_from: download_cache.yml
tags:
- edpm_frr
- download_cache

- name: Download images for edpm_ovn_bgp_agent role
ansible.builtin.include_role:
name: osp.edpm.edpm_ovn_bgp_agent
tasks_from: download_cache.yml
tags:
- edpm_ovn_bgp_agent
- download_cache

- name: Download images for edpm_multipathd role
ansible.builtin.include_role:
name: osp.edpm.edpm_multipathd
Expand Down
6 changes: 6 additions & 0 deletions roles/edpm_frr/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,3 +84,9 @@ edpm_frr_volumes:
- /var/lib/config-data/ansible-generated/frr:/var/lib/kolla/config_files/src:ro
- /var/log/containers/frr:/var/log/frr:z
- /run/frr:/run/frr:shared,z

# seconds between retries for download tasks
edpm_frr_images_download_delay: 5

# number of retries for download tasks
edpm_frr_images_download_retries: 5
8 changes: 8 additions & 0 deletions roles/edpm_frr/meta/argument_specs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,14 @@ argument_specs:
default: quay.io/podified-antelope-centos9/openstack-frr:current-podified
description: URL to openstack-frr container image.
type: str
edpm_frr_images_download_delay:
type: int
default: 5
description: The seconds between retries for failed download tasks
edpm_frr_images_download_retries:
type: int
default: 5
description: The number of retries for failed download tasks
edpm_frr_log_level:
default: informational
description: Log level settings.
Expand Down
12 changes: 12 additions & 0 deletions roles/edpm_frr/tasks/download_cache.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---

- name: Download needed container images
containers.podman.podman_image:
name: "{{ item }}"
loop:
- "{{ edpm_frr_image }}"
become: true
register: edpm_frr_images_download
until: edpm_frr_images_download.failed == false
retries: "{{ edpm_frr_images_download_retries }}"
delay: "{{ edpm_frr_images_download_delay }}"
6 changes: 6 additions & 0 deletions roles/edpm_ovn_bgp_agent/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,3 +68,9 @@ edpm_ovn_bgp_agent_tls_volumes:
- /etc/pki/tls/private/ovn_bgp_agent.key:/etc/pki/tls/private/ovn_bgp_agent.key

# we need to add the InternalTLSCAFile and do a if/then/else in case tls-e

# seconds between retries for download tasks
edpm_ovn_bgp_agent_images_download_delay: 5

# number of retries for download tasks
edpm_ovn_bgp_agent_images_download_retries: 5
8 changes: 8 additions & 0 deletions roles/edpm_ovn_bgp_agent/meta/argument_specs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,14 @@ argument_specs:
type: str
default: "quay.io/podified-antelope-centos9/openstack-ovn-bgp-agent:current-podified"
description: OVN BGP agent image.
edpm_ovn_bgp_agent_images_download_delay:
type: int
default: 5
description: The seconds between retries for failed download tasks
edpm_ovn_bgp_agent_images_download_retries:
type: int
default: 5
description: The number of retries for failed download tasks
edpm_ovn_bgp_agent_address_scopes:
description: |
Allows to filter on the address scope.
Expand Down
12 changes: 12 additions & 0 deletions roles/edpm_ovn_bgp_agent/tasks/download_cache.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---

- name: Download needed container images
containers.podman.podman_image:
name: "{{ item }}"
loop:
- "{{ edpm_ovn_bgp_agent_image }}"
become: true
register: edpm_ovn_bgp_agent_images_download
until: edpm_ovn_bgp_agent_images_download.failed == false
retries: "{{ edpm_ovn_bgp_agent_images_download_retries }}"
delay: "{{ edpm_ovn_bgp_agent_images_download_delay }}"

0 comments on commit c549151

Please sign in to comment.