Skip to content

Commit e1bc8e2

Browse files
committed
Add Octavia SKMO playbooks for amphora and network setup
Add two new SKMO hook playbooks for Octavia multi-region support: - upload-octavia-amphora-images.yaml: Wait for amphora image upload to complete in both regionOne and regionTwo before proceeding - configure-octavia-network.yaml: Ensure br-octavia OVS bridges are UP on all master nodes for routing between worker pods and amphora instances These fix connectivity issues where Neutron router gateway ports fail to schedule on chassis due to missing active bridge mappings. Assisted-by: Claude Opus 4.6 Signed-off-by: Ade Lee <alee@redhat.com>
1 parent 8f77bc8 commit e1bc8e2

2 files changed

Lines changed: 99 additions & 0 deletions

File tree

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
---
2+
# Configure Octavia network infrastructure on master nodes
3+
# This ensures br-octavia OVS bridges are UP for routing between
4+
# worker pods and amphora instances.
5+
- name: Configure Octavia network on master nodes
6+
hosts: "{{ cifmw_target_host | default('localhost') }}"
7+
gather_facts: false
8+
vars:
9+
cifmw_skmo_master_nodes:
10+
- master-0
11+
- master-1
12+
- master-2
13+
tasks:
14+
- name: Ensure br-octavia is UP on all master nodes
15+
environment:
16+
KUBECONFIG: "{{ cifmw_openshift_kubeconfig }}"
17+
PATH: "{{ cifmw_path }}"
18+
ansible.builtin.shell: |
19+
set -xe -o pipefail
20+
oc debug node/{{ item }} -- chroot /host ip link set br-octavia up
21+
loop: "{{ cifmw_skmo_master_nodes }}"
22+
changed_when: false
23+
register: _br_octavia_result
24+
failed_when: false # Don't fail if already UP
25+
26+
- name: Verify br-octavia is UP on all master nodes
27+
environment:
28+
KUBECONFIG: "{{ cifmw_openshift_kubeconfig }}"
29+
PATH: "{{ cifmw_path }}"
30+
ansible.builtin.shell: |
31+
set -xe -o pipefail
32+
oc debug node/{{ item }} -- chroot /host ip link show br-octavia | grep -q "state UP"
33+
loop: "{{ cifmw_skmo_master_nodes }}"
34+
changed_when: false
35+
retries: 3
36+
delay: 5
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
---
2+
# Wait for Octavia amphora image upload to complete in both regions
3+
# The octavia-operator automatically creates octavia-image-upload Jobs
4+
# when amphoraImageContainerImage is set in the OSCP CR (via architecture).
5+
# This playbook just waits for those uploads to complete before proceeding.
6+
- name: Wait for Octavia amphora image upload in both regions
7+
hosts: "{{ cifmw_target_host | default('localhost') }}"
8+
gather_facts: false
9+
vars:
10+
cifmw_skmo_central_namespace: openstack
11+
cifmw_skmo_leaf_namespace: openstack2
12+
tasks:
13+
- name: Wait for amphora image upload to complete in central region
14+
kubernetes.core.k8s_info:
15+
api_version: octavia.openstack.org/v1beta1
16+
kind: Octavia
17+
name: octavia
18+
namespace: "{{ cifmw_skmo_central_namespace }}"
19+
register: _octavia_central
20+
until:
21+
- _octavia_central.resources | length > 0
22+
- _octavia_central.resources[0].status.conditions |
23+
selectattr('type', 'equalto', 'OctaviaAmphoraImagesReady') |
24+
selectattr('status', 'equalto', 'True') | list | length > 0
25+
retries: 40
26+
delay: 15
27+
28+
- name: Verify amphora image is active in central region
29+
kubernetes.core.k8s_exec:
30+
namespace: "{{ cifmw_skmo_central_namespace }}"
31+
pod: openstackclient
32+
command: >-
33+
openstack image list --tag amphora-image -f value -c Status
34+
register: _amphora_image_central_result
35+
until: "'active' in _amphora_image_central_result.stdout"
36+
retries: 60
37+
delay: 30
38+
39+
- name: Wait for amphora image upload to complete in leaf region
40+
kubernetes.core.k8s_info:
41+
api_version: octavia.openstack.org/v1beta1
42+
kind: Octavia
43+
name: octavia
44+
namespace: "{{ cifmw_skmo_leaf_namespace }}"
45+
register: _octavia_leaf
46+
until:
47+
- _octavia_leaf.resources | length > 0
48+
- _octavia_leaf.resources[0].status.conditions |
49+
selectattr('type', 'equalto', 'OctaviaAmphoraImagesReady') |
50+
selectattr('status', 'equalto', 'True') | list | length > 0
51+
retries: 40
52+
delay: 15
53+
54+
- name: Verify amphora image is active in leaf region
55+
kubernetes.core.k8s_exec:
56+
namespace: "{{ cifmw_skmo_leaf_namespace }}"
57+
pod: openstackclient
58+
command: >-
59+
openstack image list --tag amphora-image -f value -c Status
60+
register: _amphora_image_leaf_result
61+
until: "'active' in _amphora_image_leaf_result.stdout"
62+
retries: 60
63+
delay: 30

0 commit comments

Comments
 (0)