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.19.2. 从失败安装中收集日志
如果为安装程序提供了 SSH 密钥,则可以收集与失败安装相关的数据。
注意
用于收集失败安装日志的命令与从正在运行的集群收集日志时所用的命令不同。如果需要从正在运行的集群收集日志,请使用 oc adm must-gather
命令。
先决条件
- OpenShift Container Platform 安装在 bootstrap 过程完成前失败。bootstrap 节点正在运行,并可通过 SSH 访问。
-
ssh-agent
进程在您的计算机上处于活跃状态,并且为ssh-agent
进程和安装程序提供了相同的 SSH 密钥。 - 如果尝试在您置备的基础架构上安装集群,则必须具有 bootstrap 和 control plane 节点(也称为 master 节点)的完全限定域名。
流程
生成从 bootstrap 和 control plane 机器获取安装日志的命令:
如果您使用安装程序置备的基础架构,请切换到包含安装程序的目录,并运行以下命令:
./openshift-install gather bootstrap --dir <installation_directory>
$ ./openshift-install gather bootstrap --dir <installation_directory>
1 Copy to Clipboard Copied! Toggle word wrap Toggle overflow - 1
installation_directory
是您在运行./openshift-install create cluster
时指定的目录。这个目录包括了安装程序所创建的 OpenShift Container Platform 定义文件。
对于安装程序置备的基础架构,安装程序会保存有关集群的信息,因此您不用指定主机名或 IP 地址。
如果您使用您置备的基础架构,切换到包含安装程序的目录,并运行以下命令:
./openshift-install gather bootstrap --dir <installation_directory> \ --bootstrap <bootstrap_address> \ --master <master_1_address> \ --master <master_2_address> \ --master <master_3_address>"
$ ./openshift-install gather bootstrap --dir <installation_directory> \
1 --bootstrap <bootstrap_address> \
2 --master <master_1_address> \
3 --master <master_2_address> \
4 --master <master_3_address>"
5 Copy to Clipboard Copied! Toggle word wrap Toggle overflow 注意默认集群包含三个 control plane 机器。如所示,列出所有 control plane 机器,无论集群使用了多少个。
输出示例
INFO Pulling debug logs from the bootstrap machine INFO Bootstrap gather logs captured here "<installation_directory>/log-bundle-<timestamp>.tar.gz"
INFO Pulling debug logs from the bootstrap machine INFO Bootstrap gather logs captured here "<installation_directory>/log-bundle-<timestamp>.tar.gz"
Copy to Clipboard Copied! Toggle word wrap Toggle overflow 如果需要创建关安装失败的红帽支持问题单,请在问题单中附上压缩日志。