Dieser Inhalt ist in der von Ihnen ausgewählten Sprache nicht verfügbar.
Chapter 5. Upgrading the Migration Toolkit for Containers
You can upgrade the Migration Toolkit for Containers (MTC) on OpenShift Container Platform 4.14 by using Operator Lifecycle Manager.
You can upgrade MTC on OpenShift Container Platform 4.5, and earlier versions, by reinstalling the legacy Migration Toolkit for Containers Operator.
If you are upgrading from MTC version 1.3, you must perform an additional procedure to update the
MigPlan
5.1. Upgrading the Migration Toolkit for Containers on OpenShift Container Platform 4.14 Link kopierenLink in die Zwischenablage kopiert!
You can upgrade the Migration Toolkit for Containers (MTC) on OpenShift Container Platform 4.14 by using the Operator Lifecycle Manager.
When upgrading the MTC by using the Operator Lifecycle Manager, you must use a supported migration path.
Migration paths
- Migrating from OpenShift Container Platform 3 to OpenShift Container Platform 4 requires a legacy MTC Operator and MTC 1.7.x.
- Migrating from MTC 1.7.x to MTC 1.8.x is not supported.
You must use MTC 1.7.x to migrate anything with a source of OpenShift Container Platform 4.9 or earlier.
- MTC 1.7.x must be used on both source and destination.
MTC 1.8.x only supports migrations from OpenShift Container Platform 4.10 or later to OpenShift Container Platform 4.10 or later. For migrations only involving cluster versions 4.10 and later, either 1.7.x or 1.8.x may be used. However, it must be the same MTC version on both source & destination.
- Migration from source MTC 1.7.x to destination MTC 1.8.x is unsupported.
- Migration from source MTC 1.8.x to destination MTC 1.7.x is unsupported.
- Migration from source MTC 1.7.x to destination MTC 1.7.x is supported.
- Migration from source MTC 1.8.x to destination MTC 1.8.x is supported
Prerequisites
-
You must be logged in as a user with privileges.
cluster-admin
Procedure
In the OpenShift Container Platform console, navigate to Operators
Installed Operators. Operators that have a pending upgrade display an Upgrade available status.
- Click Migration Toolkit for Containers Operator.
- Click the Subscription tab. Any upgrades requiring approval are displayed next to Upgrade Status. For example, it might display 1 requires approval.
- Click 1 requires approval, then click Preview Install Plan.
- Review the resources that are listed as available for upgrade and click Approve.
-
Navigate back to the Operators
Installed Operators page to monitor the progress of the upgrade. When complete, the status changes to Succeeded and Up to date. -
Click Workloads
Pods to verify that the MTC pods are running.
5.2. Upgrading the Migration Toolkit for Containers to 1.8.0 Link kopierenLink in die Zwischenablage kopiert!
To upgrade the Migration Toolkit for Containers to 1.8.0, complete the following steps.
Procedure
Determine subscription names and current channels to work with for upgrading by using one of the following methods:
Determine the subscription names and channels by running the following command:
$ oc -n openshift-migration get subExample output
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.0Or return the subscription names and channels in JSON by running the following command:
$ oc -n openshift-migration get sub -o json | jq -r '.items[] | { name: .metadata.name, package: .spec.name, channel: .spec.channel }'Example output
{ "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" }
For each subscription, patch to move from the MTC 1.7 channel to the MTC 1.8 channel by running the following command:
$ oc -n openshift-migration patch subscription mtc-operator --type merge --patch '{"spec": {"channel": "release-v1.8"}}'Example output
subscription.operators.coreos.com/mtc-operator patched
5.2.1. Upgrading OADP 1.0 to 1.2 for Migration Toolkit for Containers 1.8.0 Link kopierenLink in die Zwischenablage kopiert!
To upgrade OADP 1.0 to 1.2 for Migration Toolkit for Containers 1.8.0, complete the following steps.
Procedure
For each subscription, patch the OADP operator from OADP 1.0 to OADP 1.2 by running the following command:
$ 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"}}'NoteSections indicating the user-specific returned
values that are used for the installation of MTC & OADP, respectively.NAMEExample output
subscription.operators.coreos.com/redhat-oadp-operator-stable-1.0-mtc-operator-catalog-openshift-marketplace patchedNoteThe returned value will be similar to
, which is used in this example.redhat-oadp-operator-stable-1.0-mtc-operator-catalog-openshift-marketplace-
If the parameter is set to
installPlanApproval, the Operator Lifecycle Manager (OLM) begins the upgrade process.Automatic -
If the parameter is set to
installPlanApproval, you must approve eachManualbefore the OLM begins the upgrades.installPlan
-
If the
Verification
Verify that the OLM has completed the upgrades of OADP and MTC by running the following command:
$ oc -n openshift-migration get subscriptions.operators.coreos.com mtc-operator -o json | jq '.status | (."state"=="AtLatestKnown")'When a value of
is returned, verify the channel used for each subscription by running the following command:true$ oc -n openshift-migration get sub -o json | jq -r '.items[] | {name: .metadata.name, channel: .spec.channel }'Example output
{ "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 csvExample output
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
5.3. Upgrading the Migration Toolkit for Containers on OpenShift Container Platform versions 4.2 to 4.5 Link kopierenLink in die Zwischenablage kopiert!
You can upgrade Migration Toolkit for Containers (MTC) on OpenShift Container Platform versions 4.2 to 4.5 by manually installing the legacy Migration Toolkit for Containers Operator.
Prerequisites
-
You must be logged in as a user with privileges.
cluster-admin -
You must have access to .
registry.redhat.io -
You must have installed.
podman
Procedure
Log in to
with your Red Hat Customer Portal credentials by entering the following command:registry.redhat.io$ podman login registry.redhat.ioDownload the
file by entering the following command:operator.yml$ podman cp $(podman create registry.redhat.io/rhmtc/openshift-migration-legacy-rhel8-operator:v1.7:/operator.yml ./Replace the Migration Toolkit for Containers Operator by entering the following command:
$ oc replace --force -f operator.ymlScale the
deployment tomigration-operatorto stop the deployment by entering the following command:0$ oc scale -n openshift-migration --replicas=0 deployment/migration-operatorScale the
deployment tomigration-operatorto start the deployment and apply the changes by entering the following command:1$ oc scale -n openshift-migration --replicas=1 deployment/migration-operatorVerify that the
was upgraded by entering the following command:migration-operator$ oc -o yaml -n openshift-migration get deployment/migration-operator | grep image: | awk -F ":" '{ print $NF }'Download the
file by entering the following command:controller.yml$ podman cp $(podman create registry.redhat.io/rhmtc/openshift-migration-legacy-rhel8-operator:v1.7):/operator.yml ./Create the
object by entering the following command:migration-controller$ oc create -f controller.ymlVerify that the MTC pods are running by entering the following command:
$ oc get pods -n openshift-migration
5.4. Upgrading MTC 1.3 to 1.8 Link kopierenLink in die Zwischenablage kopiert!
If you are upgrading Migration Toolkit for Containers (MTC) version 1.3.x to 1.8, you must update the
MigPlan
MigrationController
Because the
indirectImageMigration
indirectVolumeMigration
false
Ready
true
- Migrating from OpenShift Container Platform 3 to OpenShift Container Platform 4 requires a legacy MTC Operator and MTC 1.7.x.
-
Upgrading MTC 1.7.x to 1.8.x requires manually updating the OADP channel from to
stable-1.0in order to successfully complete the upgrade from 1.7.x to 1.8.x.stable-1.2
Prerequisites
-
You must be logged in as a user with privileges.
cluster-admin
Procedure
-
Log in to the cluster on which the pod is running.
MigrationController Get the
CR manifest:MigPlan$ oc get migplan <migplan> -o yaml -n openshift-migrationUpdate the following parameter values and save the file as
:migplan.yaml... spec: indirectImageMigration: true indirectVolumeMigration: trueReplace the
CR manifest to apply the changes:MigPlan$ oc replace -f migplan.yaml -n openshift-migrationGet the updated
CR manifest to verify the changes:MigPlan$ oc get migplan <migplan> -o yaml -n openshift-migration