Shared data based xCAT MN HA user case - xcat2/xcat-core GitHub Wiki
The shared data based xCAT MN HA user case
As a xCAT user, I have host1 and host2 with the same shared data directory, I want to configure xCAT management node HA rapidly.
Pre-requirements for User:
host1 host2
Shared data directory
The nic that the virtual ip address attaches to
Virtual IP
Net mask
1. setup 2 xCAT MN nodes
There are 2 scenarios:
Scenario 1 xCAT is not installed on 2 xCAT MN nodes
host1 is installed as xCAT primary MN, host2 is installed as xCAT standby MN
- Install xCAT on xCAT standby MN host2 using VIP/its hostname, details:
- configure VIP and its hostname
- make symbolic link to share data directories
/install -> /HA-data/install /etc/xcat ->/HA-data/etc/xcat /root/.xcat -> /HA-data/root/.xcat /var/lib/pgsql -> /HA-data/var/lib/pgsql /tftpboot -> /HA-data/tftpboot
- install xCAT
- Switch DB to required type as needed
- Deactivate xCAT standby MN host2 ---> details refer to section 1 in "failover scenario 1"
- Install host1 as active xcat primary MN using VIP and its hostname, details steps:
- configure VIP and its hostname
- make symbolic link to share data directories
/install -> /HA-data/install /etc/xcat ->/HA-data/etc/xcat /root/.xcat -> /HA-data/root/.xcat /var/lib/pgsql -> /HA-data/var/lib/pgsql /tftpboot -> /HA-data/tftpboot
- install xCAT
Scenario 2 user uses host1 as xCAT MN, he wants to add another new node host2 as xCAT standby MN node
- The original xCAT MN host1 ip becomes virtual IP, user should add another new IP for host1,
- User should deactivate xCAT MN host1, deactivte virtual ip and its hostname
- User installs host2 as a xCAT standby MN using VIP and its hostname, then deactivate xCAT standby MN host2
- User activate host1 as xCAT primary MN
- Configure all related service stop from starting on reboot on both 2 nodes
2. Different failover scenarios:
failover scenario 1
when active xCAT MN host1 is broken and we can access to its OS
- I use deactivate-xcatmn to make host1 as non-active xcat MN node
- make sure all related services as followings are down, make sure all related services are configured stop from starting on reboot
- console service
- DHCP service
- named service
- xcatd
- database (mysql/postgresql/sqlite type)
- umount/un-link shared data directories on host1
- change hostname if needed
- remove virtual IP
- make sure all related services as followings are down, make sure all related services are configured stop from starting on reboot
- I use activate-xcatmn to configure host2 as active xcat MN node
- make sure virtual ip is not used (ping), or else, exit
- add virtual ip into its nic
- set hostname to virtual ip hostname
- check if current DB type is matched, if not, exit and clean up env
- make symbolic link to share data directories, for example:
/install -> /HA-data/install /etc/xcat ->/HA-data/etc/xcat /root/.xcat -> /HA-data/root/.xcat /var/lib/pgsql -> /HA-data/var/lib/pgsql /tftpboot -> /HA-data/tftpboot
- start/re-configure all related services as followings:
- database (mysql/postgresql/sqlite type)
- xcatd
- named service (makedns -n)
- DHCP service (makedhcp -n, makedhcp -a)
- Console Server
- ... ...
failover scenario 2
when active xCAT MN host1 is broken and we cannot access to its OS, restart this xCAT MN node host1, after it reboots:
-
if we can access to its OS
- do the same with failover scenario 1
-
if we cannot access to host1 OS, un-plugin its network cable.
- use activate-xcatmn to configure host2 as active xcat MN node, the same as section 2 in failover scenario 1
- Recommend to fix host1 OS or hardware.