这是问题继续。
所以,我有一个vlan中的两个testing服务器。
srv1 eth1 10.10.10.11 eth2 10.20.10.11 srv2 eth1 10.10.10.12 eth2 10.20.10.12 Cluster VIP - 10.10.10.100
具有两个接口的Corosyncconfiguration:
rrp_mode: passive interface { ringnumber: 0 bindnetaddr: 10.10.10.0 mcastaddr: 226.94.1.1 mcastport: 5405 } interface { ringnumber: 1 bindnetaddr: 10.20.10.0 mcastaddr: 226.94.1.1 mcastport: 5407 }
起搏器configuration:
# crm configure show node srv1 node srv2 primitive P_INTRANET ocf:pacemaker:ping \ params host_list="10.10.10.11 10.10.10.12" multiplier="100" name="ping_intranet" \ op monitor interval="5s" timeout="5s" primitive cluster-ip ocf:heartbeat:IPaddr2 \ params ip="10.10.10.100" cidr_netmask="24" \ op monitor interval="5s" primitive ha-nginx lsb:nginx \ op monitor interval="5s" clone CL_INTRANET P_INTRANET \ meta globally-unique="false" location L_CLUSTER_IP_PING_INTRANET cluster-ip \ rule $id="L_CLUSTER_IP_PING_INTRANET-rule" ping_intranet: defined ping_intranet location L_HA_NGINX_PING_INTRANET ha-nginx \ rule $id="L_HA_NGINX_PING_INTRANET-rule" ping_intranet: defined ping_intranet location L_INTRANET_01 CL_INTRANET 100: srv1 location L_INTRANET_02 CL_INTRANET 100: srv2 colocation nginx-and-cluster-ip 1000: ha-nginx cluster-ip property $id="cib-bootstrap-options" \ dc-version="1.1.6-9971ebba4494012a93c03b40a2c58ec0eb60f50c" \ cluster-infrastructure="openais" \ expected-quorum-votes="2" \ no-quorum-policy="ignore" \ stonith-enabled="false"
而现在,我模拟eth1上的数据包丢失:
# tc qdisc add dev eth1 root netem delay 200ms 500ms 75% loss 42% 75% duplicate 1% corrupt 0.1% reorder 25% 50%
之后,起搏器每分钟更换几次主动节点,没有任何工作正常。
当15%左右的时候,如何监控丢包和交换节点?
有这个解决scheme吗? 或者我需要编写新的资源代理来监视它自己?