|
| 1 | +// Module included in the following assemblies: |
| 2 | +// * migration/migrating_3_4/troubleshooting-3-4.adoc |
| 3 | +// * migration/migrating_4_1_4/troubleshooting-4-1-4.adoc |
| 4 | +// * migration/migrating_4_2_4/troubleshooting-4-2-4.adoc |
| 5 | + |
| 6 | +[id="migration-partial-failure-velero_{context}"] |
| 7 | += Debugging a partial migration failure |
| 8 | + |
| 9 | +You can debug a partial migration failure warning message by using the Velero CLI to examine the `Restore` custom resource (CR) logs. |
| 10 | + |
| 11 | +A partial failure occurs when Velero encounters an issue that does not cause a migration to fail. For example, if a custom resource definition (CRD) is missing or if there is a discrepancy between CRD versions on the source and target clusters, the migration completes but the CR is not created on the target cluster. |
| 12 | + |
| 13 | +Velero logs the issue as a partial failure and then processes the rest of the objects in the `Backup` CR. |
| 14 | + |
| 15 | +.Procedure |
| 16 | + |
| 17 | +. Check the status of a `MigMigration` CR: |
| 18 | ++ |
| 19 | +[source,terminal] |
| 20 | +---- |
| 21 | +$ oc get migmigration <migmigration> -o yaml |
| 22 | +---- |
| 23 | ++ |
| 24 | +.Example output |
| 25 | ++ |
| 26 | +[source,yaml] |
| 27 | +---- |
| 28 | +status: |
| 29 | + conditions: |
| 30 | + - category: Warn |
| 31 | + durable: true |
| 32 | + lastTransitionTime: "2021-01-26T20:48:40Z" |
| 33 | + message: 'Final Restore openshift-migration/ccc7c2d0-6017-11eb-afab-85d0007f5a19-x4lbf: partially failed on destination cluster' |
| 34 | + status: "True" |
| 35 | + type: VeleroFinalRestorePartiallyFailed |
| 36 | + - category: Advisory |
| 37 | + durable: true |
| 38 | + lastTransitionTime: "2021-01-26T20:48:42Z" |
| 39 | + message: The migration has completed with warnings, please look at `Warn` conditions. |
| 40 | + reason: Completed |
| 41 | + status: "True" |
| 42 | + type: SucceededWithWarnings |
| 43 | +---- |
| 44 | + |
| 45 | +. Check the status of the `Restore` CR by using the Velero `describe` command: |
| 46 | ++ |
| 47 | +[source,yaml] |
| 48 | +---- |
| 49 | +$ oc exec $(oc get pods -n openshift-migration -o name | grep velero) -n openshift-migration -- ./velero restore describe <restore> |
| 50 | +---- |
| 51 | ++ |
| 52 | +.Example output |
| 53 | ++ |
| 54 | +[source,yaml] |
| 55 | +---- |
| 56 | +Phase: PartiallyFailed (run 'velero restore logs ccc7c2d0-6017-11eb-afab-85d0007f5a19-x4lbf' for more information) |
| 57 | +
|
| 58 | +Errors: |
| 59 | + Velero: <none> |
| 60 | + Cluster: <none> |
| 61 | + Namespaces: |
| 62 | + migration-example: error restoring example.com/migration-example/migration-example: the server could not find the requested resource |
| 63 | +---- |
| 64 | + |
| 65 | +. Check the `Restore` CR logs by using the Velero `logs` command: |
| 66 | ++ |
| 67 | +[source,yaml] |
| 68 | +---- |
| 69 | +$ oc exec $(oc get pods -n openshift-migration -o name | grep velero) -n openshift-migration -- ./velero restore logs <restore> |
| 70 | +---- |
| 71 | ++ |
| 72 | +.Example output |
| 73 | ++ |
| 74 | +[source,yaml] |
| 75 | +---- |
| 76 | +time="2021-01-26T20:48:37Z" level=info msg="Attempting to restore migration-example: migration-example" logSource="pkg/restore/restore.go:1107" restore=openshift-migration/ccc7c2d0-6017-11eb-afab-85d0007f5a19-x4lbf |
| 77 | +time="2021-01-26T20:48:37Z" level=info msg="error restoring migration-example: the server could not find the requested resource" logSource="pkg/restore/restore.go:1170" restore=openshift-migration/ccc7c2d0-6017-11eb-afab-85d0007f5a19-x4lbf |
| 78 | +---- |
| 79 | ++ |
| 80 | +The `Restore` CR log error message, `the server could not find the requested resource`, indicates the cause of the partially failed migration. |
0 commit comments