Commit b5f3421
Add ownerReference removal to all OADP restore operations
Use OADP resourceModifiers to strip ownerReferences from ALL resources
during restore. This prevents orphaned resources caused by UID mismatches
between backed-up ownerReferences (old UIDs) and restored owners (new UIDs).
The Problem:
- Every restored resource gets a NEW UID (cluster-unique)
- Backed-up ownerReferences contain OLD UIDs from original cluster
- Example: PVC restored with ownerReference to old GlanceAPI UID
- GlanceAPI NOT restored (operator-managed)
- Operator creates NEW GlanceAPI with NEW UID
- PVC is orphaned (UID mismatch)
- Risk: Operator might delete/recreate PVC → DATA LOSS
The Solution:
- Use resourceModifiers with `conditions: {}` to match ALL resources
- Strip ownerReferences during restore
- Operators adopt resources during reconciliation
- Operators set correct ownerReferences with new UIDs
Implementation:
- Applied to ALL restore orders (00, 10, 20, 30, 40, 60) for consistency
- Simple pattern: `conditions: {}` matches all resource types
- No need to enumerate specific groupResource values
- Future-proof for any new resource types
Updated:
- Added "OwnerReference Handling" section explaining the problem/solution
- Updated all example Restore CRs to use resourceModifiers
- Updated Phase 3 manual restore examples (all orders)
- Added note to Key Points section
- Consistent pattern everywhere: `conditions: {}` for simplicity
Benefits:
- No orphaned resources
- Operators can adopt and manage resources correctly
- Prevents data loss (PVCs won't be recreated)
- Clean ownership chain after restore
- Simple, consistent approach
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>1 parent 17758a6 commit b5f3421
1 file changed
Lines changed: 77 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
491 | 491 | | |
492 | 492 | | |
493 | 493 | | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
494 | 526 | | |
495 | 527 | | |
496 | 528 | | |
| |||
507 | 539 | | |
508 | 540 | | |
509 | 541 | | |
| 542 | + | |
| 543 | + | |
| 544 | + | |
| 545 | + | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
510 | 549 | | |
511 | 550 | | |
512 | 551 | | |
| |||
521 | 560 | | |
522 | 561 | | |
523 | 562 | | |
| 563 | + | |
| 564 | + | |
| 565 | + | |
| 566 | + | |
| 567 | + | |
| 568 | + | |
524 | 569 | | |
525 | 570 | | |
| 571 | + | |
526 | 572 | | |
527 | 573 | | |
528 | 574 | | |
529 | 575 | | |
530 | 576 | | |
| 577 | + | |
531 | 578 | | |
532 | 579 | | |
533 | 580 | | |
| |||
1105 | 1152 | | |
1106 | 1153 | | |
1107 | 1154 | | |
| 1155 | + | |
| 1156 | + | |
| 1157 | + | |
| 1158 | + | |
| 1159 | + | |
| 1160 | + | |
1108 | 1161 | | |
1109 | 1162 | | |
1110 | 1163 | | |
| |||
1125 | 1178 | | |
1126 | 1179 | | |
1127 | 1180 | | |
| 1181 | + | |
| 1182 | + | |
| 1183 | + | |
| 1184 | + | |
| 1185 | + | |
| 1186 | + | |
1128 | 1187 | | |
1129 | 1188 | | |
1130 | 1189 | | |
| |||
1165 | 1224 | | |
1166 | 1225 | | |
1167 | 1226 | | |
1168 | | - | |
1169 | | - | |
1170 | 1227 | | |
| 1228 | + | |
| 1229 | + | |
| 1230 | + | |
| 1231 | + | |
| 1232 | + | |
| 1233 | + | |
1171 | 1234 | | |
1172 | 1235 | | |
1173 | 1236 | | |
| |||
1198 | 1261 | | |
1199 | 1262 | | |
1200 | 1263 | | |
| 1264 | + | |
| 1265 | + | |
| 1266 | + | |
| 1267 | + | |
| 1268 | + | |
| 1269 | + | |
1201 | 1270 | | |
1202 | 1271 | | |
1203 | 1272 | | |
| |||
1245 | 1314 | | |
1246 | 1315 | | |
1247 | 1316 | | |
| 1317 | + | |
| 1318 | + | |
| 1319 | + | |
| 1320 | + | |
| 1321 | + | |
| 1322 | + | |
1248 | 1323 | | |
1249 | 1324 | | |
1250 | 1325 | | |
| |||
0 commit comments