Some additional information in the above output will be useful, like:
If it's an inspect of an single namespace, something like: "There is only one Project: xxxxx".
The version of the cluster (if there is the clusterversion resource).
The part before the sha256 in the directory name (for must-gathers), that in most of the cases will show if it's a "standard" must-gather image (if it's quay-io-openshift-release-dev-ocp-v4-0-art-dev) or a different must-gather image like ODF (it will contain odf-must-gather-rhel9), Logging (it will contain cluster-logging-rhel9-operator), CNV (it will contain cnv-must-gather-rhel8), ...
If there is an image directory and also an inspect directory in the same must-gather directory, it usually means that the must-gather image failed at any time, and inspect command was automatically used instead. In that case, show a message stating that.
Also, if exist the must-gather.logs file inside the must-gather directory (it was included in 4.16 oc binary by [1]), show a line in red if the minor version of the oc binary and the version of the cluster is not the same. For example:
If the must-gather.logs file has differences in the z-stream, do nothing:
ClientVersion: 4.16.0
ClusterVersion: Stable at "4.16.2"
but if the file contains differences in the minor version, show a message (if possible in orange color) stating that the version of the oc binary and the version of the cluster differs:
ClientVersion: 4.16.1
ClusterVersion: Stable at "4.15.1"
So, output will be something similar to
Must-Gather : /home/user/must-gather.local.tar.gz/must-gather.local.xxxxx/
/xxxxxxx
Project : default ##### if there is only one project/namespace, show here: "There is only one Project"
ApiServerURL : https://api.openshift.example.com:6443
Platform : xxxx
ClusterVersion : 4.Y.Z
Image: cluster-logging-rhel9-operator #### only if there is a sub-directory with image name and not only `inspect` directory
Note: The must-gather was generated with `oc` version 4.16.z while the cluster is 4.11.7 #### In orange, only if the minor version differs
Note: There is an inspect and an image directory. It usually means that the must-gather image failed and inspect was used as a fallback. #### only if there is an inspect and an image directory at the same time in the same must-gather directory.
@gmeghnag , I can see the clusterID added to the omc use output by commit 373b57c6934b8d64828668374e0f9efd625b0698. Can this be checked to add additional information?
When selecting a new directory for using with the
omc use
command, the following information is shown:Some additional information in the above output will be useful, like:
namespace
, something like: "There is only one Project: xxxxx
".clusterversion
resource).sha256
in the directory name (for must-gathers), that in most of the cases will show if it's a "standard" must-gather image (if it'squay-io-openshift-release-dev-ocp-v4-0-art-dev
) or a different must-gather image like ODF (it will containodf-must-gather-rhel9
), Logging (it will containcluster-logging-rhel9-operator
), CNV (it will containcnv-must-gather-rhel8
), ...Also, if exist the
must-gather.logs
file inside the must-gather directory (it was included in 4.16oc
binary by [1]), show a line in red if the minor version of theoc
binary and the version of the cluster is not the same. For example: If themust-gather.logs
file has differences in thez-stream
, do nothing:but if the file contains differences in the minor version, show a message (if possible in orange color) stating that the version of the
oc
binary and the version of the cluster differs:So, output will be something similar to
[1] https://issues.redhat.com/browse/WRKLDS-1012