支持


Red Hat build of MicroShift 4.17

使用 MicroShift 的支持工具

Red Hat OpenShift Documentation Team

摘要

本文档提供有关如何将支持工具用于 MicroShift 的信息。

第 1 章 etcd 服务

etcd 服务作为 MicroShift RPM 的一部分提供。etcd 服务作为单独的进程运行,etcd 生命周期由 MicroShift 自动管理。

1.1. 观察和调试 MicroShift etcd 服务器

您可以收集 journalctl 日志来观察和调试 etcd 服务器日志。

先决条件

  • MicroShift 服务正在运行。

流程

  • 要获取 etcd 的日志,请运行以下命令:

    Copy to Clipboard Toggle word wrap
    $ sudo journalctl -u microshift-etcd.scope
    注意

    MicroShift 日志可以使用 journalctl -u microshift 命令从 etcd 日志分开访问。

1.2. 检查 etcd 版本

您可以使用以下方法之一获取 MicroShift 中包含的 etcd 数据库的版本信息,具体取决于您需要的信息级别。

流程

  • 要显示基本数据库版本信息,请运行以下命令:

    Copy to Clipboard Toggle word wrap
    $ microshift-etcd version

    输出示例

    Copy to Clipboard Toggle word wrap
    microshift-etcd Version: 4.17.1
    Base etcd Version: 3.5.13

  • 要显示完整的数据库版本信息,请运行以下命令:

    Copy to Clipboard Toggle word wrap
    $ microshift-etcd version -o json

    输出示例

    Copy to Clipboard Toggle word wrap
    {
      "major": "4",
      "minor": "16",
      "gitVersion": "4.17.1~rc.1",
      "gitCommit": "140777711962eb4e0b765c39dfd325fb0abb3622",
      "gitTreeState": "clean",
      "buildDate": "2024-05-10T16:37:53Z",
      "goVersion": "go1.21.9"
      "compiler": "gc",
      "platform": "linux/amd64",
      "patch": "",
      "etcdVersion": "3.5.13"
    }

1.3. etcd 故障排除

要对 etcd 进行故障排除并提高性能,请配置服务的内存允许。

1.4. 配置 memoryLimitMB 值来为 etcd 服务器设置参数

默认情况下,etcd 根据需要使用尽可能多的内存来处理系统上的负载。在内存有限制的系统中,您可能需要限制 etcd 使用的内存量。

流程

  • 编辑 /etc/microshift/config.yaml 文件,以设置 memoryLimitMB 值。

    Copy to Clipboard Toggle word wrap
    etcd:
      memoryLimitMB: 128
    注意

    MicroShift 上 memoryLimitMB 所需的最小值为 128 MB。接近最小值的值可能会影响 etcd 性能。较小的限制,etcd 会对查询做出响应所需的时间。如果限制太小,或者 etcd 的使用量很高,查询会超时。

验证

  1. 修改 /etc/microshift/config.yaml 中的 memoryLimitMB 值后,运行以下命令重启 MicroShift:

    Copy to Clipboard Toggle word wrap
    $ sudo systemctl restart microshift
  2. 运行以下命令验证新的 memoryLimitMB 值是否在使用中:

    Copy to Clipboard Toggle word wrap
    $ systemctl show --property=MemoryHigh microshift-etcd.scope

第 2 章 使用 sos 报告

您可以使用 sos 工具收集有关主机的故障排除信息。sos report 命令生成一个详细报告,显示系统中不同组件和应用程序的所有启用插件和数据。

2.1. 关于 sos 报告

sos 工具由不同的插件组成,可帮助您从不同的应用程序收集信息。在 sos 版本 4.5.1 中添加了特定于 MicroShift 的插件,它可以收集以下数据:

  • MicroShift 配置和版本
  • 集群范围和系统命名空间资源的 YAML 输出
  • OVN-Kubernetes 信息

2.2. 从 sos 报告收集数据

先决条件

  • 已安装 sos 软件包。

流程

  1. 以 root 用户身份登录到失败的主机。
  2. 运行以下命令执行 debug 报告创建过程:

    Copy to Clipboard Toggle word wrap
    $ microshift-sos-report

    输出示例

    Copy to Clipboard Toggle word wrap
    sosreport (version 4.5.1)
    
    This command will collect diagnostic and configuration information from
    this Red Hat Enterprise Linux system and installed applications.
    
    An archive containing the collected information will be generated in
    /var/tmp/sos.o0sznf_8 and may be provided to a Red Hat support
    representative.
    
    Any information provided to Red Hat will be treated in accordance with
    the published support policies at:
    
            Distribution Website : https://www.redhat.com/
            Commercial Support   : https://www.access.redhat.com/
    
    The generated archive may contain data considered sensitive and its
    content should be reviewed by the originating organization before being
    passed to any third party.
    
    No changes will be made to system configuration.
    
    
     Setting up archive ...
     Setting up plugins ...
     Running plugins. Please wait ...
    
      Starting 1/2   microshift      [Running: microshift]
      Starting 2/2   microshift_ovn  [Running: microshift microshift_ovn]
      Finishing plugins              [Running: microshift]
    
      Finished running plugins
    
    Found 1 total reports to obfuscate, processing up to 4 concurrently
    
    sosreport-microshift-rhel9-2023-03-31-axjbyxw :    Beginning obfuscation...
    sosreport-microshift-rhel9-2023-03-31-axjbyxw :    Obfuscation completed
    
    Successfully obfuscated 1 report(s)
    
    Creating compressed archive...
    
    A mapping of obfuscated elements is available at
    	/var/tmp/sosreport-microshift-rhel9-2023-03-31-axjbyxw-private_map
    
    Your sosreport has been generated and saved in:
    	/var/tmp/sosreport-microshift-rhel9-2023-03-31-axjbyxw-obfuscated.tar.xz
    
     Size	444.14KiB
     Owner	root
     sha256	922e5ff2db25014585b7c6c749d2c44c8492756d619df5e9838ce863f83d4269
    
    Please send this file to your support representative.

