Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BGP] Add AZs to schedule Octavia mgmt network on OCP nodes #425

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion automation/vars/uni01alpha.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ vas:
oc -n openstack wait openstackdataplanedeployment
edpm-deployment
--for condition=Ready
--timeout=40m
--timeout=80m
values:
- name: edpm-deployment-values
src_file: values.yaml
Expand Down
35 changes: 35 additions & 0 deletions dt/bgp/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,19 @@ resources:
- ocp_networks_octavia_netattach.yaml

patches:
# Add octavia network to NetConfig
- target:
kind: NetConfig
name: netconfig
patch: |-
- op: add
path: /spec/networks/-
value:
dnsDomain: octavia.example.com
name: octavia
subnets:
- _replaced_
mtu: 1500
# Add BGP networks to NetConfig
- target:
kind: NetConfig
Expand Down Expand Up @@ -101,6 +114,16 @@ patches:
networkAttachment: internalapi

replacements:
# octavia NetConfig customizations
- source:
kind: ConfigMap
name: network-values
fieldPath: data.octavia.subnets
targets:
- select:
kind: NetConfig
fieldPaths:
- spec.networks.[name=octavia].subnets
# BGP NetConfig customizations
- source:
kind: ConfigMap
Expand Down Expand Up @@ -209,6 +232,18 @@ replacements:
options:
create: true

- source:
kind: ConfigMap
name: service-values
fieldPath: data.octavia.lbMgmtNetwork
targets:
- select:
kind: OpenStackControlPlane
fieldPaths:
- spec.octavia.template.lbMgmtNetwork
options:
create: true

- source:
kind: ConfigMap
name: service-values
Expand Down
4 changes: 2 additions & 2 deletions dt/uni01alpha/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -204,12 +204,12 @@ replacements:
- source:
kind: ConfigMap
name: service-values
fieldPath: data.octavia.availabilityZones
fieldPath: data.octavia.lbMgmtNetwork
eduolivares marked this conversation as resolved.
Show resolved Hide resolved
targets:
- select:
kind: OpenStackControlPlane
fieldPaths:
- spec.octavia.template.lbMgmtNetwork.availabilityZones
- spec.octavia.template.lbMgmtNetwork
options:
create: true

Expand Down
23 changes: 15 additions & 8 deletions examples/dt/bgp/bgp_dt01/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,13 @@ This DT configures both compute and networker EDPM nodes. So far, networker
nodes are needed when BGP is used on RHOSO, in order to expose routes to SNAT
traffic (OVN Gateway IPs). In other words, when RHOSO is used with BGP, the OCP
workers cannot be configured as OVN Gateways.
On the other hand, Octavia needs to use OCP workers as OVN Gateways for
its management network.
To resolve this conflict, BGP DT01 uses Availability Zones:
* zone-1 is only used for the Octavia management network, which is scheduled on
the OCP workers
* zone-2 is used for the provider networks, whose routers ports will be
scheduled on the networker nodes.

The OCP and EDPM nodes deployed with this DT are distributed into three
different racks. Each rack is connected to two leaves.
Expand Down Expand Up @@ -74,14 +81,14 @@ network).

## Services, enabled features and configurations

| Service | configuration | Lock-in coverage? |
| ---------------- | ---------------- | ------------------ |
| Glance | Swift | Must have |
| Swift | (default) | Must have |
| Octavia | (default) | Must have |
| Heat | (default) | Must have |
| frr | dataplane | Must have |
| ovn-bgp-agent | dataplane | Must have |
| Service | configuration | Lock-in coverage? |
| ---------------- | ----------------- | ------------------ |
| Glance | Swift | Must have |
| Swift | (default) | Must have |
| Octavia | (default) | Must have |
| Heat | (default) | Must have |
| frr | dataplane | Must have |
| ovn-bgp-agent | dataplane | Must have |

## Considerations/Constraints

