High-Availability

nginx 的起搏器配置資源

  • August 10, 2017

我正在嘗試使用 virtualbox 由兩個 vm 建構集群我遵循本教程 http://www.tokiwinter.com/clustering-with-drbd-corosync-and-pacemaker/

並輸入如下命令

[root@node1 data]# crm configure primitive nginx_res ocf:heartbeat:nginx params configfile=/etc/nginx/nginx.conf httpd=/usr/sbin/nginx op monitor interval=60s timout=10s op start timeout=40s op stop timeout=60s
  error: unpack_resources:     Resource start-up disabled since no STONITH resources have been defined
  error: unpack_resources:     Either configure some or disable STONITH with the stonith-enabled option
  error: unpack_resources:     NOTE: Clusters with shared data need STONITH to ensure data integrity
Errors found during check: config not valid
ERROR: ocf:heartbeat:nginx: got no meta-data, does this RA exist?
ERROR: ocf:heartbeat:nginx: got no meta-data, does this RA exist?
ERROR: ocf:heartbeat:nginx: no such resource agent
Do you still want to commit (y/n)?

這些錯誤消息是否正常?按是後如何恢復?命令會做什麼?

——更新—–

[root@node2 ~]# crm ra list ocf heartbeat
CTDB            Delay           Dummy           Filesystem      IPaddr
IPaddr2         IPsrcaddr       LVM             MailTo          Route
SendArp         Squid           VirtualDomain   Xinetd          apache
conntrackd      dhcpd           ethmonitor      exportfs        mysql
named           nfsserver       pgsql           postfix         rsyncd
symlink         

1:你需要確定,資源代理就在那裡

/usr/lib/ocf/resource.d/heartbeat/nginx

2:我在你之前的輸出中沒有看到 nginx

3:我使用的是 Suse 11 Sp2,我安裝了 nginx,沒有使用額外的包

node01:~ # rpm -qf /usr/lib/ocf/resource.d/heartbeat/nginx
resource-agents-3.9.2-0.25.5

我知道 Redhat 已經刪除了很多資源代理,更多資訊,你可以使用 clusterlabs 郵件列表存檔

引用自:https://serverfault.com/questions/642086