我在Centos7上使用Pacemaker 1.1.13和Corosync 2.3.4。 我有一个主/从资源的问题。 有我的资源meta attrs: 迁移阈值= 1 失败超时= 10S 但是当资源宕机时,只有一次尝试启动它。 文档说,属性failure-timeout = 10s应该每10秒重置一次failcount,但是这并没有发生,所以资源永远不会启动。 你知道这个问题吗? 也许我做错了什么? 我正在发送下面的“电脑状态”: Cluster Name: webcluster Corosync Nodes: 10.121.100.101 10.121.100.102 Pacemaker Nodes: pm-node1 pm-node2 Resources: Master: Services-master Meta Attrs: failure-timeout=10s Group: Services Meta Attrs: migration-threshold=1 Resource: Test (class=ocf provider=scooty type=test) Operations: start interval=0s timeout=20 (Test-start-interval-0s) stop interval=0s timeout=20 (Test-stop-interval-0s) monitor interval=10 […]
我正在两台服务器(CentOS 6.5)上通过Corosync / Pacemaker与HAbuild立PostgreSQL复制。 我的软件信息: postgresql91-9.1.19-1PGDG.rhel6.x86_64 postgresql91-server-9.1.19-1PGDG.rhel6.x86_64 postgresql91-libs-9.1.19-1PGDG.rhel6.x86_64 postgresql91-contrib-9.1.19-1PGDG.rhel6.x86_64 postgresql91-devel-9.1.19-1PGDG.rhel6.x86_64 corosynclib-1.4.7-2.el6.x86_64 corosync-1.4.7-2.el6.x86_64 pacemaker-cli-1.1.12-8.el6_7.2.x86_64 pacemaker-1.1.12-8.el6_7.2.x86_64 pacemaker-cluster-libs-1.1.12-8.el6_7.2.x86_64 pacemaker-libs-1.1.12-8.el6_7.2.x86_64 resource-agents-3.9.5-24.el6_7.1.x86_64 复制正在工作,从主人我可以看到从属服务器连接: -bash-4.1$ psql -c "select client_addr,sync_state from pg_stat_replication;" client_addr | sync_state ————-+———— 172.16.1.10 | async (1 row) 而且我也确认在master上创build的数据被复制到slave。 这里是我的crm configure show : node master node slave primitive PSQL pgsql \ params restart_on_promote=true pgctl="/usr/pgsql-9.1/bin/pg_ctl" psql="/usr/pgsql-9.1/bin/psql" pgdata="/var/lib/pgsql/9.1/data" node_list="master slave" repuser=rep […]
build立 我正在使用Corosync / Pacemaker受pipe群集中的两台物理服务器为Web应用程序设置HA群集。 在发现我的方向错误之后 ,我决定使用心跳捆绑的MySQL资源代理来pipe理群集中的MySQL实例。 目前,从node1 (当前主机 )到node2 (当前从机 )有一个工作主/从configuration。 现在我想让Pacemakerpipe理我的MySQL实例,以便它可以提升/降级主控或从属。 根据这个(旧的)wiki页面 ,我应该能够通过这样做来实现设置: primitive p_mysql ocf:heartbeat:mysql \ params binary="/usr/sbin/mysqld" \ op start timeout="120" \ op stop timeout="120" \ op promote timeout="120" \ op demote timeout="120" \ op monitor role="Master" timeout="30" interval="10" \ op monitor role="Slave" timeout="30" interval="20" ms ms_mysql p_mysql \ meta clone-max=3 正如你所看到的,我做了第二个op […]
在一个shell脚本中,我们目前调用/usr/sbin/pcs status cluster ,然后用grep -qE查找'Current DC:.*partition with quorum' grep -qE 'Current DC:.*partition with quorum'来确定集群是否正常。 我想知道是否有一个更快的方法,因为pcs status cluster查询所有节点的PCSD状态,这需要时间,大约一秒半,我想做这个检查之前做某些操作是要经常做。 pcs status nodes both并计算在线节点的数量是同样好决定如果群集没有问题? 这大约需要2秒钟: pcs status cluster 2>&1 | grep -qE 'Current DC:.*partition with quorum' pcs status cluster 2>&1 | grep -qE 'Current DC:.*partition with quorum' 这需要约0.2秒: pcs status nodes both | grep -cE 'Online: [az]+ [az]+ […]
我使用Corosync / Pacemaker和nginx作为反向代理build立了双节点群集(主动/被动)。 OS是RHEL7,目前该机器只有一个networking接口。 我configuration了两个资源: cluster-vip共享虚拟IP 反向代理 nginx 这里是两个资源的声明: pcs resource create cluster-vip ocf:heartbeat:IPaddr2 ip=192.168.0.1 cidr_netmask=24 op monitor interval=30s pcs resource create reverse-proxy systemd:nginx op monitor interval=5s meta failure-timeout=60s pcs constraint colocation add reverse-proxy with cluster-vip INFINITY pcs constraint order cluster-vip then reverse-proxy 昨天,我发现了一个意外的行为,而networking捕获。 与客户端通信时,主动节点使用虚拟IP地址(192.168.0.1)。 与位于内部networking的Web服务器进行通信时,它将使用接口的主IP地址而不是vip(取决于活动节点的192.168.0.2或192.168.0.3)。 因此,我不得不在我的防火墙上创build两个不同的规则(一个用于node1,另一个用于node2),而不是只允许vip与Web服务器通信。 我打算将其他节点添加到群集中,而不必一个一个地允许每个节点,只是一次性允许VIP。 这种行为是否有合理的解释? 有没有办法告诉起搏器只使用VIP? 这是一个好习惯吗? 我不想做任何愚蠢的事情,所以如果你认为我不应该这样做,我会很高兴听到为什么。 问候
我正在为apache / mysql的高可用性解决scheme工作,并且我要带着起搏器和corosync路由去DRBD …我似乎遇到了让我的corosync服务看到其他服务器的问题。 我使用的是Corosync 1.4,感觉版本1.3支持单播。 让我们打电话给我的EC2服务器HA1和HA2 HA1 – 10.244.19.47 HA2 – 10.196.55.173 ——- corosyncconfiguration—– totem { version: 2 secauth: off interface { member { memberaddr: 10.244.19.47 } member { memberaddr: 10.196.55.173 } ringnumber: 0 bindnetaddr: 10.0.0.0 mcastport: 5405 ttl: 1 } transport: udpu } 我认为这个问题是bindnetaddr的价值,我不知道什么地址input感HA1和HA2在不同的子网。 在日志中我看到这个: Aug 31 13:12:57 corosync [TOTEM ] A processor […]
我试图configuration一个configuration文件的起搏器(我可以自动生成,然后要求起搏器“重新加载”)。 但是我所看到的所有例子都是针对命令行命令或交互式编辑器的。 (我正在运行Ubuntu)。 命令行方法是这样的 : crm configure primitive VIP ocf:IPaddr2 params ip=10.0.2.200 nic=eth0 op monitor interval=10s 虽然交互模式是这样的 : sudo crm configure And then we add the res_ip resource: crm(live)configure# primitive res_ip ocf:heartbeat:IPaddr2 params ip="102.169.122.254" cidr_netmask="24" nic="eth0" crm(live)configure# commit crm(live)configure# exit 但我想要一个静态configuration文件,我可以更新和重新加载。 像心跳使用的/etc/ha.d/haresources文件。 这是可能吗?
我已经成功地在centos7上使用pacemaker和corosync设置了HA集群,并且我也能够添加和启动资源。 其中一个资源是tomcat的一个实例,在当前的configuration中运行正常。 我唯一的问题是,tomcat正在以root用户身份运行。 我希望tomcat资源作为非root用户启动。 我一直在阅读文档,但我还没有find任何东西。 谁能在这里看到,如果他们有这个解决scheme? 提前致谢。
我无法弄清楚如何configuration第二个简单的法定人数的双节点安装程序。 似乎认为所有的节点都有能力作为一个完整的后备节点,当我只想要一个与STONITH的法定数量工作时,本质上是一个2 + 1 DRBD-MySQL节点系统。 任何关于如何使第三节点只是法定成员的技巧或文档,将不胜感激。
在Centos 5和Centos 6之间configurationpacemaker + corosync时遇到一些麻烦。这里是crm_mon的输出: 在node1上: Last updated: Sun Jul 21 19:02:21 2013 Last change: Sun Jul 21 18:14:48 2013 via crmd on svr077-53149.localdomain Stack: openais Current DC: svr077-53149.localdomain – partition WITHOUT quorum Version: 1.1.8-2.el5-394e906 2 Nodes configured, 2 expected votes 1 Resources configured. Online: [ svr077-53149.localdomain ] OFFLINE: [ svr423L-2737.localdomain ] Crond (lsb:crond): Started […]