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.8. 使用 MTC 自定义资源进行故障排除
您可以检查以下 MTC 自定义资源(CR)来排除迁移失败的问题:
-
MigCluster -
MigStorage -
MigPlan BackupStorageLocationBackupStorageLocationCR 包含一个migrationcontroller标签,用于标识创建 CR 的 MTC 实例:labels: migrationcontroller: ebe13bee-c803-47d0-a9e9-83f380328b93labels: migrationcontroller: ebe13bee-c803-47d0-a9e9-83f380328b93Copy to Clipboard Copied! Toggle word wrap Toggle overflow VolumeSnapshotLocationVolumeSnapshotLocationCR 包含一个migrationcontroller标签,用于标识创建 CR 的 MTC 实例:labels: migrationcontroller: ebe13bee-c803-47d0-a9e9-83f380328b93labels: migrationcontroller: ebe13bee-c803-47d0-a9e9-83f380328b93Copy to Clipboard Copied! Toggle word wrap Toggle overflow -
MigMigration Backup在目标集群中,MTC 将迁移的持久性卷(PV)的重新声明策略设置为
Retain。BackupCR 包含openshift.io/orig-reclaim-policy注解,用于指示原始重新声明策略。您可以手动恢复迁移 PV 的重新声明策略。-
恢复
流程
列出
openshift-migration命名空间中的MigMigrationCR:oc get migmigration -n openshift-migration
$ oc get migmigration -n openshift-migrationCopy to Clipboard Copied! Toggle word wrap Toggle overflow 输出示例
NAME AGE 88435fe0-c9f8-11e9-85e6-5d593ce65e10 6m42s
NAME AGE 88435fe0-c9f8-11e9-85e6-5d593ce65e10 6m42sCopy to Clipboard Copied! Toggle word wrap Toggle overflow 检查
MigMigrationCR:oc describe migmigration 88435fe0-c9f8-11e9-85e6-5d593ce65e10 -n openshift-migration
$ oc describe migmigration 88435fe0-c9f8-11e9-85e6-5d593ce65e10 -n openshift-migrationCopy to Clipboard Copied! Toggle word wrap Toggle overflow 输出结果类似以下示例。
MigMigration 示例输出
Velero 备份 CR #2 示例输出来描述 PV 数据
Velero 恢复 CR #2 示例输出来描述 Kubernetes 资源