0

我有 2 个节点起搏器的设置,它有 2 个资源类型的 VIPocf::heartbeat:IPaddr2

VIP1:此 VIP 预计不会自动故障转移,因此此资源类型不受管理

VIP2:此 VIP 预计会自动故障转移,因此保持托管状态

问题:我们遇到了 3 分钟的网络问题,在这种情况下

VIP1:我们用于 VIP1 的 vip 已为主机释放,即使网络修复后也没有自动返回,资源被标记为已停止,因此我们用于 VIP1 的 ip 在 host1 或 host2 上都不存在。

VIP2:在这种情况下,ip 回到节点上,资源也重新启动。

即使资源不受管理,我们也不希望资源 VIP1 释放 IP。

`[root@osboxes1 ~]# pcs config
 Cluster Name: test-cluster
 Corosync Nodes:
 osboxes1 osboxes
 Pacemaker Nodes:
 osboxes osboxes1

 Resources:
 Resource: VIP2 (class=ocf provider=heartbeat type=IPaddr2)
 Attributes: ip=192.168.50.54 nic=enp0s3:2 cidr_netmask=19
 Operations: start interval=0s timeout=20s (VIP2-start-interval-0s)
 stop interval=0s timeout=20s (VIP2-stop-interval-0s)
 monitor interval=20s (VIP2-monitor-interval-20s)
 Resource: VIP1 (class=ocf provider=heartbeat type=IPaddr2)
 Attributes: ip=192.168.50.53 nic=enp0s3:1 cidr_netmask=19
 Meta Attrs: is-managed=false
 Operations: start interval=0s timeout=20s (VIP1-start-interval-0s)
 stop interval=0s timeout=20s (VIP1-stop-interval-0s)
 monitor interval=20s (VIP1-monitor-interval-20s)

 Stonith Devices:
 Fencing Levels:

 Location Constraints:
 Resource: VIP1
 Enabled on: osboxes (score:50) (id:location-VIP1-osboxes-50)
 Resource: VIP2
 Enabled on: osboxes1 (score:50) (id:location-VIP2-osboxes1-50)
 Ordering Constraints:
 Colocation Constraints:
 Ticket Constraints:

 Alerts:
 No alerts defined

 Resources Defaults:
 resource-stickiness: 100
 Operations Defaults:
 No defaults set

 Cluster Properties:
 cluster-infrastructure: corosync
 cluster-name: test-cluster
 dc-version: 1.1.15-11.el7_3.4-e174ec8
 have-watchdog: false
 no-quorum-policy: ignore
 stonith-enabled: false

 Quorum:
 Options:`
4

1 回答 1

0

As far as I get your setup correctly, try to remove VIP1 resource completely from cluster, cause there is no point of adding it to cluster cause your cluster doesn't manage it.

 Resource: VIP1 (class=ocf provider=heartbeat type=IPaddr2)
 Attributes: ip=192.168.50.53 nic=enp0s3:1 cidr_netmask=19
 Meta Attrs: is-managed=false
于 2017-12-20T16:16:04.590 回答