Example XML configurations

From ClusterLabs

Jump to: navigation, search

All examples share these crm nodes config

    <crm_config>
       <cluster_property_set id=cib-bootstrap-options>
         <nvpair id=option-1 name=symmetric-cluster value=false/>
         <nvpair id=option-2 name=no-quorum-policy value=stop/>
         <nvpair id=option-3 name=stonith-enabled value=false/>
       </cluster_property_set>
     </crm_config>
     <nodes>
       <node id=8323c40f-76eb-4187-8c44-51547dc5cd73 uname=jaba.failover.net type=normal/>
       <node id=8405b0df-9044-477f-94fa-412e0e071b94 uname=joda.failover.net type=normal/>
     </nodes>

Failover IP

cib
  configuration
    crm_config/
    nodes/
    resources
      primitive id=failover-ip class=ocf provider=heartbeat type=IPaddr
        operations
          op id=failover-ip-monitor name=monitor interval=10s/
        /operations
        instance_attributes id=failover-ip-attribs
          nvpair id=failover-ip-addr name=ip value=85.9.12.3/
        /instance_attributes
     /primitive
    /resources
  /configuration
  status/
/cib

Failover IP + One service

cib
  configuration
    crm_config/
    nodes/
    resources
      primitive class=ocf id=failover-ip provider=heartbeat type=IPaddr
        instance_attributes id=failover-ip-instance_attributes
          nvpair id=failover-ip-instance_attributes-ip name=ip value=85.9.12.3/
        /instance_attributes
        operations id=failover-ip-ops
          op id=failover-ip-montor-10s interval=10s name=montor/
        /operations
      /primitive
      primitive class=lsb id=failover-apache type=apache
        operations id=failover-apache-ops
          op id=failover-apache-montor-15s interval=15s name=montor/
        /operations
      /primitive
    /resources
  /configuration
  status/
/cib

Failover IP Service in a Group

cib
  configuration
    crm_config/
    nodes/
    resources
      group id=my_web_cluster
        primitive class=ocf id=failover-ip provider=heartbeat type=IPaddr
          instance_attributes id=failover-ip-instance_attributes
            nvpair id=failover-ip-instance_attributes-ip name=ip value=85.9.12.3/
          /instance_attributes
          operations id=failover-ip-ops
            op id=failover-ip-montor-10s interval=10s name=montor/
          /operations
        /primitive
        primitive class=lsb id=failover-apache type=apache
          operations id=failover-apache-ops
            op id=failover-apache-montor-15s interval=15s name=montor/
          /operations
        /primitive
      /group
    /resources
  /configuration
  status/
/cib
Personal tools