diff --git a/migrating_from_ocp_3_to_4/troubleshooting-3-4.adoc b/migrating_from_ocp_3_to_4/troubleshooting-3-4.adoc index 0f792929f8..e357722238 100644 --- a/migrating_from_ocp_3_to_4/troubleshooting-3-4.adoc +++ b/migrating_from_ocp_3_to_4/troubleshooting-3-4.adoc @@ -12,7 +12,8 @@ This section describes resources for troubleshooting the {mtc-full} ({mtc-short} This section describes logs and debugging tools that you can use for troubleshooting. -include::modules/migration-downloading-logs.adoc[leveloffset=+2] +include::modules/migration-viewing-migration-plan-resources.adoc[leveloffset=+2] +include::modules/migration-viewing-migration-plan-log.adoc[leveloffset=+2] include::modules/migration-using-mig-log-reader.adoc[leveloffset=+2] include::modules/migration-using-must-gather.adoc[leveloffset=+2] include::modules/migration-debugging-velero-resources.adoc[leveloffset=+2] diff --git a/migration-toolkit-for-containers/troubleshooting-mtc.adoc b/migration-toolkit-for-containers/troubleshooting-mtc.adoc index fadee3c7f2..210a8ce209 100644 --- a/migration-toolkit-for-containers/troubleshooting-mtc.adoc +++ b/migration-toolkit-for-containers/troubleshooting-mtc.adoc @@ -12,7 +12,8 @@ This section describes resources for troubleshooting the {mtc-full} ({mtc-short} This section describes logs and debugging tools that you can use for troubleshooting. -include::modules/migration-downloading-logs.adoc[leveloffset=+2] +include::modules/migration-viewing-migration-plan-resources.adoc[leveloffset=+2] +include::modules/migration-viewing-migration-plan-log.adoc[leveloffset=+2] include::modules/migration-using-mig-log-reader.adoc[leveloffset=+2] include::modules/migration-using-must-gather.adoc[leveloffset=+2] include::modules/migration-debugging-velero-resources.adoc[leveloffset=+2] diff --git a/modules/migration-downloading-logs.adoc b/modules/migration-downloading-logs.adoc deleted file mode 100644 index b39a05a784..0000000000 --- a/modules/migration-downloading-logs.adoc +++ /dev/null @@ -1,25 +0,0 @@ -// Module included in the following assemblies: -// -// * migrating_from_ocp_3_to_4/troubleshooting-3-4.adoc -// * migration-toolkit-for-containers/troubleshooting-mtc - -[id="migration-downloading-logs_{context}"] -= Downloading migration logs by using the {mtc-short} web console - -You can download the `Velero`, `Restic`, and `MigrationController` pod logs in the {mtc-full} ({mtc-short}) web console to troubleshoot a failed migration. - -.Procedure - -. In the {mtc-short} console, click *Migration plans* to view the list of migration plans. -. Click the *Options* menu {kebab} of a specific migration plan and select *Logs*. -. Click *Download Logs* to download the logs of the `MigrationController`, `Velero`, and `Restic` pods for all clusters. -+ -You can download a single log by selecting the cluster, log source, and pod source, and then clicking *Download Selected*. -+ -You can access a pod log from the CLI by using the `oc logs` command: -+ -[source,terminal] ----- -$ oc logs -f -n openshift-migration <1> ----- -<1> Specify the pod name. diff --git a/modules/migration-viewing-migration-plan-log.adoc b/modules/migration-viewing-migration-plan-log.adoc new file mode 100644 index 0000000000..8a9affc5bb --- /dev/null +++ b/modules/migration-viewing-migration-plan-log.adoc @@ -0,0 +1,31 @@ +// Module included in the following assemblies: +// +// * migrating_from_ocp_3_to_4/troubleshooting-3-4.adoc +// * migration-toolkit-for-containers/troubleshooting-mtc + +[id="migration-viewing-migration-plan-log_{context}"] += Viewing a migration plan log + +You can view an aggregated log for a migration plan. You use the {mtc-short} web console to copy a command to your clipboard and then run the command from the command line interface (CLI). + +The command displays the filtered logs of the following pods: + +* `Migration Controller` +* `Velero` +* `Restic` +* `Rsync` +* `Stunnel` +* `Registry` + +.Procedure + +. In the {mtc-short} web console, click *Migration Plans*. +. Click the *Migrations* number next to a migration plan to view the *Migrations* page. ++ +The *Migrations* page displays the migration types associated with the migration plan, for example, *Stage* or *Cutover* for warm migration. + +. Click *View logs*. +. Click the Copy icon to copy the `oc logs` command to your clipboard. +. Log in to the relevant cluster and enter the command on the CLI. ++ +The aggregated log for the migration plan is displayed. diff --git a/modules/migration-viewing-migration-plan-resources.adoc b/modules/migration-viewing-migration-plan-resources.adoc new file mode 100644 index 0000000000..bbc9d6ba74 --- /dev/null +++ b/modules/migration-viewing-migration-plan-resources.adoc @@ -0,0 +1,43 @@ +// Module included in the following assemblies: +// +// * migrating_from_ocp_3_to_4/troubleshooting-3-4.adoc +// * migration-toolkit-for-containers/troubleshooting-mtc.adoc + +[id="migration-viewing-migration-plan-resources_{context}"] += Viewing migration plan resources + +You can view migration plan resources to monitor a running migration or to troubleshoot a failed migration by using the {mtc-short} web console and the command line interface (CLI). + +.Procedure + +. In the {mtc-short} web console, click *Migration Plans*. +. Click the *Migrations* number next to a migration plan to view the *Migrations* page. ++ +The *Migrations* page displays the migration types associated with the migration plan, for example, *Stage*, *Migration*, or *Rollback*. + +. Click the *Type* link to view the *Migration details* page. + +. Expand *Migration resources* to view the migration resources and their status. ++ +[NOTE] +==== +To troubleshoot a failed migration, start with a high-level resource that has failed and then work down the resource tree towards the lower-level resources. +==== + +. Click the Options menu {kebab} next to a resource and select one of the following options: + +* *Copy `oc describe` command* copies the command to your clipboard. + +** Log in to the relevant cluster and then run the command. ++ +The conditions and events of the resource are displayed in YAML format. + +* *Copy `oc logs` command* copies the command to your clipboard. + +** Log in to the relevant cluster and then run the command. ++ +If the resource supports log filtering, a filtered log is displayed. + +* *View JSON* displays the resource data in JSON format in a web browser. ++ +The data is the same as the output for the `oc get ` command.