Skip to content

Commit e856bbf

Browse files
committed
nova05: ext net for tests accessing VMs via FIP
This DCN setup doesn't work with DVR (distributed FIP) because ext net VLAN 269 isn't extended cross-site. Add external NAD definition with VLAN to DT nncp/values.yaml. Add customServiceConfig to disable distributed FIPs in DT cp yaml. Update DT README with external network / centralized FIP notes. Update scenario-vars.yaml with external NAD for Tempest access to FIP. Make ctlplane routed with FIP public provider net so that any pod with just ctlplane NAD (like AnsibleTest used by gpu-validation) will have a route to the FIP subnet via the ctlplane gateway - same pattern as the storage route for Ceph RGW applied earlier. Signed-off-by: Bohdan Dobrelia <bdobreli@redhat.com>
1 parent c415e55 commit e856bbf

6 files changed

Lines changed: 172 additions & 83 deletions

File tree

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
apiVersion: k8s.cni.cncf.io/v1
3+
kind: NetworkAttachmentDefinition
4+
metadata:
5+
name: external
6+
labels:
7+
osp/net: external
8+
osp/net-attach-def-type: standard

dt/nova/nova05epsilon/networking/kustomization.yaml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ components:
2525
resources:
2626
- storagemgmt-nad.yaml
2727
- storagemgmt-metallb.yaml
28+
- external-nad.yaml
2829

2930
# Add storagemgmt network template, as it is needed for CephHCI
3031
patches:
@@ -122,3 +123,15 @@ replacements:
122123
name: ctlplane
123124
fieldPaths:
124125
- spec.interfaces.0
126+
127+
# External NAD for provider network FIP access
128+
- source:
129+
kind: ConfigMap
130+
name: network-values
131+
fieldPath: data.external.net-attach-def
132+
targets:
133+
- select:
134+
kind: NetworkAttachmentDefinition
135+
name: external
136+
fieldPaths:
137+
- spec.config

dt/nova/nova05epsilon/networking/nncp/kustomization.yaml

