10.4. 常见问题和关注

本节介绍在迁移过程中可能导致问题的常见问题。

10.4.1. 直接卷迁移未完成

如果直接卷迁移未完成,则目标集群可能没有与源集群相同的 node-selector 注解。

MTC 在迁移命名空间时会保留所有注解,以保持安全性上下文约束和调度要求。在直接卷迁移过程中,MTC 在从源集群迁移的命名空间中在目标集群上创建 Rsync 传输 pod。如果目标集群命名空间没有与源集群命名空间相同的注解,则无法调度 Rsync 传输 pod。Rsync pod 处于 Pending 状态。

您可以执行以下步骤识别并解决这个问题。

流程

  1. 检查 MigMigration CR 的状态:

    $ oc describe migmigration <pod> -n openshift-migration

    输出包括以下状态消息:

    输出示例

    Some or all transfer pods are not running for more than 10 mins on destination cluster

  2. 在源集群中,获取迁移的命名空间的详情:

    $ oc get namespace <namespace> -o yaml 1
    1
    指定迁移的命名空间。
  3. 在目标集群中,编辑迁移的命名空间:

    $ oc edit namespace <namespace>
  4. 将缺少的 openshift.io/node-selector 注解添加到迁移的命名空间中,如下例所示:

    apiVersion: v1
    kind: Namespace
    metadata:
      annotations:
        openshift.io/node-selector: "region=east"
    ...
  5. 再次运行迁移计划。