Skip to content

Latest commit

 

History

History
86 lines (47 loc) · 3.73 KB

README.rst

File metadata and controls

86 lines (47 loc) · 3.73 KB

This documentation illustrates how to use xcatha.py script to setup xCAT primary and standby management nodes to provide high availability management capability, using shared data between the two management nodes.

xCAT ships a script xcatha.py to setup a xCAT HA management node and execute failover.

User Scenarios

Use case

As a xCAT user, I have host1 and host2 with the same shared data directory, I want to configure xCAT HA management nodes.

The following scenarios are examples to setup/failover xCAT HA management nodes.

Pre-requirements for User

User should prepare the followings before setup shared data based xCAT HA management node:

  1. Two nodes with the same OS are ready, for example: host1 and host2
  2. Setup shared data location (for example /HA) accessible from both host1 and host2 nodes are ready.
  3. Prepare virtual IP, for example: 10.5.106.50
  4. Prepare the NIC that the virtual IP address attaches to, for example: eth0:0
  5. Prepare virtual IP's hostname, for example: hamn
  6. Optional net mask for virtual IP, default value is 255.255.255.0
  7. Optional database type, supported choices are postgresql or mariadb or sqlite, default is postgresql

Setup xCAT HA Management Node

This section use xcatha.py to setup xCAT HA management node.

host1 is installed as xCAT primary MN, host2 is installed as xCAT standby MN. They can access xcat.org

  1. Copy xcatha.py on host1, execute xcatha.py to setup and configure host1 using VIP and hostname as xCAT standby MN:

    python xcatha.py -s -p /HA -v 10.5.106.50 -i eth0:0 -n hamn
    
  2. Copy xcatha.py on host2, execute xcatha.py to setup and configure host2 using VIP` and ``hostname as xCAT standby MN:

    python xcatha.py -s -p /HA -v 10.5.106.50 -i eth0:0 -n hamn
    
  3. Activate host1 as xCAT primary active MN:

    python xcatha.py -a -p /HA -v 10.5.106.50 -i eth0:0 -n hamn
    

Failover

There are two kinds of failover, planned failover and unplanned failover. In a planned failover, you can do necessary cleanup work on the previous primary management node before failover to the previous standby management node. In a unplanned failover, the previous management node probably is not functioning at all, you can simply shutdown the system.

This section use xcatha.py to failover activate|deactivate the primary|standby MN node.

Planned failover: active xCAT MN host1 has problems, but OS is still accessible

This Scenario can execute a planned failover.

  1. Execute xcatha.py on host1 to deactivate host1 as non-active xcat MN node:

    python xcatha.py -d -v 10.5.106.50 -i eth0:0
    
  2. Execute xcatha.py on host2 to activate host2 as active xcat MN node:

    python xcatha.py -a -p /HA -v 10.5.106.50 -i eth0:0 -n hamn
    

Unplanned failover: active xCAT MN host1 is not accessible

Reboot this xCAT MN node host1, after it boots:

  1. if we can access to its OS, we can execute a planned failover, the steps are the same with above Secenairo 1: active xCAT MN host1 is broken and we can access to its OS.

  2. if we cannot access to host1 OS

    1. Execute xcatha.py on host2 to activate host2 as active xcat MN node:

      python xcatha.py -a -p /HA -v 10.5.106.50 -i eth0:0 -n hamn
      
    2. Recommend recover host1.