就绪探针失败:/usr/local/bin/status-probe.sh检查失败:systemctl -q is-active glusterd.service

时间:2019-10-25 14:18:47

标签: kubernetes glusterfs

我已经使用gk-deploy脚本遵循了setup guide

./gk-deploy.sh --admin-key xxxx --user-key xxx -v -g

一切正常。但是,部署的容器失败

Readiness probe failed: /usr/local/bin/status-probe.sh failed check: systemctl -q is-active glusterd.service 

该节点上的glusterd.service正在运行:

$ systemctl status glusterd
● glusterd.service - GlusterFS, a clustered file-system server
   Loaded: loaded (/lib/systemd/system/glusterd.service; enabled; vendor preset: enabled)
   Active: active (running) since Sat 2019-10-19 18:48:25 CEST; 1 day 17h ago
     Docs: man:glusterd(8)
  Process: 939 ExecStart=/usr/sbin/glusterd -p /var/run/glusterd.pid --log-level $LOG_LEVEL $GLUSTERD_
 Main PID: 955 (glusterd)
    Tasks: 10 (limit: 4915)
   Memory: 30.5M
   CGroup: /system.slice/glusterd.service
           └─955 /usr/sbin/glusterd -p /var/run/glusterd.pid --log-level INFO
....

GLUSTER_BLOCKD_STATUS_PROBE_ENABLE设置为“ 0”

我知道this post,但并不能真正帮助我解决问题

1 个答案:

答案 0 :(得分:0)

让我们尝试使用更简单的就绪探针来诊断问题。考虑到此检查失败,我将运行以下脚本来确保服务确实正常。

systemctl -q is-active glusterd.service
if [[ $? -eq 0 ]]; then 
  exit 0;
else 
  exit 1;
fi;

检查日志没有意义,因为systemctl将为我们提供必要的退出代码。