Skip to content

Commit 9a66b61

Browse files
authored
Merge pull request #61181 from aspauldi/CNV-29398_2
CNV-29398_2: [2212293] "Usage and examples" in OpenShift Virtualization must gather is wrong
2 parents fc04693 + 25b25e3 commit 9a66b61

File tree

3 files changed

+29
-22
lines changed

3 files changed

+29
-22
lines changed

modules/virt-must-gather-options.adoc

Lines changed: 25 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ You can specify a combination of scripts and environment variables for the follo
1010

1111
* Collecting detailed virtual machine (VM) information from a namespace
1212
* Collecting detailed information about specified VMs
13-
* Collecting image and image stream information
13+
* Collecting image, image-stream, and image-stream-tags information
1414
* Limiting the maximum number of parallel processes used by the `must-gather` tool
1515
1616
[id="parameters"]
@@ -33,13 +33,13 @@ Using too many parallel processes can cause performance issues. Increasing the m
3333

3434
.Scripts
3535

36-
Each script is only compatible with certain environment variable combinations.
36+
Each script is compatible only with certain environment variable combinations.
3737

38-
`gather_vms_details`:: Collect VM log files, VM definitions, and namespaces (and their child objects) that belong to {VirtProductName} resources. If you use this parameter without specifying a namespace or VM, the `must-gather` tool collects this data for all VMs in the cluster. This script is compatible with all environment variables, but you must specify a namespace if you use the `VM` variable.
38+
`/usr/bin/gather`:: Use the default `must-gather` script, which collects cluster data from all namespaces and includes only basic VM information. This script is compatible only with the `PROS` variable.
3939

40-
`gather`:: Use the default `must-gather` script, which collects cluster data from all namespaces and includes only basic VM information. This script is only compatible with the `PROS` variable.
40+
`/usr/bin/gather --vms_details`:: Collect VM log files, VM definitions, control-plane logs, and namespaces that belong to {VirtProductName} resources. Specifying namespaces includes their child objects. If you use this parameter without specifying a namespace or VM, the `must-gather` tool collects this data for all VMs in the cluster. This script is compatible with all environment variables, but you must specify a namespace if you use the `VM` variable.
4141

42-
`gather_images`:: Collect image and image stream custom resource information. This script is only compatible with the `PROS` variable.
42+
`/usr/bin/gather --images`:: Collect image, image-stream, and image-stream-tags custom resource information. This script is compatible only with the `PROS` variable.
4343

4444
[id="usage-and-examples_{context}"]
4545
== Usage and examples
@@ -50,58 +50,64 @@ Environment variables are optional. You can run a script by itself or with one o
5050
.Compatible parameters
5151
|===
5252
|Script |Compatible environment variable
53-
|`gather_vms_details`
53+
|`/usr/bin/gather` |* `PROS=<number_of_processes>`
54+
|`/usr/bin/gather --vms_details`
5455
|* For a namespace: `NS=<namespace_name>`
5556

5657
* For a VM: `VM=<vm_name> NS=<namespace_name>`
5758

5859
* `PROS=<number_of_processes>`
5960

60-
|`gather` |* `PROS=<number_of_processes>`
61-
|`gather_images` |* `PROS=<number_of_processes>`
61+
62+
|`/usr/bin/gather --images` |* `PROS=<number_of_processes>`
6263
|===
6364

64-
To customize the data that `must-gather` collects, you append a double dash (`--`) to the command, followed by a space and one or more compatible parameters.
65+
6566

6667
.Syntax
6768

69+
70+
6871
[source,terminal,subs="attributes+"]
6972
----
7073
$ oc adm must-gather \
7174
--image=registry.redhat.io/container-native-virtualization/cnv-must-gather-rhel9:v{HCOVersion} \
7275
-- <environment_variable_1> <environment_variable_2> <script_name>
7376
----
7477

75-
.Detailed VM information
78+
.Default data collection parallel processes
7679

77-
The following command collects detailed VM information for the `my-vm` VM in the `mynamespace` namespace:
80+
By default, five processes run in parallel.
7881

7982
[source,terminal,subs="attributes+"]
8083
----
8184
$ oc adm must-gather \
8285
--image=registry.redhat.io/container-native-virtualization/cnv-must-gather-rhel9:v{HCOVersion} \
83-
-- NS=mynamespace VM=my-vm gather_vms_details <1>
86+
-- PROS=5 /usr/bin/gather <1>
8487
----
85-
<1> The `NS` environment variable is mandatory if you use the `VM` environment variable.
88+
<1> You can modify the number of parallel processes by changing the default.
89+
8690

87-
.Default data collection limited to three parallel processes
91+
.Detailed VM information
8892

89-
The following command collects default `must-gather` information by using a maximum of three parallel processes:
93+
The following command collects detailed VM information for the `my-vm` VM in the `mynamespace` namespace:
9094

9195
[source,terminal,subs="attributes+"]
9296
----
9397
$ oc adm must-gather \
9498
--image=registry.redhat.io/container-native-virtualization/cnv-must-gather-rhel9:v{HCOVersion} \
95-
-- PROS=3 gather
99+
-- NS=mynamespace VM=my-vm /usr/bin/gather --vms_details <1>
96100
----
101+
<1> The `NS` environment variable is mandatory if you use the `VM` environment variable.
102+
97103

98-
.Image and image stream information
104+
.Image, image-stream, and image-stream-tags information
99105

100-
The following command collects image and image stream information from the cluster:
106+
The following command collects image, image-stream, and image-stream-tags information from the cluster:
101107

102108
[source,terminal,subs="attributes+"]
103109
----
104110
$ oc adm must-gather \
105111
--image=registry.redhat.io/container-native-virtualization/cnv-must-gather-rhel9:v{HCOVersion} \
106-
-- gather_images
112+
/usr/bin/gather --images
107113
----

modules/virt-using-virt-must-gather.adoc

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ The default data collection includes information about the following resources:
2323
+
2424
[source,terminal,subs="attributes+"]
2525
----
26-
$ oc adm must-gather --image-stream=openshift/must-gather \
27-
--image=registry.redhat.io/container-native-virtualization/cnv-must-gather-rhel9:v{HCOVersion}
26+
$ oc adm must-gather
27+
--image=registry.redhat.io/container-native-virtualization/cnv-must-gather-rhel9:v{HCOVersion} \
28+
-- /usr/bin/gather
2829
----

virt/support/virt-collecting-virt-data.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ Collecting data about malfunctioning virtual machines (VMs) minimizes the time r
5454

5555
.Procedure
5656

57-
. xref:../../virt/support/virt-collecting-virt-data.adoc#virt-must-gather-options_virt-collecting-virt-data[Collect must-gather data for the VMs] using the `gather_vms_details` script.
57+
. xref:../../virt/support/virt-collecting-virt-data.adoc#virt-must-gather-options_virt-collecting-virt-data[Collect must-gather data for the VMs] using the `/usr/bin/gather` script.
5858
. Collect screenshots of VMs that have crashed _before_ you restart them.
5959
. xref:../../virt/getting_started/virt-using-the-cli-tools.adoc#vm-memory-dump-commands_virt-using-the-cli-tools[Collect memory dumps from VMs] _before_ remediation attempts.
6060
. Record factors that the malfunctioning VMs have in common. For example, the VMs have the same host or network.

0 commit comments

Comments
 (0)