3.3. 从基于代理的安装收集日志数据
使用以下步骤收集有关基于代理的安装失败的日志数据,以便为支持问题单提供。
先决条件
- 您已为 Kubernetes API 服务器配置了 DNS 记录。
流程
运行以下命令并收集输出:
$ ./openshift-install --dir <installation_directory> agent wait-for bootstrap-complete --log-level=debug
错误信息示例
... ERROR Bootstrap failed to complete: : bootstrap process timed out: context deadline exceeded
如果上一命令的输出显示失败,或者 bootstrap 没有进展,请运行以下命令连接到 rendezvous 主机并收集输出:
$ ssh core@<node-ip> agent-gather -O >agent-gather.tar.xz
注意红帽支持可以使用 rendezvous 主机收集的数据诊断大多数问题,但如果某些主机无法注册,从每个主机收集这些数据可能会很有用。
如果 bootstrap 完成且集群节点重启,请运行以下命令并收集输出:
$ ./openshift-install --dir <install_directory> agent wait-for install-complete --log-level=debug
如果上一命令的输出显示失败,请执行以下步骤:
运行以下命令,将
kubeconfig
文件导出到您的环境:$ export KUBECONFIG=<install_directory>/auth/kubeconfig
运行以下命令为调试收集信息:
$ oc adm must-gather
运行以下命令,从工作目录中刚刚创建的
must-gather
目录创建一个压缩文件:$ tar cvaf must-gather.tar.gz <must_gather_directory>
-
排除
/auth
子目录,将部署期间使用的安装目录附加到红帽客户门户上的支持问题单中。 - 将从此流程收集的所有其他数据添加到您的支持问题单中。