This documentation is for a release that is no longer maintained
See documentation for the latest supported version 3 or the latest supported version 4.12.3.7. Debuggen einer teilweisen fehlgeschlagenen Migration
Sie können eine Warnmeldung über eine teilweise fehlgeschlagene Migration debuggen, indem Sie die Velero-CLI verwenden, um die Protokolle der Custom Resource (CR) restore
zu untersuchen.
Ein Teilfehler tritt auf, wenn bei Velero ein Problem auftritt, das nicht zum Scheitern einer Migration führt. Wenn beispielsweise eine Custom Resource Definition (CRD) fehlt oder eine Diskrepanz zwischen den CRD-Versionen auf dem Quell- und dem Ziel-Cluster besteht, wird die Migration zwar abgeschlossen, aber die CR wird nicht auf dem Ziel-Cluster erstellt.
Velero protokolliert das Problem als Teilfehler und verarbeitet dann die restlichen Objekte in der CR Backup
.
Vorgehensweise
Prüfen Sie den Status einer
MigMigration
-CR:oc get migmigration <migmigration> -o yaml
$ oc get migmigration <migmigration> -o yaml
Copy to Clipboard Copied! Beispielausgabe
status: conditions: - category: Warn durable: true lastTransitionTime: "2021-01-26T20:48:40Z" message: 'Final Restore openshift-migration/ccc7c2d0-6017-11eb-afab-85d0007f5a19-x4lbf: partially failed on destination cluster' status: "True" type: VeleroFinalRestorePartiallyFailed - category: Advisory durable: true lastTransitionTime: "2021-01-26T20:48:42Z" message: The migration has completed with warnings, please look at `Warn` conditions. reason: Completed status: "True" type: SucceededWithWarnings
status: conditions: - category: Warn durable: true lastTransitionTime: "2021-01-26T20:48:40Z" message: 'Final Restore openshift-migration/ccc7c2d0-6017-11eb-afab-85d0007f5a19-x4lbf: partially failed on destination cluster' status: "True" type: VeleroFinalRestorePartiallyFailed - category: Advisory durable: true lastTransitionTime: "2021-01-26T20:48:42Z" message: The migration has completed with warnings, please look at `Warn` conditions. reason: Completed status: "True" type: SucceededWithWarnings
Copy to Clipboard Copied! Überprüfen Sie den Status der CR
Restore
mit dem Velero-Befehldescribe
:$ oc exec $(oc get pods -n openshift-migration -o name | grep velero) -n openshift-migration -- ./velero restore describe <restore>
$ oc exec $(oc get pods -n openshift-migration -o name | grep velero) -n openshift-migration -- ./velero restore describe <restore>
Copy to Clipboard Copied! Beispielausgabe
Phase: PartiallyFailed (run 'velero restore logs ccc7c2d0-6017-11eb-afab-85d0007f5a19-x4lbf' for more information) Errors: Velero: <none> Cluster: <none> Namespaces: migration-example: error restoring example.com/migration-example/migration-example: the server could not find the requested resource
Phase: PartiallyFailed (run 'velero restore logs ccc7c2d0-6017-11eb-afab-85d0007f5a19-x4lbf' for more information) Errors: Velero: <none> Cluster: <none> Namespaces: migration-example: error restoring example.com/migration-example/migration-example: the server could not find the requested resource
Copy to Clipboard Copied! Überprüfen Sie die Protokolle der CR
Restore
mit dem Velero-Befehllogs
:$ oc exec $(oc get pods -n openshift-migration -o name | grep velero) -n openshift-migration -- ./velero restore logs <restore>
$ oc exec $(oc get pods -n openshift-migration -o name | grep velero) -n openshift-migration -- ./velero restore logs <restore>
Copy to Clipboard Copied! Beispielausgabe
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 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
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 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
Copy to Clipboard Copied! Die Protokoll-Fehlermeldung der CR
Restore
,the server could not find the requested resource
, gibt die Ursache für die teilweise fehlgeschlagene Migration an.