Skip to content

Commit 75694f2

Browse files
stuggiclaude
andcommitted
Fix Scenario 2 to use staged deployment and add EDPM warnings
Updated Scenario 2 (Different Namespace) to properly use staged deployment and added critical EDPM hostname warnings to both Scenarios 2 and 3. Changes to Scenario 2: - Added staged deployment with infrastructure-only annotation - Added database and PVC restore steps while paused - Added resume deployment step - Renumbered steps to match correct flow - Uses filtered secrets/configmaps like Scenario 1 EDPM warnings added to both scenarios: - CRITICAL: Hostnames MUST NOT change (Nova instance management) - Scenario 2: EDPM deployment required (Since namespace changes DNS) - Scenario 3: EDPM deployment may be required (If endpoints/namespace change) - Added prerequisite about maintaining EDPM hostnames If namespace and endpoint IPs remain the same, EDPM nodes may reconnect without redeployment. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
1 parent b64e16b commit 75694f2

1 file changed

Lines changed: 60 additions & 14 deletions

File tree

docs/dev/backup-restore-ctlplane.md

Lines changed: 60 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1442,13 +1442,16 @@ Data plane nodes use the restored RabbitMQ credentials for immediate connectivit
14421442

14431443
⚠️ **NOTE**: This scenario has not been tested yet. Use with caution and verify each step.
14441444

1445-
**WARNING**: Namespace changes are complex due to DNS endpoints in OpenStack databases. This procedure assumes you're **NOT** restoring database state.
1445+
⚠️ **CRITICAL - EDPM Hostname Requirements**: If you have EDPM nodes (compute/network nodes), **the hostnames MUST NOT change!** Nova-compute registers with a hostname, and all running VM instances are associated with that hostname. Changing hostnames will cause you to lose the ability to manage existing instances.
1446+
1447+
⚠️ **EDPM Deployment Required**: Since this scenario changes the namespace, DNS names change (e.g., `rabbitmq.openstack.svc``rabbitmq.openstack-restored.svc`). You MUST run an EDPM deployment to update node configurations before nodes can reconnect to the control plane.
14461448

14471449
**Prerequisites:**
14481450
- **Operator versions match the backup** (same cluster, so this should already be true)
14491451
- New namespace will be created
14501452
- Operator managing the new namespace
14511453
- Storage classes available
1454+
- **EDPM node hostnames must remain the same** (see warning above)
14521455

14531456
**Steps:**
14541457

@@ -1499,37 +1502,62 @@ for file in *-backup.json; do
14991502
done
15001503
```
15011504

1502-
#### 3. Restore in New Namespace
1505+
#### 3. Restore in New Namespace with Staged Deployment
15031506

1504-
**Follow the correct restore order:**
1507+
**Follow the correct restore order using staged deployment:**
15051508

15061509
```bash
15071510
# 1. Restore NetworkAttachmentDefinitions
15081511
oc apply -f network-attachment-definitions-backup.json -n ${NEW_NAMESPACE}
15091512

1510-
# 2. Restore TLS Issuers
1511-
oc apply -f issuer-backup.json -n ${NEW_NAMESPACE}
1513+
# 2. Restore Secrets (filtered)
1514+
jq '.items |= map(
1515+
select((.metadata.name | startswith("rabbitmq-")) | not) |
1516+
select(.metadata.labels."service-cert" | not) |
1517+
select(
1518+
(.metadata.ownerReferences == null) or
1519+
(.metadata.name | startswith("rootca-")) or
1520+
(.metadata.name | contains("-db-password"))
1521+
)
1522+
)' secrets-all-backup.json | oc apply -f - -n ${NEW_NAMESPACE}
15121523

1513-
# 3. Restore Secrets
1514-
oc apply -f secrets-all-backup.json -n ${NEW_NAMESPACE}
1524+
# 3. Restore ConfigMaps (user-provided only)
1525+
jq '.items |= map(select(.metadata.ownerReferences == null))' configmaps-all-backup.json | \
1526+
oc apply -f - -n ${NEW_NAMESPACE}
15151527

1516-
# 4. Restore ConfigMaps
1517-
oc apply -f configmaps-all-backup.json -n ${NEW_NAMESPACE}
1528+
# 4. Restore TLS Issuers
1529+
oc apply -f issuer-backup.json -n ${NEW_NAMESPACE}
15181530

