2017-07-18 132 views
0

我想在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,它們以類似的方式添加,沒有錯誤。

我錯過了什麼?任何人都面臨這樣的事情?

回答

1

原來,與心跳不同,在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