This documentation is for a release that is no longer maintained
See documentation for the latest supported version 3 or the latest supported version 4.11.4. 为支持收集诊断信息
在提交问题单时同时提供您的集群信息,可以帮助红帽支持为您进行排除故障。您可使用 must-gather
工具来收集有关 OpenShift Container Platform 集群的诊断信息,包括与 OpenShift Serverless 相关的数据。为了获得快速支持,请提供 OpenShift Container Platform 和 OpenShift Serverless 的诊断信息。
11.4.1. 关于 must-gather 工具 复制链接链接已复制到粘贴板!
oc adm must-gather
CLI 命令可收集最有助于解决问题的集群信息,包括:
- 资源定义
- 服务日志
默认情况下,oc adm must-gather
命令使用默认的插件镜像,并写入 ./must-gather.local
。
另外,您可以使用适当的参数运行命令来收集具体信息,如以下部分所述:
要收集与一个或多个特定功能相关的数据,请使用
--image
参数和镜像,如以下部分所述。例如:
oc adm must-gather --image=registry.redhat.io/container-native-virtualization/cnv-must-gather-rhel8:v4.9.0
$ oc adm must-gather --image=registry.redhat.io/container-native-virtualization/cnv-must-gather-rhel8:v4.9.0
Copy to Clipboard Copied! Toggle word wrap Toggle overflow 要收集审计日志,请使用
-- /usr/bin/gather_audit_logs
参数,如以下部分所述。例如:
oc adm must-gather -- /usr/bin/gather_audit_logs
$ oc adm must-gather -- /usr/bin/gather_audit_logs
Copy to Clipboard Copied! Toggle word wrap Toggle overflow 注意作为默认信息集合的一部分,不会收集审计日志来减小文件的大小。
当您运行 oc adm must-gather
时,集群的新项目中会创建一个带有随机名称的新 pod。在该 pod 上收集数据,并保存至以 must-gather.local
开头的一个新目录中。此目录在当前工作目录中创建。
例如:
NAMESPACE NAME READY STATUS RESTARTS AGE ... openshift-must-gather-5drcj must-gather-bklx4 2/2 Running 0 72s openshift-must-gather-5drcj must-gather-s8sdh 2/2 Running 0 72s ...
NAMESPACE NAME READY STATUS RESTARTS AGE
...
openshift-must-gather-5drcj must-gather-bklx4 2/2 Running 0 72s
openshift-must-gather-5drcj must-gather-s8sdh 2/2 Running 0 72s
...
11.4.2. 关于收集 OpenShift Serverless 数据 复制链接链接已复制到粘贴板!
您可使用 oc adm must-gather
CLI 命令来收集有关集群的信息,包括与 OpenShift Serverless 相关的功能和对象。要使用 must-gather
来收集 OpenShift Serverless 数据,您必须为已安装的 OpenShift Serverless 版本指定 OpenShift Serverless 镜像和镜像标签。
先决条件
-
安装 OpenShift CLI (
oc
) 。
流程
使用
oc adm must-gather
命令收集数据:oc adm must-gather --image=registry.redhat.io/openshift-serverless-1/svls-must-gather-rhel8:<image_version_tag>
$ oc adm must-gather --image=registry.redhat.io/openshift-serverless-1/svls-must-gather-rhel8:<image_version_tag>
Copy to Clipboard Copied! Toggle word wrap Toggle overflow 示例命令
oc adm must-gather --image=registry.redhat.io/openshift-serverless-1/svls-must-gather-rhel8:1.14.0
$ oc adm must-gather --image=registry.redhat.io/openshift-serverless-1/svls-must-gather-rhel8:1.14.0
Copy to Clipboard Copied! Toggle word wrap Toggle overflow