15191531
# 5. Restore MariaDB CRs
15201532
oc apply -f mariadbdatabase-backup.json -n ${NEW_NAMESPACE}
15211533
oc apply -f mariadbaccount-backup.json -n ${NEW_NAMESPACE}
15221534

15231535
# 6. Restore Related CRs
15241536
oc apply -f openstackversion-backup.json -n ${NEW_NAMESPACE} 2>/dev/null || true
1525-
oc apply -f netconfig-backup.json -n ${NEW_NAMESPACE}
15261537
oc apply -f topology-backup.json -n ${NEW_NAMESPACE} 2>/dev/null || true
15271538

1528-
# 7. Restore OpenStackControlPlane CR
1529-
oc apply -f openstackcontrolplane-backup.json -n ${NEW_NAMESPACE}
1539+
# 7. Restore OpenStackControlPlane CR with staged deployment
1540+
jq '.items[0].metadata.annotations["core.openstack.org/deployment-stage"] = "infrastructure-only"' \
1541+
openstackcontrolplane-backup.json > openstackcontrolplane-staged.json
1542+
1543+
oc apply -f openstackcontrolplane-staged.json -n ${NEW_NAMESPACE}
1544+
1545+
# Wait for infrastructure ready
1546+
oc wait --for=condition=OpenStackControlPlaneInfrastructureReady \
1547+
openstackcontrolplane/$(jq -r '.items[0].metadata.name' openstackcontrolplane-backup.json) \
1548+
-n ${NEW_NAMESPACE} --timeout=20m
1549+
```
1550+
1551+
#### 4. Restore Database Contents and PVCs
1552+
1553+
```bash
1554+
# Restore databases (MariaDB, OVN) while services are paused
1555+
# Follow separate database restore procedures
1556+
1557+
# Restore PVCs if applicable (OADP or other method)
15301558
```
15311559

1532-
#### 8. Restore RabbitMQ User Credentials
1560+
#### 5. Restore RabbitMQ User Credentials
15331561

15341562
Follow the RabbitMQUser CRD approach from Scenario 1:
15351563

@@ -1607,7 +1635,20 @@ echo ""
16071635
echo "RabbitMQ user credentials restored successfully using RabbitMQUser CRs!"
16081636
```
16091637

1610-
#### 4. Post-Restore Configuration
1638+
#### 6. Resume Deployment
1639+
1640+
```bash
1641+
# Remove the staged deployment annotation
1642+
CTLPLANE_NAME=$(jq -r '.items[0].metadata.name' openstackcontrolplane-backup.json)
1643+
oc annotate openstackcontrolplane ${CTLPLANE_NAME} -n ${NEW_NAMESPACE} \
1644+
core.openstack.org/deployment-stage-
1645+
1646+
# Wait for control plane ready
1647+
oc wait --for=condition=Ready openstackcontrolplane/${CTLPLANE_NAME} \
1648+
-n ${NEW_NAMESPACE} --timeout=30m
1649+
```
1650+
1651+
#### 7. Post-Restore Configuration
16111652

16121653
**IMPORTANT**: Since you changed namespace, DNS names will change:
16131654
- Old: `keystone.openstack.svc.cluster.local`
@@ -1651,11 +1692,16 @@ Without running EDPM deployment, data plane nodes will continue trying to connec
16511692

16521693
⚠️ **NOTE**: This scenario has not been tested yet. Use with caution and verify each step.
16531694

1695+
⚠️ **CRITICAL - EDPM Hostname Requirements**: If you have EDPM nodes (compute/network nodes), **the hostnames MUST NOT change!** Nova-compute registers with a hostname, and all running VM instances are associated with that hostname. Changing hostnames will cause you to lose the ability to manage existing instances.
1696+
1697+
⚠️ **EDPM Deployment May Be Required**: If the namespace, control plane endpoint IPs, or DNS server endpoint IP change, you MUST run an EDPM deployment to update node configurations before nodes can reconnect to the control plane.
1698+
16541699
**Prerequisites:**
16551700
- Target cluster has **EXACT same operator versions installed** as source cluster
16561701
- Target cluster has required storage classes
16571702
- Network connectivity for external access
16581703
- Compatible OpenShift version
1704+
- **EDPM node hostnames must remain the same** (see warning above)
16591705

16601706
**Steps:**
16611707

0 commit comments

Comments
 (0)