起搏器:添加自定义资源
问题描述:
我想在CentOS7上用Pacemaker创建一个HA群集。 需要的资源之一是自定义服务。我有我已经投入/etc/init.d中的LSB兼容的init脚本,我已经运行时,它列出:起搏器:添加自定义资源
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