nginx 的 pacemaker 配置资源

nginx 的 pacemaker 配置资源

我正在尝试使用 virtualbox 通过两个虚拟机构建集群,我遵循本教程 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

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 邮件列表存档

相关内容