故障排除问题
Red Hat OpenShift GitOps 1.16
OpenShift GitOps 和集群的故障排除主题
摘要
本文档提供有关如何在 OpenShift GitOps 中对问题进行故障排除的信息。
第 1 章 问题:在 Argo CD 与机器配置同步过程中自动重启
在 Red Hat OpenShift Container Platform 中,节点通过 Red Hat OpenShift Machine Config Operator (MCO) 自动更新。Machine Config Operator (MCO) 是一个自定义资源,供集群用来管理其节点的完整生命周期。
当在集群中创建或更新 MCO 资源时,MCO 会选择更新,对所选节点执行必要的更改,并通过封锁、排空和重新引导这些节点来安全地重启节点。它会处理从内核到 kubelet 的所有活动。
但是,MCO 和 GitOps 工作流之间的交互可能会带来重大性能问题和其他不必要的行为。本节介绍如何使 MCO 和 Argo CD GitOps 编配工具正常工作。
1.1. 解决方案 :提高机器配置和 Argo CD 的性能
当您将 Machine Config Operator 用作 GitOps 工作流的一部分时,以下序列会生成子优化的性能:
- Argo CD 在提交包含应用程序资源的 Git 存储库后启动自动同步任务。
- 如果 Argo CD 在同步操作过程中发现新的或更新的机器配置,MCO 会获取机器配置的更改并开始重启节点以应用更改。
- 如果集群中的重新引导节点包含 Argo CD 应用程序控制器,应用程序控制器会终止,应用程序同步将中止。
当 MCO 按顺序重启节点时,可以在每次重启时重新调度 Argo CD 工作负载,可能需要一些时间才能完成同步。这会导致未定义的行为,直到 MCO 重启受同步中机器配置影响的所有节点。
1.2. 其他资源
法律通告
Copyright © 2025 Red Hat, Inc.
The text of and illustrations in this document are licensed by Red Hat under a Creative Commons Attribution–Share Alike 3.0 Unported license ("CC-BY-SA"). An explanation of CC-BY-SA is available at http://creativecommons.org/licenses/by-sa/3.0/. In accordance with CC-BY-SA, if you distribute this document or an adaptation of it, you must provide the URL for the original version.
Red Hat, as the licensor of this document, waives the right to enforce, and agrees not to assert, Section 4d of CC-BY-SA to the fullest extent permitted by applicable law.
Red Hat, Red Hat Enterprise Linux, the Shadowman logo, the Red Hat logo, JBoss, OpenShift, Fedora, the Infinity logo, and RHCE are trademarks of Red Hat, Inc., registered in the United States and other countries.
Linux® is the registered trademark of Linus Torvalds in the United States and other countries.
Java® is a registered trademark of Oracle and/or its affiliates.
XFS® is a trademark of Silicon Graphics International Corp. or its subsidiaries in the United States and/or other countries.
MySQL® is a registered trademark of MySQL AB in the United States, the European Union and other countries.
Node.js® is an official trademark of Joyent. Red Hat is not formally related to or endorsed by the official Joyent Node.js open source or commercial project.
The OpenStack® Word Mark and OpenStack logo are either registered trademarks/service marks or trademarks/service marks of the OpenStack Foundation, in the United States and other countries and are used with the OpenStack Foundation's permission. We are not affiliated with, endorsed or sponsored by the OpenStack Foundation, or the OpenStack community.
All other trademarks are the property of their respective owners.