梳理数仓FI manager节点健康检查逻辑
source link: https://juejin.cn/post/7087017664995917861
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
梳理数仓FI manager节点健康检查逻辑
本文分享自华为云社区《GaussDB(DWS) FI manager节点健康检查逻辑梳理》,作者:配音师。
一、相关背景
1.FI Manager作为运维系统,上面可以部署MPPDB、MRS等多种服务。各个服务,以MPPDB为例,又是多个节点组成的集群。Manager对这些节点及节点上的服务进程进行健康检查与问题上报,负责这块功能的服务叫做om-agent。
二、执行逻辑
1.om-agent有健康检查、ha检查等多项监控,本文以健康检查为例,om-agent启动一个ProcessHealthMonitorThread线程,定期检查om-agent所在节点上服务运行健康情况。
2.如ProcessHealthMonitorThread的每个检查线程,在configurations.xml配置文件中有如下图的一些配置项,包括检查所需执行的脚本路径、检查间隔周期等等。
3.每到间隔时间,就会调用如上图为例所配置的执行脚本,本文举例的MPPDB服务脚本中健康检查的命令为:gs_om -t status -h "{hostName}" | grep node_state | awk -F': ' '{print 2}'
4.如果以上检查发现服务进程异常,则会由om-agent发起restartProcess,重启该节点上的服务进程,实际调用mpp-stop.sh与mpp-start.sh脚本。
二、常见问题
1.健康检查会在分钟级的时间间隔进行检查,如果发现服务进程异常,下发重启命令。但是,一些后台故障场景,恢复所需时间很长,例如MPPDB的实例build常常需要以小时计。这时,触发om-agent的健康检查机制,会频繁重启后台进程,导致修复失败。
2.解决方法:备份脚本后,进行修改/opt/huawei/Bigdata/FusionInsight_MPPDB_8.0.0/install/FusionInsight-MPPDB-8.0.0/sbin/mpp-server-monitor.sh脚本,直接返回0,让om-agent跳过服务进程检查的逻辑。等待后台修复完成,再将脚本恢复。
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK