大网数据广告活动
服务器运维问答

Edit HA cluster config cib.xml

· 52CE 我爱测

I want to edit pingd of my cluster config living on centos 6.5 because the addresses are no longer valid and my cluster always switching to the other node because of the failed nodes.What is the best way to do it.I know i must ne…

问题原文

原帖链接 · aleksei stukov · CC BY-SA 3.0

I want to edit pingd of my cluster config living on centos 6.5 because the addresses are no longer valid and my cluster always switching to the other node because of the failed nodes.What is the best way to do it.I know i must never open directly the cib.xml file.

[root@PBX1 mojo]# pcs config
Cluster Name: pbx
Corosync Nodes:
 pbx1 pbx2
Pacemaker Nodes:
 pbx1 pbx2

Resources:
 Master: master_drbd
  Meta Attrs: master-max=1 master-node-max=1 clone-max=2 clone-node-max=1 notify=true
  Resource: drbd_drbd0 (class=ocf provider=linbit type=drbd)
   Attributes: drbd_resource=drbd0
   Operations: monitor interval=10s (drbd_drbd0-monitor-interval-10s)
 Clone: Connectivity
  Resource: p_ping (class=ocf provider=pacemaker type=ping)
   Attributes: host_list="10.66.4.4 10.66.4.5 10.66.4.11 10.66.4.252 10.66.4.253 10.66.4.254" multiplier=1000 dampen=5s
   Operations: monitor interval=1s (p_ping-monitor-interval-1s)
 Group: PBX_IP
  Resource: ClusPBXIP (class=ocf provider=heartbeat type=IPaddr2)
   Attributes: ip=10.66.6.200 nic=bond0.2 cidr_netmask=24
   Operations: monitor interval=30s (ClusPBXIP-monitor-interval-30s)
  Resource: ClusNetIP (class=ocf provider=heartbeat type=IPaddr2)
   Attributes: ip=10.66.5.203 nic=bond0.3 cidr_netmask=24
   Operations: monitor interval=30s (ClusNetIP-monitor-interval-30s)
  Resource: ClusPBXIP-R (class=ocf provider=heartbeat type=Route)

I want to change the host list with another IPs.Any idea which is the best and safe way to do it?I'm i right that i must change in cib.xml not in any other place? 10x

已采纳解答

原帖链接 · Matt Kereczman · CC BY-SA 3.0

You're definitely correct in saying you don't want to edit the cib.xml directly.

Since you're using pcs to manage your cluster configuration, you should do it like this:

Dump the current cib to a file:

# pcs cluster cib cib-to-fix.txt

Open the file in whatever editor you like and make the appropriate changes to the host_list parameter:

# vi ./cib-to-fix.txt

Once you're happy with your changes, validate and push them back into the cluster:

# pcs cluster verify cib-to-fix.txt
# pcs cluster cib-push cib-to-fix.txt

If you get any errors running the verify, then you've introduced a syntax error in the cib, and should fix and re-verify before pushing.

Hope that helps!

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2017-10-09)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 3.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。