心脏起搏器:添加自定义资源



我正在尝试在 CentOS7 上使用 Pacemaker 创建一个 HA 集群。 所需的资源之一是自定义服务。我有一个符合 LSB 的初始化脚本,我已经放入/etc/init.d 中,并在运行时列出了它:

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,它们以类似的方式添加,没有错误。

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

事实证明,与心跳不同,在 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

最新更新