Lines changed: 82 additions & 82 deletions
Original file line numberDiff line numberDiff line change
@@ -47,86 +47,86 @@ patches:
4747
patch: |-
4848
- op: remove
4949
path: /spec/nodeSelector/node-role.kubernetes.io~1worker
50-
# Optional: add storagemgmt VLAN interface to the SNO node.
51-
# Uncomment this patch AND node_0.storagemgmt_ip in values.yaml.
52-
# Not required for CephHCI (Ceph uses storage network for OSD traffic).
53-
# - target:
54-
# kind: NodeNetworkConfigurationPolicy
55-
# name: node-0
56-
# patch: |-
57-
# - op: add
58-
# path: /spec/desiredState/interfaces/-
59-
# value:
60-
# description: storagemgmt vlan host interface
61-
# name: storagemgmt
62-
# state: up
63-
# type: vlan
64-
# mtu: _replaced_
65-
# ipv4:
66-
# address:
67-
# - ip: _replaced_
68-
# prefix-length: _replaced_
69-
# dhcp: false
70-
# enabled: true
71-
# ipv6:
72-
# enabled: false
73-
# vlan:
74-
# base-iface: _replaced_
75-
# id: _replaced_
7650
77-
# Uncomment these replacements together with the storagemgmt patch above
78-
# replacements:
79-
# - source:
80-
# kind: ConfigMap
81-
# name: network-values
82-
# fieldPath: data.node_0.storagemgmt_ip
83-
# targets:
84-
# - select:
85-
# kind: NodeNetworkConfigurationPolicy
86-
# name: node-0
87-
# fieldPaths:
88-
# - spec.desiredState.interfaces.[name=storagemgmt].ipv4.address.0.ip
89-
# - source:
90-
# kind: ConfigMap
91-
# name: network-values
92-
# fieldPath: data.storagemgmt.base_iface
93-
# targets:
94-
# - select:
95-
# kind: NodeNetworkConfigurationPolicy
96-
# fieldPaths:
97-
# - spec.desiredState.interfaces.[name=storagemgmt].vlan.base-iface
98-
# options:
99-
# create: true
100-
# - source:
101-
# kind: ConfigMap
102-
# name: network-values
103-
# fieldPath: data.storagemgmt.vlan
104-
# targets:
105-
# - select:
106-
# kind: NodeNetworkConfigurationPolicy
107-
# fieldPaths:
108-
# - spec.desiredState.interfaces.[name=storagemgmt].vlan.id
109-
# options:
110-
# create: true
111-
# - source:
112-
# kind: ConfigMap
113-
# name: network-values
114-
# fieldPath: data.storagemgmt.mtu
115-
# targets:
116-
# - select:
117-
# kind: NodeNetworkConfigurationPolicy
118-
# fieldPaths:
119-
# - spec.desiredState.interfaces.[name=storagemgmt].mtu
120-
# options:
121-
# create: true
122-
# - source:
123-
# kind: ConfigMap
124-
# name: network-values
125-
# fieldPath: data.storagemgmt.prefix-length
126-
# targets:
127-
# - select:
128-
# kind: NodeNetworkConfigurationPolicy
129-
# fieldPaths:
130-
# - spec.desiredState.interfaces.[name=storagemgmt].ipv4.address.0.prefix-length
131-
# options:
132-
# create: true
51+
# Add external VLAN interface on ospbr for OVN provider network access.
52+
# Required for centralized floating IPs in DCN scenarios where the
53+
# external VLAN is carried over the datacentre bridge.
54+
- target:
55+
kind: NodeNetworkConfigurationPolicy
56+
name: node-0
57+
patch: |-
58+
- op: add
59+
path: /spec/desiredState/interfaces/-
60+
value:
61+
description: external vlan interface on ospbr
62+
name: external
63+
state: up
64+
type: vlan
65+
mtu: _replaced_
66+
ipv4:
67+
address:
68+
- ip: _replaced_
69+
prefix-length: _replaced_
70+
dhcp: false
71+
enabled: true
72+
ipv6:
73+
enabled: false
74+
vlan:
75+
base-iface: _replaced_
76+
id: _replaced_
77+
78+
replacements:
79+
- source:
80+
kind: ConfigMap
81+
name: network-values
82+
fieldPath: data.node_0.external_ip
83+
targets:
84+
- select:
85+
kind: NodeNetworkConfigurationPolicy
86+
name: node-0
87+
fieldPaths:
88+
- spec.desiredState.interfaces.[name=external].ipv4.address.0.ip
89+
- source:
90+
kind: ConfigMap
91+
name: network-values
92+
fieldPath: data.external.base_iface
93+
targets:
94+
- select:
95+
kind: NodeNetworkConfigurationPolicy
96+
fieldPaths:
97+
- spec.desiredState.interfaces.[name=external].vlan.base-iface
98+
options:
99+
create: true
100+
- source:
101+
kind: ConfigMap
102+
name: network-values
103+
fieldPath: data.external.vlan
104+
targets:
105+
- select:
106+
kind: NodeNetworkConfigurationPolicy
107+
fieldPaths:
108+
- spec.desiredState.interfaces.[name=external].vlan.id
109+
options:
110+
create: true
111+
- source:
112+
kind: ConfigMap
113+
name: network-values
114+
fieldPath: data.external.mtu
115+
targets:
116+
- select:
117+
kind: NodeNetworkConfigurationPolicy
118+
fieldPaths:
119+
- spec.desiredState.interfaces.[name=external].mtu
120+
options:
121+
create: true
122+
- source:
123+
kind: ConfigMap
124+
name: network-values
125+
fieldPath: data.external.prefix-length
126+
targets:
127+
- select:
128+
kind: NodeNetworkConfigurationPolicy
129+
fieldPaths:
130+
- spec.desiredState.interfaces.[name=external].ipv4.address.0.prefix-length
131+
options:
132+
create: true

examples/dt/nova/nova05epsilon/README.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,3 +120,36 @@ The dataplane stages (pre-ceph nodeset, pre-ceph deployment, Ceph
120120
install, post-ceph nodeset, post-ceph deployment) must be repeated
121121
for each DCN site with site-specific values. Each site's computes
122122
should reference the appropriate cell, subnet, and AZ.
123+
124+
## External Network and Floating IPs
125+
126+
This topology deploys an `external` VLAN interface on `ospbr` to
127+
provide L2 access to the OpenStack provider (external) network.
128+
The external VLAN is the same segment that OVN uses for `datacentre`
129+
bridge mapping, so tagged frames for the external network appear
130+
on `ospbr`. A macvlan-based `NetworkAttachmentDefinition` in
131+
`bridge` mode gives pods (e.g. Tempest) direct access to floating
132+
IPs on that segment.
133+
134+
### Centralized Floating IPs
135+
136+
In DCN scenarios where the external VLAN is only available at the
137+
control-plane site (not extended to remote compute sites), OVN
138+
distributed floating IPs do not work because the compute node
139+
cannot ARP-respond for the FIP on a VLAN it cannot reach. Neutron
140+
is configured with `enable_distributed_floating_ip = false` in
141+
`service-values.yaml` to force centralized NAT through the OVN
142+
gateway chassis on the control-plane node.
143+
144+
### CHANGEME values for the external network
145+
146+
In `control-plane/networking/nncp/values.yaml`, fill in:
147+
- `CHANGEME_SNO_EXTERNAL_*`: IP range, CIDR, gateway, VLAN for
148+
the control-plane site's external subnet.
149+
- `CHANGEME_EDPM_EXTERNAL_*`: The same for the compute site.
150+
- `CHANGEME_SNO_EXTERNAL_IP`: IP address assigned to the `external`
151+
VLAN interface on the OCP node (must not overlap with NAD IPAM
152+
or OpenStack FIP allocation pools).
153+
- `CHANGEME_SNO_EXTERNAL_NAD_START/END`: IPAM range for pods
154+
attached via the `external` NAD (must not overlap with OpenStack
155+
FIP allocation pools).