2.3. 其他资源

第 3 章 获取集群 ID

在向红帽支持提供信息时,提供集群的唯一标识符会很有帮助。对于 MicroShift,您可以使用 OpenShift CLI (oc)手动获取集群 ID,或者从文件检索 ID。

注意

只有在 MicroShift 服务在安装后第一次运行后,才会创建集群 ID。

3.1. 获取正在运行的集群的集群 ID

使用以下步骤获取正在运行的集群的 ID。

流程

  • 输入以下命令,使用 oc get 获取正在运行的集群的 ID:

    Copy to Clipboard Toggle word wrap
    $ oc get namespaces kube-system -o jsonpath={.metadata.uid}

    输出示例

    Copy to Clipboard Toggle word wrap
    7cf13853-68f4-454e-8f5c-1af748cbfb1a

  • 输入以下命令从 cluster-id 文件中检索正在运行的集群的 ID:

    Copy to Clipboard Toggle word wrap
    $ sudo cat /var/lib/microshift/cluster-id

    输出示例

    Copy to Clipboard Toggle word wrap
    7cf13853-68f4-454e-8f5c-1af748cbfb1a

3.2. 获取已停止集群的集群 ID

对于之前运行但现在没有运行的集群,您可以从 /var/lib/microshift 目录中的 cluster-id 文件获取集群 ID。

流程

  • 输入以下命令从 cluster-id 文件中检索已停止集群的 ID:

    Copy to Clipboard Toggle word wrap
    $ sudo cat /var/lib/microshift/cluster-id

    输出示例

    Copy to Clipboard Toggle word wrap
    7cf13853-68f4-454e-8f5c-1af748cbfb1a

第 4 章 获取支持

使用以下信息获得 Red Hat Device Edge 的更多信息,包括 MicroShift 或 Red Hat Enterprise Linux for Edge (RHEL for Edge)。

4.1. 获取支持

如果您在执行本文档所述的某个流程或 MicroShift 时遇到问题,请访问红帽客户门户

通过红帽客户门户网站:

  • 搜索或者浏览红帽知识库,了解与红帽产品相关的文章和解决方案。
  • 提交问题单给红帽支持。
  • 访问其他产品文档。

4.3. 关于红帽知识库

红帽知识库提供丰富的内容以帮助您最大程度地利用红帽的产品和技术。红帽知识库包括文章、产品文档和视频,概述了安装、配置和使用红帽产品的最佳实践。另外,您还可以搜索已知问题的解决方案,其提供简洁的根原因描述和补救措施。

4.4. 搜索红帽知识库

如果出现 MicroShift 问题,您可以执行初始搜索来确定红帽知识库中是否已存在解决方案。

先决条件

  • 您有红帽客户门户网站帐户。

流程

  1. 登录到 红帽客户门户网站
  2. Search
  3. 在搜索字段中,输入与问题相关的关键字和字符串,包括:

    • MicroShift 组件(如 etcd
    • 相关步骤(比如 安装
    • 警告、错误消息和其他与输出与特定的问题相关
  4. Enter 键。
  5. 可选: 选择 MicroShift 产品过滤器。
  6. 可选: 选择 Documentation 内容类型过滤器。

4.5. 提交支持问题单

先决条件

  • MicroShift 服务正在运行。
  • 已安装 OpenShift CLI(oc)。
  • 您有红帽客户门户网站帐户。
  • 您有红帽标准订阅或高级订阅。

流程

  1. 登录到红帽客户门户网站的客户支持 页面
  2. Get support
  3. 客户支持 页面的 Cases 选项卡中:

    1. 可选:根据需要更改预先填充的帐户和所有者详情。
    2. 为您的问题选择适当的类别,如 Bug 或 Defect,然后点 Continue
  4. 输入以下信息:

    1. Summary 字段中,输入简要但描述性问题概述,以及有关所经历的症状的详细信息,以及您的预期。
    2. Product 下拉菜单中选择 Red Hat Device Edge
    3. Version 下拉菜单中选择 4
  5. 查看推荐的红帽知识库解决方案列表,它们可能会与您要报告的问题相关。如果建议的文章没有解决这个问题,请点 Continue
  6. 查看更新的推荐红帽知识库解决方案列表,它们可能会与您要报告的问题相关。这个列表的范围会缩小,因为您在创建问题单的过程中提供了更多信息。如果建议的文章没有解决这个问题,请点 Continue
  7. 请确保提供的帐户信息是正确的,如果需要,请相应调整。
  8. 在出现提示时完成以下问题。包括您使用的安装类型,可以是 RPM 或 embedded-image。点 Continue:

    • 您遇到什么情况?您期望发生什么情况?
    • 对业务的影响价值。
    • 您在哪里遇到此行为?什么环境?
    • 此行为何时发生?发生频率?重复发生?是否只在特定时间发生?
  9. 上传相关的诊断数据文件并点击 Continue。包含使用 sos 工具或 etcd 收集的数据作为起点,以及没有在这些日志中收集的特定于问题的数据。
  10. 添加相关问题单管理详情,然后点 Continue
  11. 预览问题单详情,点 Submit

法律通告

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.
返回顶部
Red Hat logoGithubredditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

通过我们的产品和服务,以及可以信赖的内容,帮助红帽用户创新并实现他们的目标。 了解我们当前的更新.

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

Theme

© 2025 Red Hat, Inc.