5.2. Migration Toolkit for Containers 1.8.0 へのアップグレード

Migration Toolkit for Containers を 1.8.0 にアップグレードするには、次の手順を実行します。

手順

  1. 次のいずれかの方法で、アップグレードに使用するサブスクリプション名と現在のチャネルを確認します。

    • 次のコマンドを実行して、サブスクリプション名とチャネルを確認します。

      $ oc -n openshift-migration get sub

      出力例

      NAME                                                                         PACKAGE                SOURCE                 CHANNEL
      mtc-operator                                                                 mtc-operator           mtc-operator-catalog   release-v1.7
      redhat-oadp-operator-stable-1.0-mtc-operator-catalog-openshift-marketplace   redhat-oadp-operator   mtc-operator-catalog   stable-1.0

    • または、次のコマンドを実行して、サブスクリプション名とチャネルを JSON で返します。

      $ oc -n openshift-migration get sub -o json | jq -r '.items[] | { name: .metadata.name, package: .spec.name, channel: .spec.channel }'

      出力例

      {
        "name": "mtc-operator",
        "package": "mtc-operator",
        "channel": "release-v1.7"
      }
      {
        "name": "redhat-oadp-operator-stable-1.0-mtc-operator-catalog-openshift-marketplace",
        "package": "redhat-oadp-operator",
        "channel": "stable-1.0"
      }

  2. サブスクリプションごとに次のコマンドを実行して、MTC 1.7 チャネルから MTC 1.8 チャネルに移動するようにパッチを適用します。

    $ oc -n openshift-migration patch subscription mtc-operator --type merge --patch '{"spec": {"channel": "release-v1.8"}}'

    出力例

    subscription.operators.coreos.com/mtc-operator patched

5.2.1. Migration Toolkit for Containers 1.8.0 用の OADP 1.0 を 1.2 にアップグレードする

Migration Toolkit for Containers 1.8.0 用の OADP 1.0 を 1.2 にアップグレードするには、次の手順を実行します。

手順

  • サブスクリプションごとに次のコマンドを実行し、OADP Operator に OADP 1.0 から OADP 1.2 へのパッチを適用します。

    $ oc -n openshift-migration patch subscription redhat-oadp-operator-stable-1.0-mtc-operator-catalog-openshift-marketplace --type merge --patch '{"spec": {"channel":"stable-1.2"}}'
    注記

    MTC と OADP のインストールにそれぞれ使用する、ユーザー固有の戻り値である NAME 値を示すセクション。

    出力例

    subscription.operators.coreos.com/redhat-oadp-operator-stable-1.0-mtc-operator-catalog-openshift-marketplace patched

    注記

    戻り値は、この例で使用されている redhat-oadp-operator-stable-1.0-mtc-operator-catalog-openshift-marketplace に似た値になります。

    • installPlanApproval パラメーターが Automatic に設定されている場合、Operator Lifecycle Manager (OLM) はアップグレードプロセスを開始します。
    • installPlanApproval パラメーターが Manual に設定されている場合、OLM がアップグレードを開始する前に、各 installPlan を承認する必要があります。

検証

  1. 次のコマンドを実行して、OLM が OADP と MTC のアップグレードを完了したことを確認します。

    $ oc -n openshift-migration get subscriptions.operators.coreos.com mtc-operator -o json | jq '.status | (."state"=="AtLatestKnown")'
  2. true の値が返された場合は、次のコマンドを実行して、各サブスクリプションに使用されるチャネルを確認します。

    $ oc -n openshift-migration get sub -o json | jq -r '.items[] | {name: .metadata.name, channel: .spec.channel }'

    出力例

    {
      "name": "mtc-operator",
      "channel": "release-v1.8"
    }
    {
      "name": "redhat-oadp-operator-stable-1.0-mtc-operator-catalog-openshift-marketplace",
      "channel": "stable-1.2"
    }

    Confirm that the `mtc-operator.v1.8.0` and `oadp-operator.v1.2.x` packages are installed by running the following command:
    $ oc -n openshift-migration get csv

    出力例

    NAME                     DISPLAY                                     VERSION   REPLACES                 PHASE
    mtc-operator.v1.8.0      Migration Toolkit for Containers Operator   1.8.0     mtc-operator.v1.7.13     Succeeded
    oadp-operator.v1.2.2     OADP Operator                               1.2.2     oadp-operator.v1.0.13    Succeeded