2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2024-11-21 17:11:52 +00:00
6 Test Design of HA
Yuan Bai edited this page 2018-08-29 14:09:11 +08:00

The Design of HA automated test

Pre-requirements:

  1. xcatmn1 is xcat MN and HA control node
  2. xcatha1 and xcatha2 are 2 HA MN nodes
  3. xcatcn is compute node managed by xcatha1 and xcatha2, it is used to test provision

Test cases:

test case file and other useful files(cfgha_mn and hosts file) are kept under /opt/xcat/share/xcat/tools/autotest/testcase/HA

Test case1: setup_2_new_HA_MN

Test case2: configure_exist_xCAT_MN_to_HA_MN

Test case1:setup_2_new_HA_MN

  1. download xcatha.py, copy xcatha.py and cfgha_mn into /install/postscripts
  2. backup xcatha1 and xcatha2 node definition
  3. backup osimage definition rhels7.4-ppc64le-install-compute
  4. create /opt/xcat/share/xcat/tools/autotest/testcase/HA/hosts, contains:
    • 2 HA nodes physical IP
    • VIP and hostname
    • control node
  5. customize diskful osimage rhels7.4-ppc64le-install-compute, add /opt/xcat/share/xcat/tools/autotest/testcase/HA/hosts in synclists
  6. Modify xcatha1 and xcatha2 postbootscripts, configure physical ip as static IP using confignetwork -s, add cfgha_mn in postbootscripts
chdef <xcatha> -p postbootscripts="confignetwork -s,cfgha_mn -l <nfs_server>:<shared_data_dir> -i <vip> -x s"
  1. provison xcatha1 as standby HA MN node
  2. provision xcatha2 as standby HA MN node
  3. activate xcatha1 as primary HA MN
  4. import diskless osimage from xcatmn1
  5. define xcatcn in xcatha1
  6. provision diskless xcatcn in xcatha1
  7. deactivate xcatha1 as standby HA MN
  8. activate xcatha2 as primary HA MN
  9. provision diskless xcatcn in xcatha2
  10. restore environment

Test case2:configure_exist_xCAT_MN_to_HA_MN

  1. download xcatha.py, copy xcatha.py and cfgha_mn into /install/postscripts
  2. backup xcatha1 and xcatha2 node definition
  3. backup osimage definition rhels7.4-ppc64le-install-compute
  4. create /opt/xcat/share/xcat/tools/autotest/testcase/HA/hosts, contains: 2 HA nodes physical IP, VIP and hostname, control node
  5. customize diskful osimage rhels7.4-ppc64le-install-compute, add /opt/xcat/share/xcat/tools/autotest/testcase/HA/hosts in synclists
  6. Modify xcatha1 and xcatha2 postbootscripts, configure physical ip as static IP using confignetwork -s
  7. provision diskfull xcatha1 and xcatha2
  8. install xCAT in xcatha1 and xcatha2
  9. configure xcatha1 and xcatha2 as standby HA MN nodes
updatenode <xcatha> -p postbootscripts="cfgha_mn -l <nfs_server>:<shared_data_dir> -i <vip> -x s"
  1. activate xcatha1 as primary HA MN
  2. import diskless osimage from xcatmn1 in xcatha1
  3. define xcatcn in xcatha1
  4. provision diskless xcatcn in xcatha1
  5. deactivate xcatha1 as standby HA MN
  6. activate xcatha2 as primary HA MN
  7. provision diskless xcatcn in xcatha2
  8. restore environment