11.3.7. 部分的な移行の失敗のデバッグ
Velero CLI を使用して Restore
カスタムリソース (CR) ログを確認し、部分的な移行の失敗についての警告メッセージをデバッグできます。
部分的な障害は、Velero で移行の失敗を生じさせない問題が発生する際に見られます。たとえば、カスタムリソース定義 (CRD) がない場合や、ソースクラスターおよびターゲットクラスターの CRD バージョン間で不一致がある場合、移行は完了しますが、CR はターゲットクラスターで作成されません。
Velero は問題を部分的な障害としてログに記録し、Backup
CR の残りのオブジェクトを処理します。
手順
MigMigration
CR のステータスを確認します。$ oc get migmigration <migmigration> -o yaml
出力例
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
Velero
describe
コマンドを使用してRestore
CR のステータスを確認します。$ oc -n {namespace} exec deployment/velero -c velero -- ./velero \ restore describe <restore>
出力例
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
Velero
logs
コマンドを使用してRestore
CR ログを確認します。$ oc -n {namespace} exec deployment/velero -c velero -- ./velero \ restore logs <restore>
出力例
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
Restore
CR のログエラーメッセージのthe server could not find the requested resource
は、部分的に失敗した移行の原因を示します。