已关闭
[Bug]: 偶现服务器上备机的knownhosts丢失,OM查询集群状态异常。【YC】 #775
zhangxubo创建于  8月1日关闭于  8月13日
zhangxubo
zhangxubo成员
8月1日 创建

测试类型

工具功能

测试版本

3.0.0

问题描述

操作系统和硬件信息

all

测试环境

企业版主备

被测功能

OM工具

预置条件

操作步骤

  1. 环境上出现omm用户的known_hosts异常,OM工具查询集群状态异常,但是其实各实例正常,有误导作用。

OM应该屏蔽下known_hosts导致的异常

预期输出

集群正常

实际输出

集群异常

日志信息

image.png

提单组织

一线客户

测试代码

likedislike
zhangxubozhangxubo成员
8月1日 添加了label:bug
opengauss_bot
opengauss_bot成员
8月1日 评论:

This issue requires an assignee. Since you haven't specified one, we've assigned TestManager as the default assignee for this issue.

likedislike
opengauss_botopengauss_bot成员
8月1日 将 TestManager 设为负责人
opengauss_botopengauss_bot成员
8月1日 添加了label:sig/OM
opengauss_bot
opengauss_bot成员
8月1日 评论:

Welcome To openGauss Community

Hey @zhangxubo , thanks for your contribution to the community.

Bot Usage Manual

I'm the Bot here serving you. You can find the instructions on how to interact with me at Here . That means you can comment below every pull request or issue to trigger Bot Commands.

Contact Guide

If you have any questions, please contact the SIG: OM ,
and any of the maintainers: @CarrotGo, @chendong76, @chenxiaobin19, @congzhou2603, @dodders, @hwworkholic, @jemappellehc, @muyulinzhong, @quemingjian, @shenzheng4, @shirley_zhengx, @superlchf, @totaj, @wlff234, @wofanzheng, @ywzq1161327784 ,
and any of the committers: @hw_hbj, @libiao2024, @miffycree, @wangzili1, @zhangxubo .

likedislike
zhangxubozhangxubo成员
8月1日 关联了pull request:屏蔽knownhosts异常带来集群查询异常问题
sungang14sungang14成员
8月3日 issue优先级由 无优先级 改变为 次要
sungang14sungang14成员
8月3日 关联了看板:openGauss 7.0.0-LTS
shenzheng4shenzheng4成员
8月6日 移除了负责人 TestManager
opengauss_bot
opengauss_bot成员
8月6日 评论:

This issue requires an assignee. Since you haven't specified one, we've assigned TestManager as the default assignee for this issue.

likedislike
opengauss_botopengauss_bot成员
8月6日 将 TestManager 设为负责人
shenzheng4shenzheng4成员
8月6日 将 zhangxubo 设为负责人,移除负责人 TestManager
zhangxubo
zhangxubo成员
8月11日 评论:

20260811 7.0.0B018自测:

使用om工具搭建集群(不带CM,cm不走ssh),搭建后对于子用户下主动注入故障,使得known_hosts失效: > ~/.ssh/known_hosts

查询集群状态不受到影响:---- 其他场景不做处理。

image.png

likedislike
zhangxubozhangxubo成员
8月12日 issue状态由 待办的 改变为 待回归
wuchenlong
wuchenlong成员
8月13日 评论:

【回归版本】openGauss 7.0.0-RC3 build ae26a1b2(7.0.0 主版本线最新 B018,2026-08-12 编译)
【回归日期】20260813
【回归人员】wuchenlong
【回归结论】通过

测试结果

  1. B018 OM 已带上 MR !1303 修复:script/gspylib/pssh/bin/pssh 的 SSH 参数已增加 -o StrictHostKeyChecking=no(会话级关闭身份校验,屏蔽 known_hosts 异常)。
  2. 故障注入验证:清空 wcl0623 用户 ~/.ssh/known_hosts 后,gs_om -t status / gs_om -t status --detail / gs_om -t query 均正常返回集群状态,不再因 known_hosts 异常误报集群异常。

说明

与 issue 原始异常对比:此前 omm 用户 known_hosts 异常时 OM 查询集群状态报异常(误导,实际实例 normal);修复后(StrictHostKeyChecking=no),known_hosts 丢失/异常不再影响 OM 集群状态查询,测试期间集群状态持续显示 Normal(Testci044 Primary + Testci045/046 Standby,三节点)。

【回归步骤】

执行 SQL(无数据库操作,为 OM 集群状态查询故障注入验证):

# 1. 备份并清空 known_hosts,模拟 known_hosts 异常/丢失
$ cd /home/wcl0623
$ cp .ssh/known_hosts .ssh/known_hosts.bak_regress775
$ > .ssh/known_hosts
$ wc -c .ssh/known_hosts
0 .ssh/known_hosts

# 2. known_hosts 清空状态下查询集群状态
$ source wcl.env && gs_om -t status
-----------------------------------------------------------------------
cluster_name    : wcl0623
cluster_state   : Normal
redistributing  : No
-----------------------------------------------------------------------

# 3. 详细状态查询
$ gs_om -t status --detail
[   Cluster State   ]
cluster_state   : Normal
redistributing  : No
current_az      : AZ_ALL

[  Datanode State   ]
    node         node_ip         port      instance                          state
1  Testci044 20.20.20.224    15600      6001 /home/wcl0623/cluster/dn1   P Primary Normal
2  Testci045 20.20.20.226    15600      6002 /home/wcl0623/cluster/dn1   S Standby Normal
3  Testci046 20.20.20.228    15600      6003 /home/wcl0623/cluster/dn1   S Standby Normal

# 4. 恢复 known_hosts
$ mv .ssh/known_hosts.bak_regress775 .ssh/known_hosts

执行结果:known_hosts 清空(0 字节)后,gs_om -t status 及 detail 查询均正常显示集群 Normal、3 个实例正常,无 known_hosts 相关报错;恢复 known_hosts 后环境无残留。B018 OM 已屏蔽 known_hosts 异常对集群状态查询的影响。

likedislike
wuchenlongwuchenlong成员
8月13日 issue状态由 待回归 改变为 已验收
wuchenlongwuchenlong成员
8月13日 关闭了 issue