Skip to content

Commit

Permalink
Merge "feat: pre-pull ovn-controller image" into stable/zed
Browse files Browse the repository at this point in the history
  • Loading branch information
Zuul authored and Gerrit Code Review committed Jan 19, 2025
2 parents aa212e6 + 57b08fb commit 685e0ba
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 4 deletions.
8 changes: 4 additions & 4 deletions playbooks/openstack.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@
tags:
- iscsi

- name: Deploy Open vSwitch
- name: Deploy SDN
hosts: controllers:computes
become: true
gather_facts: false
Expand All @@ -88,13 +88,13 @@
tags:
- openvswitch

- hosts: controllers[0]
become: true
roles:
- role: ovn
tags:
- ovn

- hosts: controllers[0]
become: true
roles:
- role: libvirt
tags:
- libvirt
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
features:
- The ``ovn-controller`` image is now being pre-pulled on the nodes prior
to the Helm chart being deployed. This will help reduce the time it takes
to switch over to the new version of the ``ovn-controller`` image.
15 changes: 15 additions & 0 deletions roles/ovn/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,21 @@
- _ovn_controller_ds_info.resources | length > 0
- "'type' in _ovn_controller_ds_info.resources[0].spec.selector.matchLabels"

- name: Cache ovn-controller image before install or upgrade
block:
- name: Pull ovn-controller image
ansible.builtin.command: crictl pull {{ atmosphere_images['ovn_controller'] }}
register: pull_result
changed_when: false

- name: Verify ovn-controller image pull
ansible.builtin.assert:
that:
- pull_result.rc == 0
- "'Image is up to date' in pull_result.stdout or 'Image pulled' in pull_result.stdout"
fail_msg: "Failed to pull ovn-controller image"
success_msg: "Successfully pulled ovn-controller image"

- name: Deploy Helm chart
run_once: true
when: atmosphere_network_backend == 'ovn'
Expand Down

0 comments on commit 685e0ba

Please sign in to comment.