examples/dt/nova/nova05epsilon/control-plane/networking/nncp/values.yaml

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@ data:
3333
"range_end": "CHANGEME_SNO_CTLPLANE_NAD_END",
3434
"routes": [
3535
{ "dst": "CHANGEME_EDPM_CTLPLANE_CIDR", "gw": "CHANGEME_SNO_CTLPLANE_GW" },
36-
{ "dst": "CHANGEME_EDPM_STORAGE_CIDR", "gw": "CHANGEME_SNO_CTLPLANE_GW" }
36+
{ "dst": "CHANGEME_EDPM_STORAGE_CIDR", "gw": "CHANGEME_SNO_CTLPLANE_GW" },
37+
{ "dst": "CHANGEME_EDPM_EXTERNAL_CIDR", "gw": "CHANGEME_SNO_CTLPLANE_GW" }
3738
]
3839
}
3940
}, {
@@ -61,6 +62,10 @@ data:
6162
# to reach Ceph RGW on the remote storage network.
6263
- destination: CHANGEME_EDPM_STORAGE_CIDR
6364
nexthop: CHANGEME_SNO_CTLPLANE_GW
65+
# Pods without external NAD (e.g. ansibletest) need this
66+
# to reach floating IPs on the EDPM external subnet.
67+
- destination: CHANGEME_EDPM_EXTERNAL_CIDR
68+
nexthop: CHANGEME_SNO_CTLPLANE_GW
6469
# CHANGEME: site4 EDPM computes -- replace CIDRs/gateway/VLAN
6570
- allocationRanges:
6671
- end: CHANGEME_EDPM_CTLPLANE_END
@@ -98,8 +103,31 @@ data:
98103
values:
99104
- CHANGEME_SNO_DNS_SERVER
100105
external:
106+
base_iface: ospbr
101107
dnsDomain: external.example.com
108+
iface: external
102109
mtu: 1500
110+
net-attach-def: |
111+
{
112+
"cniVersion": "0.4.0",
113+
"name": "external",
114+
"plugins": [{
115+
"type": "macvlan",
116+
"master": "external",
117+
"mode": "bridge",
118+
"ipam": {
119+
"type": "whereabouts",
120+
"range": "CHANGEME_SNO_EXTERNAL_CIDR",
121+
"range_start": "CHANGEME_SNO_EXTERNAL_NAD_START",
122+
"range_end": "CHANGEME_SNO_EXTERNAL_NAD_END"
123+
}
124+
}, {
125+
"type": "tuning",
126+
"sysctl": {
127+
"net.ipv6.conf.IFNAME.accept_ra": "0"
128+
}
129+
}]
130+
}
103131
prefix-length: 24
104132
subnets:
105133
- allocationRanges:
@@ -180,6 +208,7 @@ data:
180208
# SNO: single OCP node only
181209
node_0:
182210
ctlplane_ip: CHANGEME_SNO_CTLPLANE_IP
211+
external_ip: CHANGEME_SNO_EXTERNAL_IP
183212
internalapi_ip: CHANGEME_SNO_INTAPI_IP
184213
name: CHANGEME_SNO_NODE_NAME
185214
storage_ip: CHANGEME_SNO_STORAGE_IP

examples/dt/nova/nova05epsilon/control-plane/service-values.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,9 @@ data:
1414
cluster: rabbitmq
1515
tls:
1616
caBundleSecretName: ""
17+
neutron:
18+
customServiceConfig: |
19+
[ml2]
20+
mechanism_drivers = ovn
21+
[ovn]
22+
enable_distributed_floating_ip = false

0 commit comments

Comments
 (0)