Skip to content

Commit 9c05293

Browse files
committed
Add SKMO OVN Octavia Tempest support for leaf region
Add EDPM recreate hook and extend network-values templates for Octavia NAD generation. Leaf-region Tempest config lives in ci-framework-jobs 05-tests.yaml; reproducer uses post_tests: [] like the uni job. Depends-On: openstack-k8s-operators/architecture#759 Signed-off-by: Ade Lee <alee@redhat.com> Assisted-by: Claude Opus 4.6
1 parent 2d92bae commit 9c05293

4 files changed

Lines changed: 131 additions & 10 deletions

File tree

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
---
2+
# Delete OpenStackDataPlaneDeployment when NodeSet config drifted.
3+
# After status.deployed=true the deployment controller does not re-run ansible
4+
# until the CR is recreated, even if osdpns configHash changed.
5+
- name: Recreate stale EDPM deployments when NodeSet config changed
6+
hosts: "{{ cifmw_target_hook_host | default('localhost') }}"
7+
gather_facts: false
8+
vars:
9+
skmo_edpm_targets:
10+
- namespace: openstack
11+
nodeset: openstack-edpm
12+
deployment: edpm-deployment
13+
- namespace: openstack2
14+
nodeset: openstack-edpm
15+
deployment: edpm-deployment
16+
tasks:
17+
- name: Recreate stale EDPM deployment in {{ target.namespace }}
18+
vars:
19+
target: "{{ item }}"
20+
loop: "{{ skmo_edpm_targets }}"
21+
loop_control:
22+
label: "{{ item.namespace }}"
23+
block:
24+
- name: Read NodeSet status
25+
kubernetes.core.k8s_info:
26+
api_version: dataplane.openstack.org/v1beta1
27+
kind: OpenStackDataPlaneNodeSet
28+
name: "{{ target.nodeset }}"
29+
namespace: "{{ target.namespace }}"
30+
register: _osdpns
31+
32+
- name: Delete stale OpenStackDataPlaneDeployment
33+
kubernetes.core.k8s:
34+
state: absent
35+
api_version: dataplane.openstack.org/v1beta1
36+
kind: OpenStackDataPlaneDeployment
37+
name: "{{ target.deployment }}"
38+
namespace: "{{ target.namespace }}"
39+
wait: true
40+
wait_timeout: 600
41+
when:
42+
- _osdpns.resources | length > 0
43+
- _osdpns.resources[0].status.configHash is defined
44+
- _osdpns.resources[0].status.configHash | length > 0
45+
- _osdpns.resources[0].status.deployedConfigHash is not defined or
46+
_osdpns.resources[0].status.configHash != _osdpns.resources[0].status.deployedConfigHash

roles/ci_gen_kustomize_values/templates/multi-namespace/network-values/values.yaml.j2

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,3 +124,32 @@ data:
124124

125125
lbServiceType: LoadBalancer
126126
storageClass: {{ cifmw_ci_gen_kustomize_values_storage_class }}
127+
128+
# Required when SKMO enables dt/osasinfra/nncp (octavia NNCP component)
129+
bridgeName: ospbr
130+
{% if cifmw_architecture_scenario == 'multi-namespace-skmo' %}
131+
octavia:
132+
dnsDomain: octavia.example.com
133+
mtu: 1500
134+
vlan: 23
135+
base_iface: enp7s0
136+
net-attach-def: |
137+
{
138+
"cniVersion": "0.3.1",
139+
"name": "octavia",
140+
"type": "bridge",
141+
"bridge": "octbr",
142+
"ipam": {
143+
"type": "whereabouts",
144+
"range": "172.23.0.0/24",
145+
"range_start": "172.23.0.30",
146+
"range_end": "172.23.0.70",
147+
"routes": [
148+
{
149+
"dst": "172.24.0.0/16",
150+
"gw": "172.23.0.150"
151+
}
152+
]
153+
}
154+
}
155+
{% endif %}

roles/ci_gen_kustomize_values/templates/multi-namespace/network-values2/values.yaml.j2

Lines changed: 30 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ data:
3232
{% endif %}
3333
{% endfor %}
3434

