使起搏器重试失败的资源

Gar*_*vis 3 linux pacemaker linux-ha

我想让起搏器重新尝试启动我的资源

primitive Imq ocf:example:imq \
   op monitor on-fail="restart" interval="10s" \
   op start interval="0" timeout="60s" on-fail="restart" \
   meta failure-timeout="30s"
Run Code Online (Sandbox Code Playgroud)

请注意,此资源通过以下方式固定到第一个节点

location location_Imq Imq inf: vm1
location location_Imq1 Imq -inf: vm2
Run Code Online (Sandbox Code Playgroud)

目前,如果我破坏了阻止此资源启动失败计数的内容,则返回 INFINITY 并停止尝试重新启动服务。

我希望永远不会放弃资源,以便一旦间歇性问题自行清除,资源将重新启动并恢复服务。

在 CentOS 上使用起搏器 1.0。

Gar*_*vis 8

事实证明,解决方案非常简单,只需将 'start-failure-is-fatal' 设置为false.

crm configure property start-failure-is-fatal=false
Run Code Online (Sandbox Code Playgroud)

这是一个全局选项,因此它的默认值是true我失败的资源。

起搏器配置参考