Pacemaker:添加自定义资源

Pacemaker: adding custom resource

我正在尝试在 CentOS7 上使用 Pacemaker 创建 HA 集群。 所需资源之一是定制服务。我有一个符合 LSB 的初始化脚本,我已将其放入 /etc/init.d,并且在 运行ning:

时列出了它
pcs resource agents lsb:heartbeat

当我尝试使用

添加资源时
pcs resource create MyServer lsb:heartbeat:MyServer target_role=started resource_failure_stickiness=-INFINITY op monitor interval=30s op start timeout=180s op stop timeout=180s op status timeout=15 --group AllResources

我得到的错误:

Error: Unable to create resource 'lsb:heartbeat:MyServer', it is not installed on this system (use --force to override)

如果我 运行 使用 --force,我会得到以下结果:

Call cib_replace failed (-203): Update does not conform to the configured schema

组 AllResources 有另外两个资源:Ping 和 IPAddr2,以类似的方式添加,没有错误。

我错过了什么?有人遇到过这样的事情吗?

事实证明,与 Heartbeat 不同,在 Pacemaker 中,我们处理自定义 LSB 脚本的形式是 lsb:MyServer。 工作命令将是:

pcs resource create MyServer lsb:MyServer target_role=started resource_failure_stickiness=-INFINITY op monitor interval=30s op start timeout=180s op stop timeout=180s op status timeout=15 --group AllResources