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.
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.
User should prepare the followings before setup shared data based xCAT HA management node:
- Two nodes with the same OS are ready, for example:
host1
andhost2
- Setup shared data location (for example
/HA
) accessible from bothhost1
andhost2
nodes are ready. - Prepare virtual IP, for example:
10.5.106.50
- Prepare the NIC that the virtual IP address attaches to, for example:
eth0:0
- Prepare virtual IP's hostname, for example:
hamn
- Optional net mask for virtual IP, default value is
255.255.255.0
- Optional database type, supported choices are
postgresql
ormariadb
orsqlite
, default ispostgresql
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
Copy xcatha.py on
host1
, executexcatha.py
to setup and configurehost1
usingVIP
andhostname
as xCAT standby MN:python xcatha.py -s -p /HA -v 10.5.106.50 -i eth0:0 -n hamn
Copy
xcatha.py
onhost2
, executexcatha.py
to setup and configurehost2
usingVIP` and ``hostname
as xCAT standby MN:python xcatha.py -s -p /HA -v 10.5.106.50 -i eth0:0 -n hamn
Activate
host1
as xCAT primary active MN:python xcatha.py -a -p /HA -v 10.5.106.50 -i eth0:0 -n hamn
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.
This Scenario can execute a planned failover.
Execute
xcatha.py
onhost1
to deactivatehost1
as non-active xcat MN node:python xcatha.py -d -v 10.5.106.50 -i eth0:0
Execute
xcatha.py
onhost2
to activatehost2
as active xcat MN node:python xcatha.py -a -p /HA -v 10.5.106.50 -i eth0:0 -n hamn
Reboot this xCAT MN node host1
, after it boots:
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.
if we cannot access to
host1
OSExecute
xcatha.py
onhost2
to activatehost2
as active xcat MN node:python xcatha.py -a -p /HA -v 10.5.106.50 -i eth0:0 -n hamn
Recommend recover
host1
.