Edit HA cluster config cib.xml

6,091

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!

Share:
6,091

Related videos on Youtube

Aleksandar Nachev
Author by

Aleksandar Nachev

Updated on September 18, 2022

Comments

  • Aleksandar Nachev
    Aleksandar Nachev almost 2 years

    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

  • brownian
    brownian about 6 years
    Shame on me but +1 for verify. Thanks)
  • Chaminda Bandara
    Chaminda Bandara over 4 years
    @brownian What is the meaning of but +1 for ?
  • brownian
    brownian over 4 years
    @ChamindaBandara probably i should write "however" instead of "but". Not sure thought.