Skip to content

Commit 3693b3e

Browse files
Merge pull request #1098 from eduolivares/bgp-xl-adoption
Add support for bgp-l3-xl-adoption
2 parents 12079b2 + 50d79e3 commit 3693b3e

23 files changed

Lines changed: 2073 additions & 62 deletions

docs_user/modules/proc_adopting-compute-services-to-the-data-plane.adoc

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -637,8 +637,24 @@ done
637637
----
638638
+
639639
[NOTE]
640+
====
640641
Ensure that you use the same list of services from the original `OpenStackDataPlaneNodeSet` CR, except for the `ceph-client` and `ceph-hci-pre` services.
641642
643+
For environments that are enabled with border gateway protocol (BGP), you must add the following services to the list in the order shown:
644+
645+
* After `configure-network` and before `validate-network`: Add `frr` service for FRRouting BGP support
646+
* After `neutron-metadata` and before `libvirt`: Add `ovn-bgp-agent` service for OVN BGP agent
647+
648+
You must also configure the following additional Ansible variables in the `nodeTemplate.ansible.ansibleVars` section:
649+
650+
* `edpm_frr_image`: The FRRouting container image
651+
* `edpm_ovn_bgp_agent_image`: The OVN BGP agent container image
652+
* `edpm_frr_bgp_ipv4_src_network`: The network name for BGP IPv4 source (for example, `bgpmainnet`)
653+
* `edpm_frr_bgp_ipv6_src_network`: The network name for BGP IPv6 source (for example, `bgpmainnetv6`)
654+
* `edpm_frr_bgp_neighbor_password`: The BGP neighbor password
655+
* `edpm_ovn_encap_ip`: Set to the BGP main network IP (for example, `{{ lookup("vars", "bgpmainnet_ip") }}`)
656+
====
657+
642658
. Optional: Enable `neutron-sriov-nic-agent` in the `OpenStackDataPlaneNodeSet` CR:
643659
+
644660
----

docs_user/modules/proc_adopting-networker-services-to-the-data-plane.adoc

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -258,6 +258,23 @@ EOF
258258
* `spec.tlsEnabled` specifies whether TLS Everywhere is enabled. If TLS is enabled, change `spec:tlsEnabled` to `true`.
259259
* `edpm_ovn_bridge_mappings: <bridge_mappings>` specifies the bridge mapping values that you used in your {rhos_prev_long} {rhos_prev_ver} deployment.
260260
* `edpm_enable_chassis_gw` specifies whether to run `ovn-controller` in gateway mode.
261+
+
262+
[NOTE]
263+
====
264+
For environments that are enabled with border gateway protocol (BGP), you must add the following services to the `services` list in the order shown:
265+
266+
* After `configure-network` and before `validate-network`: Add `frr` service for FRRouting BGP support
267+
* After `ovn` and `neutron-metadata` services: Add `ovn-bgp-agent` service
268+
269+
You must also configure the following additional Ansible variables in the `nodeTemplate.ansible.ansibleVars` section:
270+
271+
* `edpm_frr_image`: The FRRouting container image
272+
* `edpm_ovn_bgp_agent_image`: The OVN BGP agent container image
273+
* `edpm_frr_bgp_ipv4_src_network`: The network name for BGP IPv4 source (for example, `bgpmainnet`)
274+
* `edpm_frr_bgp_ipv6_src_network`: The network name for BGP IPv6 source (for example, `bgpmainnetv6`)
275+
* `edpm_frr_bgp_neighbor_password`: The BGP neighbor password
276+
* `edpm_ovn_encap_ip`: Set to the BGP main network IP (for example, `{{ lookup("vars", "bgpmainnet_ip") }}`)
277+
====
261278

262279
. Ensure that you use the same `ovn-controller` settings in the `OpenStackDataPlaneNodeSet` CR that you used in the Networker nodes before adoption. This configuration is stored in the `external_ids` column in the `Open_vSwitch` table in the Open vSwitch database:
263280
+

