Steps to migration a existing zones to new Regions in 4.2

Pre-condition: MS should be on 4.2 version

  • Verify that MS is on version 4.2
  • Verify that region end_point is not localhost. (Use updateRegion API to set correct IP)
  • Install 4.2 MS in the remaining Regions
    • Set the region_id while installing the DB
    • cloud-setup-databases cloud:<dbpassword>@localhost --deploy-as=root:<password> -e <encryption_type> -m <management_server_key> -k <database_key-r <region_id>
  • Add all new regions to region 1 using addRegion API
  • Disable all the zones in region 1
  • Stop all MS
  • Dump region 1 DB
    • mysqldump -u cloud -p -h <region1_db_host> cloud  > region1.sql
  • Copy region 1 DB to other regions
    • mysql -u cloud -p -h <region2_db_host> cloud < region1.sql
  • In each Region, delete all zones from the DB which are not supposed to be in that region using zone delete script. e.g if zone 2 is moved to region2, it has to be deleted from region1 using the script
    • $ ./zone_delete.sh -h
      Usage: [-d] [-u] [-p] [-z]
       
       -d - cloud DB server ip address, defaulted to localhost if not specified 
       -u - user name to access cloud DB, defaulted to cloud if not specified 
       -p - cloud DB user password, defaulted to cloud if not specified 
       -z - zone id 
       
      Example: zone_delete.sh -dlocalhost -ucloud -pcloud -z1
  • Start all management servers. At this point all regions contain only the desired zones
  • In each new Region, update "host" param in global settings and set the correct mgmt server IP.
  • Restart mgmt server (to avoid restart, set mgmt server IP in DB directly mysql>update cloud.configuration set value = '<mgmt_server_ip>' where name = 'host' )
  • Enable zones in the required regions
  • Destroy CPVM and SSVM in each zone, so that they will be recreated

Limitation:Zone migration currently does not support zones with KVM hosts

  • No labels