35-
{% for network in cifmw_networking_env_definition.networks.values() if "2" in network %}
35+
{% for network in cifmw_networking_env_definition.networks.values() if "2" in network.network_name %}
3636
{% set ns.lb_tools = {} %}
3737
{{ network.network_name | replace("2", "") }}:
3838
dnsDomain: {{ network.search_domain }}
@@ -53,7 +53,7 @@ data:
5353
gateway: {{ network[_ipv.gw_vX] }}
5454
{% endif %}
5555
name: subnet1
56-
{% if network.vlan_id is defined %}
56+
{% if network.vlan_id is defined and network.network_name != 'external2' %}
5757
vlan: {{ network.vlan_id }}
5858
{% endif %}
5959
{% if ns.lb_tools | length > 0 %}
@@ -134,3 +134,31 @@ data:
134134

135135
lbServiceType: LoadBalancer
136136
storageClass: {{ cifmw_ci_gen_kustomize_values_storage_class }}
137+
138+
bridgeName: ospbr
139+
{% if cifmw_architecture_scenario == 'multi-namespace-skmo' %}
140+
octavia:
141+
dnsDomain: octavia.example.com
142+
mtu: 1500
143+
vlan: 23
144+
base_iface: enp7s0
145+
net-attach-def: |
146+
{
147+
"cniVersion": "0.3.1",
148+
"name": "octavia",
149+
"type": "bridge",
150+
"bridge": "octbr",
151+
"ipam": {
152+
"type": "whereabouts",
153+
"range": "172.23.0.0/24",
154+
"range_start": "172.23.0.30",
155+
"range_end": "172.23.0.70",
156+
"routes": [
157+
{
158+
"dst": "172.24.0.0/16",
159+
"gw": "172.23.0.150"
160+
}
161+
]
162+
}
163+
}
164+
{% endif %}

scenarios/reproducers/va-multi-skmo.yml

Lines changed: 26 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -319,8 +319,25 @@ cifmw_networking_definition:
319319
ranges:
320320
- start: 100
321321
end: 250
322-
vlan: 32
322+
# No vlan: existing leaf NetConfig external subnet was created without VLAN;
323+
# NetConfig webhook rejects adding vlan to an established subnet.
324+
mtu: 1500
325+
octavia:
326+
network: "172.23.0.0/24"
327+
vlan: 23
323328
mtu: 1500
329+
tools:
330+
multus:
331+
ranges:
332+
- start: 30
333+
end: 70
334+
routes:
335+
- destination: "172.24.0.0/16"
336+
gateway: "172.23.0.150"
337+
netconfig:
338+
ranges:
339+
- start: 100
340+
end: 250
324341

325342
group-templates:
326343
ocps:
@@ -362,6 +379,8 @@ cifmw_networking_definition:
362379
trunk-parent: ctlplane
363380
storage:
364381
trunk-parent: ctlplane
382+
octavia:
383+
trunk-parent: ctlplane
365384
compute2s:
366385
network-template:
367386
range:
@@ -375,6 +394,8 @@ cifmw_networking_definition:
375394
trunk-parent: ctlplane2
376395
storage2:
377396
trunk-parent: ctlplane2
397+
octavia:
398+
trunk-parent: ctlplane2
378399
instances:
379400
controller-0:
380401
networks:
@@ -403,10 +424,7 @@ pre_admin_setup:
403424
cifmw_os_net_setup_public_end: "192.168.133.250"
404425
cifmw_os_net_setup_public_gateway: "192.168.133.1"
405426

406-
post_tests:
407-
- name: Run tempest against openstack2 namespace
408-
type: playbook
409-
source: "{{ ansible_user_dir }}/src/github.com/openstack-k8s-operators/ci-framework/playbooks/multi-namespace/ns2_validation.yaml"
410-
extra_vars:
411-
cifmw_test_operator_tempest_name: tempest-tests2
412-
cifmw_test_operator_namespace: openstack2
427+
# Tempest runs via ci-framework-jobs scenario vars (05-tests.yaml), not post_tests hooks.
428+
# Zuul: integration-uni-base variable_files_dirs loads scenarios/uni/va-multi-namespace-skmo/.
429+
# Local reproducer: pass -e @.../ci-framework-jobs/scenarios/uni/va-multi-namespace-skmo/05-tests.yaml
430+
post_tests: []

0 commit comments

Comments
 (0)