Commit 27794a5
Fix automated database restore pod name and add wait for pods
Fix two critical issues in automated database restore:
1. Wrong pod name construction:
- Before: Used backup name (openstack) → openstack-restore-openstack
- After: Use restore CR name (openstackrestore) → openstack-restore-openstackrestore
- GaleraRestore CR naming: <backupName>restore
2. Missing wait for pods to be ready:
- GaleraRestore CRs were created but pods not ready yet
- Added wait task that:
- Waits up to 5 minutes for pod to be created
- Waits for pod Ready condition (timeout 5 minutes)
- Ensures pods are running before attempting restore
Changes:
- Add BACKUP_NAME and RESTORE_NAME variables for clarity
- Construct pod name using RESTORE_NAME (not BACKUP_NAME)
- Add wait task after creating GaleraRestore CRs
- Wait for each pod individually before proceeding to restore
Example:
Backup name: "openstack"
Restore CR name: "openstackrestore"
Pod name: "openstack-restore-openstackrestore"
This fixes the "Restore pod not found" error in automated mode.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>1 parent 4eb8a76 commit 27794a5
1 file changed
Lines changed: 38 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1032 | 1032 | | |
1033 | 1033 | | |
1034 | 1034 | | |
| 1035 | + | |
| 1036 | + | |
| 1037 | + | |
| 1038 | + | |
| 1039 | + | |
| 1040 | + | |
| 1041 | + | |
| 1042 | + | |
| 1043 | + | |
| 1044 | + | |
| 1045 | + | |
| 1046 | + | |
| 1047 | + | |
| 1048 | + | |
| 1049 | + | |
| 1050 | + | |
| 1051 | + | |
| 1052 | + | |
| 1053 | + | |
| 1054 | + | |
| 1055 | + | |
| 1056 | + | |
| 1057 | + | |
| 1058 | + | |
| 1059 | + | |
| 1060 | + | |
| 1061 | + | |
| 1062 | + | |
| 1063 | + | |
| 1064 | + | |
| 1065 | + | |
| 1066 | + | |
1035 | 1067 | | |
1036 | 1068 | | |
1037 | 1069 | | |
| |||
1086 | 1118 | | |
1087 | 1119 | | |
1088 | 1120 | | |
1089 | | - | |
| 1121 | + | |
| 1122 | + | |
1090 | 1123 | | |
1091 | 1124 | | |
1092 | | - | |
| 1125 | + | |
| 1126 | + | |
1093 | 1127 | | |
1094 | 1128 | | |
1095 | | - | |
| 1129 | + | |
1096 | 1130 | | |
1097 | 1131 | | |
1098 | 1132 | | |
| |||
1148 | 1182 | | |
1149 | 1183 | | |
1150 | 1184 | | |
1151 | | - | |
| 1185 | + | |
1152 | 1186 | | |
1153 | 1187 | | |
1154 | 1188 | | |
| |||
0 commit comments