@@ -32,6 +32,11 @@ name: Prepare Longhorn V2 Migration
3232 recover-unstarted-v1-benchmark,
3333 recover-bound-v1-benchmark,
3434 prepare-native-v1-seed,
35+ restore-native-v2-seed,
36+ resume-native-v2-seed-restore,
37+ resume-native-v2-reattach,
38+ reclaim-native-v2-seed,
39+ resume-native-v2-reclaim,
3540 inventory-replicas,
3641 inventory-storage-root,
3742 inventory-storage-layout,
@@ -40,10 +45,16 @@ name: Prepare Longhorn V2 Migration
4045 inspect-host-memory,
4146 reboot-host-for-hugepages,
4247 observe-database,
48+ prove-database-v2-archive,
49+ resume-umami-archive-isolation,
50+ resume-umami-archive-data,
4351 register-temporary-v2-storage,
4452 repair-v1-reservation,
4553 reserve-v1-scratch,
4654 reserve-v1-backup-scratch,
55+ prepare-actual-budget-backup-scratch,
56+ retire-actual-budget-backup-scratch,
57+ backup-actual-budget-v1,
4758 retain-v1-source,
4859 retain-provider-source,
4960 ]
@@ -113,7 +124,8 @@ jobs:
113124 - name : Test queued read-only source selection
114125 run : bash scripts/tests/test-longhorn-runtime-inventory-source.sh
115126 - name : Test complete observations and interrupted recovery
116- run : go test -race -count=1 -timeout=5m ./scripts/migrate-longhorn-v2 ./internal/longhornmigration ./internal/longhorninventory ./internal/namespaceinventory
127+ # The native admission and database restore fixtures share this bounded test job.
128+ run : go test -race -count=1 -timeout=7m ./scripts/migrate-longhorn-v2 ./internal/longhornmigration ./internal/longhorninventory ./internal/namespaceinventory
117129
118130 prepare :
119131 name : Run the selected guarded migration step
@@ -143,12 +155,41 @@ jobs:
143155 prepare-native-v1-seed)
144156 [[ -z "${LONGHORN_V2_NODE}" && -z "${LONGHORN_V2_DATABASE}" && "${LONGHORN_V2_CONFIRM}" == prepare-longhorn-native-v1-seed ]]
145157 ;;
158+ restore-native-v2-seed)
159+ [[ -z "${LONGHORN_V2_NODE}" && -z "${LONGHORN_V2_DATABASE}" && "${LONGHORN_V2_CONFIRM}" == restore-longhorn-native-v2-seed ]]
160+ ;;
161+ resume-native-v2-seed-restore)
162+ [[ -z "${LONGHORN_V2_NODE}" && -z "${LONGHORN_V2_DATABASE}" &&
163+ "${LONGHORN_V2_CONFIRM}" =~ ^resume-longhorn-native-v2-seed:[1-9][0-9]{0,18}$ ]]
164+ ;;
165+ resume-native-v2-reattach)
166+ [[ -z "${LONGHORN_V2_NODE}" && -z "${LONGHORN_V2_DATABASE}" &&
167+ "${LONGHORN_V2_CONFIRM}" =~ ^resume-longhorn-native-v2-reattach:[1-9][0-9]{0,18}:[1-9][0-9]{0,18}$ ]]
168+ ;;
169+ reclaim-native-v2-seed)
170+ [[ -z "${LONGHORN_V2_NODE}" && -z "${LONGHORN_V2_DATABASE}" && "${LONGHORN_V2_CONFIRM}" =~ ^reclaim-longhorn-native-v2-seed:[1-9][0-9]{0,18}$ ]]
171+ ;;
172+ resume-native-v2-reclaim)
173+ [[ -z "${LONGHORN_V2_NODE}" && -z "${LONGHORN_V2_DATABASE}" && "${LONGHORN_V2_CONFIRM}" =~ ^resume-longhorn-native-v2-reclaim:[1-9][0-9]{0,18}:[1-9][0-9]{0,18}$ ]]
174+ ;;
146175 inventory-v1-runtime)
147176 [[ -z "${LONGHORN_V2_NODE}" && -z "${LONGHORN_V2_DATABASE}" && "${LONGHORN_V2_CONFIRM}" == inventory-v1-runtime ]]
148177 ;;
149178 observe-database)
150179 [[ -z "${LONGHORN_V2_NODE}" && "${LONGHORN_V2_DATABASE}" =~ ^(coroot-db|umami-db|wedding-db|substrate-db|kagent-db|customer-identity-db|business-site-portal-db|portal-preview-db)$ && "${LONGHORN_V2_CONFIRM}" == "observe-longhorn-v2-database-${LONGHORN_V2_DATABASE}" ]]
151180 ;;
181+ prove-database-v2-archive)
182+ [[ -z "${LONGHORN_V2_NODE}" && "${LONGHORN_V2_DATABASE}" =~ ^(coroot-db|umami-db|wedding-db|customer-identity-db|business-site-portal-db)$ &&
183+ "${LONGHORN_V2_CONFIRM}" == "prove-longhorn-v2-database-archive-${LONGHORN_V2_DATABASE}" ]]
184+ ;;
185+ resume-umami-archive-isolation)
186+ [[ -z "${LONGHORN_V2_NODE}" && "${LONGHORN_V2_DATABASE}" == umami-db &&
187+ "${LONGHORN_V2_CONFIRM}" =~ ^resume-umami-archive-isolation:[1-9][0-9]{0,18}$ ]]
188+ ;;
189+ resume-umami-archive-data)
190+ [[ -z "${LONGHORN_V2_NODE}" && "${LONGHORN_V2_DATABASE}" == umami-db &&
191+ "${LONGHORN_V2_CONFIRM}" =~ ^resume-umami-archive-data:[1-9][0-9]{0,18}:[0-9a-f]{64}$ ]]
192+ ;;
152193 prepare-worker)
153194 [[ "${LONGHORN_V2_NODE}" =~ ^prod-worker-[123]$ && "${LONGHORN_V2_CONFIRM}" == "prepare-longhorn-v2-${LONGHORN_V2_NODE}" ]]
154195 ;;
@@ -176,6 +217,18 @@ jobs:
176217 reserve-v1-backup-scratch)
177218 [[ -z "${LONGHORN_V2_NODE}" && -z "${LONGHORN_V2_DATABASE}" && "${LONGHORN_V2_CONFIRM}" == reserve-longhorn-v1-backup-scratch ]]
178219 ;;
220+ prepare-actual-budget-backup-scratch)
221+ [[ -z "${LONGHORN_V2_NODE}" && -z "${LONGHORN_V2_DATABASE}" &&
222+ "${LONGHORN_V2_CONFIRM}" =~ ^prepare-actual-budget-backup-scratch:[0-9a-f]{64}$ ]]
223+ ;;
224+ retire-actual-budget-backup-scratch)
225+ [[ -z "${LONGHORN_V2_NODE}" && -z "${LONGHORN_V2_DATABASE}" &&
226+ "${LONGHORN_V2_CONFIRM}" =~ ^retire-actual-budget-backup-scratch:[1-9][0-9]{0,18}$ ]]
227+ ;;
228+ backup-actual-budget-v1)
229+ [[ -z "${LONGHORN_V2_NODE}" && -z "${LONGHORN_V2_DATABASE}" &&
230+ "${LONGHORN_V2_CONFIRM}" =~ ^backup-actual-budget-v1:[0-9a-f]{64}$ ]]
231+ ;;
179232 retain-v1-source)
180233 [[ -z "${LONGHORN_V2_NODE}" && "${LONGHORN_V2_CONFIRM}" =~ ^retain-longhorn-v1-source:[a-z0-9][-a-z0-9]*/[a-z0-9][-a-z0-9.]*:[0-9a-f]{64}$ ]]
181234 ;;
@@ -268,7 +321,7 @@ jobs:
268321 HCLOUD_TOKEN : ${{ secrets.HCLOUD_TOKEN }}
269322 run : ./scripts/use-prod-stable-api-endpoint.sh
270323 - name : Run the confirmed migration preparation
271- if : ${{ inputs.operation != 'benchmark-v1' && inputs.operation != 'recover-bound-v1-benchmark' && inputs.operation != 'prepare-native-v1-seed' }}
324+ if : ${{ inputs.operation != 'benchmark-v1' && inputs.operation != 'recover-bound-v1-benchmark' && inputs.operation != 'prepare-native-v1-seed' && inputs.operation != 'reclaim-native-v2-seed' && inputs.operation != 'resume-native-v2-reclaim' }}
272325 env :
273326 GH_TOKEN : ${{ github.token }}
274327 LONGHORN_RUNTIME_INVENTORY_SOURCE : ${{ steps.recovery-source.outputs.sha }}
@@ -285,6 +338,12 @@ jobs:
285338 GH_TOKEN : ${{ github.token }}
286339 HCLOUD_TOKEN : ${{ secrets.HCLOUD_TOKEN }}
287340 run : go run ./scripts/migrate-longhorn-v2
341+ - name : Reclaim the verified disposable V2 restoration
342+ if : ${{ inputs.operation == 'reclaim-native-v2-seed' || inputs.operation == 'resume-native-v2-reclaim' }}
343+ env :
344+ GH_TOKEN : ${{ github.token }}
345+ HCLOUD_TOKEN : ${{ secrets.HCLOUD_TOKEN }}
346+ run : go run ./scripts/migrate-longhorn-v2
288347 - name : Remove runner credentials
289348 if : ${{ always() }}
290349 shell : bash
0 commit comments