1
0
mirror of https://github.com/openshift/openshift-docs.git synced 2026-02-05 12:46:18 +01:00

MIG-683: Debug view and logs

This commit is contained in:
Avital Pinnick
2021-06-17 17:58:55 +03:00
committed by openshift-cherrypick-robot
parent 321dfca4c5
commit 48dd493242
5 changed files with 78 additions and 27 deletions

View File

@@ -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]

View File

@@ -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]

View File

@@ -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 <pod-name> -f -n openshift-migration <1>
----
<1> Specify the pod name.

View File

@@ -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.

View File

@@ -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 <resource>` command.