docs_user/modules/proc_migrating-databases-to-mariadb-instances.adoc

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -227,8 +227,7 @@ test -z "$PULL_OPENSTACK_CONFIGURATION_MYSQLCHECK_NOK" || [ "x$PULL_OPENSTACK_C
227227
+
228228
----
229229
for CELL in $(echo "super $RENAMED_CELLS"); do
230-
oc run mariadb-client --image $MARIADB_IMAGE -i --rm --restart=Never -- \
231-
mysql -rsh "${PODIFIED_MARIADB_IP[$CELL]}" -uroot -p"${PODIFIED_DB_ROOT_PASSWORD[$CELL]}" -e 'SHOW databases;'
230+
oc rsh mariadb-copy-data mysql -rsh "${PODIFIED_MARIADB_IP[$CELL]}" -uroot -p"${PODIFIED_DB_ROOT_PASSWORD[$CELL]}" -e 'SHOW databases;'
232231
done
233232
----
234233
+

docs_user/modules/proc_retrieving-topology-specific-service-configuration.adoc

Lines changed: 75 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,23 @@ endif::[]
9393
ifeval::["{build_variant}" != "ospdo"]
9494
$ MARIADB_CLIENT_ANNOTATIONS='--annotations=k8s.v1.cni.cncf.io/networks=internalapi'
9595
$ MARIADB_RUN_OVERRIDES="$MARIADB_CLIENT_ANNOTATIONS"
96+
----
97+
+
98+
[NOTE]
99+
====
100+
For environments that are enabled with border gateway protocol (BGP), the network annotation must include a default route to enable proper routing. Use the following instead:
101+
102+
----
103+
$ MARIADB_CLIENT_ANNOTATIONS='--annotations=k8s.v1.cni.cncf.io/networks=[{"name":"internalapi","namespace":"openstack","default-route":["<172.17.0.1>"]}]'
104+
$ MARIADB_RUN_OVERRIDES="$MARIADB_CLIENT_ANNOTATIONS"
105+
----
106+
where:
107+
108+
<172.17.0.1>::
109+
Replace with the gateway IP address of your `internalapi` network.
110+
====
111+
+
112+
----
96113
97114
ifeval::["{build}" != "downstream"]
98115
$ CONTROLLER1_SSH="ssh -i ~/install_yamls/out/edpm/ansibleee-ssh-key-id_rsa root@192.168.122.100"
@@ -136,13 +153,52 @@ The source cloud always uses the same password for cells databases. For that rea
136153

137154
.Procedure
138155

156+
. If your source {OpenStackShort} environment uses border gateway protocol (BGP) for Layer 3 networking, create a `BGPConfiguration` custom resource to enable BGP routing:
157+
+
158+
----
159+
$ cat << EOF > bgp.yaml
160+
apiVersion: network.openstack.org/v1beta1
161+
kind: BGPConfiguration
162+
metadata:
163+
name: bgpconfiguration
164+
namespace: openstack
165+
spec: {}
166+
EOF
167+
168+
$ oc apply -f bgp.yaml
169+
----
170+
+
171+
The `BGPConfiguration` resource enables BGP route advertisement between the {rhocp_long} cluster and the source cloud, which is necessary for the `mariadb-client` pod to reach the source MariaDB cluster.
172+
173+
. Create a persistent `mariadb-client` pod for database operations:
174+
+
175+
----
176+
$ oc delete pod mariadb-client || true
177+
$ oc run mariadb-client ${MARIADB_RUN_OVERRIDES} -q --image ${MARIADB_IMAGE} --restart=Never -- /usr/bin/sleep infinity
178+
----
179+
+
180+
This creates a long-running pod that is used for all subsequent database operations, avoiding the need to create temporary pods for each command.
181+
182+
. Wait for the `mariadb-client` pod to be able to reach the source MariaDB:
183+
+
184+
----
185+
$ oc rsh mariadb-client mysql -rsh "${SOURCE_MARIADB_IP[default]}" -uroot -p"${SOURCE_DB_ROOT_PASSWORD[default]}" -e 'select 1;'
186+
----
187+
+
188+
[NOTE]
189+
====
190+
For BGP-enabled environments, this command might take a few moments to succeed while BGP routes are advertised and propagated through the network. The `mariadb-client` pod needs to receive the route to the source MariaDB IP address through BGP before it can establish a connection. If the command fails, wait a few seconds and retry. The connection should succeed once the BGP route advertisement is complete.
191+
192+
For standard (non-BGP) deployments, this command should succeed immediately.
193+
====
194+
139195
. Export the shell variables for the following outputs and test the connection to the {OpenStackShort} database:
140196
+
141197
----
142198
$ unset PULL_OPENSTACK_CONFIGURATION_DATABASES
143199
$ declare -xA PULL_OPENSTACK_CONFIGURATION_DATABASES
144200
$ for CELL in $(echo $CELLS); do
145-
> PULL_OPENSTACK_CONFIGURATION_DATABASES[$CELL]=$(oc run mariadb-client-1-$CELL ${MARIADB_RUN_OVERRIDES} -q --image ${MARIADB_IMAGE} -i --rm --restart=Never -- \
201+
> PULL_OPENSTACK_CONFIGURATION_DATABASES[$CELL]=$(oc rsh mariadb-client \
146202
> mysql -rsh "${SOURCE_MARIADB_IP[$CELL]}" -uroot -p"${SOURCE_DB_ROOT_PASSWORD[$CELL]}" -e 'SHOW databases;')
147203
> done
148204
----
@@ -161,16 +217,16 @@ endif::[]
161217
$ unset PULL_OPENSTACK_CONFIGURATION_MYSQLCHECK_NOK
162218
$ declare -xA PULL_OPENSTACK_CONFIGURATION_MYSQLCHECK_NOK
163219
$ run_mysqlcheck() {
164-
> PULL_OPENSTACK_CONFIGURATION_MYSQLCHECK_NOK=$(oc run mariadb-client-2-$1 ${MARIADB_RUN_OVERRIDES} -q --image ${MARIADB_IMAGE} -i --rm --restart=Never -- \
220+
> PULL_OPENSTACK_CONFIGURATION_MYSQLCHECK_NOK=$(oc rsh mariadb-client \
165221
> mysqlcheck --all-databases -h ${SOURCE_MARIADB_IP[$CELL]} -u root -p"${SOURCE_DB_ROOT_PASSWORD[$CELL]}" | grep -v OK)
166222
> }
167223
$ for CELL in $(echo $CELLS); do
168224
> run_mysqlcheck $CELL
169225
> done
170226
$ if [ "$PULL_OPENSTACK_CONFIGURATION_MYSQLCHECK_NOK" != "" ]; then
171227
> for CELL in $(echo $CELLS); do
172-
> MYSQL_UPGRADE=$(oc run mariadb-client-3 ${MARIADB_RUN_OVERRIDES} -q --image ${MARIADB_IMAGE} -i --rm --restart=Never -- \
173-
> mysql_upgrade -v -h ${SOURCE_MARIADB_IP[$CELL]} -u root -p"${SOURCE_DB_ROOT_PASSWORD[$CELL]}")
228+
> MYSQL_UPGRADE=$(oc rsh mariadb-client \
229+
> mysql_upgrade --skip-version-check -v -h ${SOURCE_MARIADB_IP[$CELL]} -u root -p"${SOURCE_DB_ROOT_PASSWORD[$CELL]}")
174230
> # rerun mysqlcheck to check if problem is resolved
175231
> run_mysqlcheck
176232
> done
@@ -180,8 +236,8 @@ $ if [ "$PULL_OPENSTACK_CONFIGURATION_MYSQLCHECK_NOK" != "" ]; then
180236
. Get the {compute_service_first_ref} cell mappings:
181237
+
182238
----
183-
export PULL_OPENSTACK_CONFIGURATION_NOVADB_MAPPED_CELLS=$(oc run mariadb-client-1 ${MARIADB_RUN_OVERRIDES} -q --image ${MARIADB_IMAGE} -i --rm --restart=Never -- \
184-
mysql -rsh "${SOURCE_MARIADB_IP['default']}" -uroot -p"${SOURCE_DB_ROOT_PASSWORD['default']}" nova_api -e \
239+
export PULL_OPENSTACK_CONFIGURATION_NOVADB_MAPPED_CELLS=$(oc rsh mariadb-client \
240+
mysql -rsh "${SOURCE_MARIADB_IP[default]}" -uroot -p"${SOURCE_DB_ROOT_PASSWORD[default]}" nova_api -e \
185241
'select uuid,name,transport_url,database_connection,disabled from cell_mappings;')
186242
----
187243

@@ -191,7 +247,7 @@ export PULL_OPENSTACK_CONFIGURATION_NOVADB_MAPPED_CELLS=$(oc run mariadb-client-
191247
$ unset PULL_OPENSTACK_CONFIGURATION_NOVA_COMPUTE_HOSTNAMES
192248
$ declare -xA PULL_OPENSTACK_CONFIGURATION_NOVA_COMPUTE_HOSTNAMES
193249
$ for CELL in $(echo $CELLS); do
194-
> PULL_OPENSTACK_CONFIGURATION_NOVA_COMPUTE_HOSTNAMES[$CELL]=$(oc run mariadb-client-4-$CELL ${MARIADB_RUN_OVERRIDES} -q --image ${MARIADB_IMAGE} -i --rm --restart=Never -- \
250+
> PULL_OPENSTACK_CONFIGURATION_NOVA_COMPUTE_HOSTNAMES[$CELL]=$(oc rsh mariadb-client \
195251
> mysql -rsh "${SOURCE_MARIADB_IP[$CELL]}" -uroot -p"${SOURCE_DB_ROOT_PASSWORD[$CELL]}" -e \
196252
> "select host from nova.services where services.binary='nova-compute' and deleted=0;")
197253
> done
@@ -218,15 +274,15 @@ $ for CELL in $(echo $CELLS); do
218274
> declare -xA PULL_OPENSTACK_CONFIGURATION_DATABASES
219275
> declare -xA PULL_OPENSTACK_CONFIGURATION_MYSQLCHECK_NOK
220276
> declare -xA PULL_OPENSTACK_CONFIGURATION_NOVA_COMPUTE_HOSTNAMES
221-
> PULL_OPENSTACK_CONFIGURATION_DATABASES[$CELL]="$(oc run mariadb-client-5-$CELL ${MARIADB_RUN_OVERRIDES} -q --image ${MARIADB_IMAGE} -i --rm --restart=Never -- \
277+
> PULL_OPENSTACK_CONFIGURATION_DATABASES[$CELL]="$(oc rsh mariadb-client \
222278
> mysql -rsh ${SOURCE_MARIADB_IP[$RCELL]} -uroot -p${SOURCE_DB_ROOT_PASSWORD[$RCELL]} -e 'SHOW databases;')"
223-
> PULL_OPENSTACK_CONFIGURATION_MYSQLCHECK_NOK[$CELL]="$(oc run mariadb-client-6-$CELL ${MARIADB_RUN_OVERRIDES} -q --image ${MARIADB_IMAGE} -i --rm --restart=Never -- \
279+
> PULL_OPENSTACK_CONFIGURATION_MYSQLCHECK_NOK[$CELL]="$(oc rsh mariadb-client \
224280
> mysqlcheck --all-databases -h ${SOURCE_MARIADB_IP[$RCELL]} -u root -p${SOURCE_DB_ROOT_PASSWORD[$RCELL]} | grep -v OK)"
225-
> PULL_OPENSTACK_CONFIGURATION_NOVA_COMPUTE_HOSTNAMES[$CELL]="$(oc run mariadb-client-7-$CELL ${MARIADB_RUN_OVERRIDES} -q --image ${MARIADB_IMAGE} -i --rm --restart=Never -- \
281+
> PULL_OPENSTACK_CONFIGURATION_NOVA_COMPUTE_HOSTNAMES[$CELL]="$(oc rsh mariadb-client \
226282
> mysql -rsh ${SOURCE_MARIADB_IP[$RCELL]} -uroot -p${SOURCE_DB_ROOT_PASSWORD[$RCELL]} -e \
227283
> "select host from nova.services where services.binary='nova-compute' and deleted=0;")"
228284
> if [ "$RCELL" = "default" ]; then
229-
> PULL_OPENSTACK_CONFIGURATION_NOVADB_MAPPED_CELLS="$(oc run mariadb-client-2 ${MARIADB_RUN_OVERRIDES} -q --image ${MARIADB_IMAGE} -i --rm --restart=Never -- \
285+
> PULL_OPENSTACK_CONFIGURATION_NOVADB_MAPPED_CELLS="$(oc rsh mariadb-client \
230286
> mysql -rsh ${SOURCE_MARIADB_IP[$RCELL]} -uroot -p${SOURCE_DB_ROOT_PASSWORD[$RCELL]} nova_api -e \
231287
> 'select uuid,name,transport_url,database_connection,disabled from cell_mappings;')"
232288
> PULL_OPENSTACK_CONFIGURATION_NOVAMANAGE_CELL_MAPPINGS="$($CONTROLLER1_SSH sudo podman exec -it nova_conductor nova-manage cell_v2 list_cells)"
@@ -238,6 +294,14 @@ $ chmod 0600 ~/.source_cloud_exported_variables*
238294
+
239295
* `declare -xA SRIOV_AGENTS` gets the `neutron-sriov-nic-agent` configuration to use for the data plane adoption if `neutron-sriov-nic-agent` agents are running in your {OpenStackShort} deployment.
240296

297+
. Clean up the `mariadb-client` pod:
298+
+
299+
----
300+
$ oc delete pod mariadb-client
301+
----
302+
+
303+
The `mariadb-client` pod is no longer needed after all the data is exported and stored.
304+
241305
.Next steps
242306

243307
This configuration and the exported values are required later, during the data plane adoption post-checks. After the {OpenStackShort} control plane services are shut down, if any of the exported values are lost, re-running the `export` command fails because the control plane services are no longer running on the source cloud, and the data cannot be retrieved. To avoid data loss, preserve the exported values in an environment file before shutting down the control plane services.

0 commit comments

Comments
 (0)