Expand Down
6 changes: 3 additions & 3 deletions examples/dt/bgp/bgp_dt01/control-plane/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -144,16 +144,16 @@ replacements:
name: bgpnet-worker-3
fieldPaths:
- spec.config
# disable OCP workers as gateway nodes
# configure OVN AZs
- source:
kind: ConfigMap
name: service-values
fieldPath: data.ovn.ovnController.external-ids
fieldPath: data.ovn.ovnController.availability-zones
targets:
- select:
kind: OpenStackControlPlane
fieldPaths:
- spec.ovn.template.ovnController.external-ids
- spec.ovn.template.ovnController.external-ids.availability-zones
options:
create: true
# configure neutron customServiceConfig
Expand Down
14 changes: 13 additions & 1 deletion examples/dt/bgp/bgp_dt01/control-plane/nncp/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,19 @@ data:
}
}
octavia:
dnsDomain: octavia.openstack.lab
dnsDomain: octavia.example.com
subnets:
- allocationRanges:
- end: 172.23.0.250
# we need some extra offset to avoid overlapping with octavia
# controlplane IPs
start: 172.23.0.115
cidr: 172.23.0.0/24
name: subnet1
vlan: 23
routes:
- destination: 172.24.0.0/16
nexthop: 172.23.0.150
mtu: 1500
vlan: 23
base_iface: enp7s0
Expand Down
12 changes: 10 additions & 2 deletions examples/dt/bgp/bgp_dt01/control-plane/service-values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,11 @@ data:
enabled: true
amphoraImageContainerImage: quay.io/gthiemonge/octavia-amphora-image
apacheContainerImage: registry.redhat.io/ubi9/httpd-24:latest
lbMgmtNetwork:
availabilityZones:
- zone-1
createDefaultLbMgmtNetwork: true
manageLbMgmtNetworks: true
octaviaAPI:
networkAttachments:
- internalapi
Expand Down Expand Up @@ -60,12 +65,15 @@ data:
nicMappings:
datacentre: ocpbr
octavia: octbr
external-ids:
enable-chassis-as-gateway: false
availability-zones:
- zone-1
neutron:
customServiceConfig: |
[DEFAULT]
vlan_transparent = true
debug = true
default_availability_zones = zone-2
[ovs]
igmp_snooping_enable = true
[ovn]
ovn_emit_need_to_frag = true
24 changes: 23 additions & 1 deletion examples/dt/bgp/bgp_dt01/edpm/computes/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ data:
edpm_frr_bgp_uplinks:
- nic3
- nic4
edpm_ovn_bridge_mappings:
- "datacentre:br-ex"
- "octavia:br-octavia"
timesync_ntp_servers:
- hostname: pool.ntp.org
# conntrack is necessary for some tobiko tests
Expand Down Expand Up @@ -64,7 +67,7 @@ data:
# force the MAC address of the bridge to this interface
primary: true
{% for network in nodeset_networks %}
{% if not network.lower().startswith('bgp') %}
{% if not network.lower().startswith('bgp') and network.lower() != 'octavia' %}
- type: vlan
mtu: {{ lookup('vars', networks_lower[network] ~ '_mtu') }}
vlan_id: {{ lookup('vars', networks_lower[network] ~ '_vlan_id') }}
Expand All @@ -78,6 +81,25 @@ data:
routes: {{ lookup('vars', networks_lower[network] ~ '_host_routes') }}
{% endif %}
{% endfor %}
- type: ovs_bridge
name: br-octavia
use_dhcp: false
# dns_servers: {{ ctlplane_dns_nameservers }}
# domain: {{ dns_search_domains }}
addresses: []
routes: []
members:
- type: vlan
mtu: {{ lookup('vars', 'octavia_mtu') }}
vlan_id: {{ lookup('vars', 'octavia_vlan_id') }}
addresses:
- ip_netmask: >-
{{
lookup('vars', 'octavia_ip')
}}/{{
lookup('vars', 'octavia_cidr')
}}
routes: {{ lookup('vars', 'octavia_host_routes') }}
- type: interface
name: nic3
use_dhcp: false
Expand Down
26 changes: 25 additions & 1 deletion examples/dt/bgp/bgp_dt01/edpm/networkers/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,18 @@ data:
ansiblePort: 22
ansibleVars:
edpm_ovn_encap_ip: "{{ lookup('vars', 'bgpmainnet_ip') }}"
edpm_ovn_availability_zones:
- zone-2
edpm_ovn_bgp_agent_expose_tenant_networks: false
edpm_frr_bgp_ipv4_src_network: bgpmainnet
edpm_frr_bgp_ipv6_src_network: bgpmainnetv6
edpm_frr_bgp_neighbor_password: f00barZ
edpm_frr_bgp_uplinks:
- nic3
- nic4
edpm_ovn_bridge_mappings:
- "datacentre:br-ex"
- "octavia:br-octavia"
timesync_ntp_servers:
- hostname: pool.ntp.org
# conntrack is necessary for some tobiko tests
Expand Down Expand Up @@ -64,7 +69,7 @@ data:
# force the MAC address of the bridge to this interface
primary: true
{% for network in nodeset_networks %}
{% if not network.lower().startswith('bgp') %}
{% if not network.lower().startswith('bgp') and network.lower() != 'octavia' %}
- type: vlan
mtu: {{ lookup('vars', networks_lower[network] ~ '_mtu') }}
vlan_id: {{ lookup('vars', networks_lower[network] ~ '_vlan_id') }}
Expand All @@ -78,6 +83,25 @@ data:
routes: {{ lookup('vars', networks_lower[network] ~ '_host_routes') }}
{% endif %}
{% endfor %}
- type: ovs_bridge
name: br-octavia
use_dhcp: false
# dns_servers: {{ ctlplane_dns_nameservers }}
# domain: {{ dns_search_domains }}
addresses: []
routes: []
members:
- type: vlan
mtu: {{ lookup('vars', 'octavia_mtu') }}
vlan_id: {{ lookup('vars', 'octavia_vlan_id') }}
addresses:
- ip_netmask: >-
{{
lookup('vars', 'octavia_ip')
}}/{{
lookup('vars', 'octavia_cidr')
}}
routes: {{ lookup('vars', 'octavia_host_routes') }}
- type: interface
name: nic3
use_dhcp: false
Expand Down
14 changes: 13 additions & 1 deletion examples/dt/bgp/control-plane/nncp/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,19 @@ data:
}
}
octavia:
dnsDomain: octavia.openstack.lab
dnsDomain: octavia.example.com
subnets:
- allocationRanges:
- end: 172.23.0.250
# we need some extra offset to avoid overlapping with octavia
# controlplane IPs
start: 172.23.0.115
cidr: 172.23.0.0/24
name: subnet1
vlan: 23
routes:
- destination: 172.24.0.0/16
nexthop: 172.23.0.150
mtu: 1500
vlan: 23
base_iface: enp8s0
Expand Down
3 changes: 3 additions & 0 deletions examples/dt/bgp/control-plane/service-values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ data:
enabled: true
amphoraImageContainerImage: quay.io/gthiemonge/octavia-amphora-image
apacheContainerImage: registry.redhat.io/ubi9/httpd-24:latest
lbMgmtNetwork:
createDefaultLbMgmtNetwork: true
manageLbMgmtNetworks: true
octaviaAPI:
networkAttachments:
- internalapi
Expand Down
7 changes: 5 additions & 2 deletions examples/dt/uni01alpha/control-plane/service-values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,11 @@ data:
enabled: true
amphoraImageContainerImage: quay.io/gthiemonge/octavia-amphora-image
apacheContainerImage: registry.redhat.io/ubi9/httpd-24:latest
availabilityZones:
- zone-1
lbMgmtNetwork:
availabilityZones:
eduolivares marked this conversation as resolved.
Show resolved Hide resolved
- zone-1
createDefaultLbMgmtNetwork: true
manageLbMgmtNetworks: true
octaviaAPI:
networkAttachments:
- internalapi
Expand Down