Search Engine: Elastic

Article ID: 130194, created on Jan 20, 2017, last review on Aug 16, 2017

  • Applies to:
  • Operations Automation 7.0

General Info

This article contains instructions on how to migrate a PowerDNS service from CentOS 5 (RHEL 5) service node to new CentOS 7 (RHEL 7) service node.

A migration process includes a full backup and restore of the PowerDNS database. You can estimate total amount of time required for the migration as time of full database backup and restore plus time to complete “Update PowerDns server” tasks after migration. This time depends on the DNS database size, CPU utilization and intensity of DNS modifications during migration. For example:

DNS database size:

  • number of records in “domains” table: 2М
  • number of records in “records” table: 20M
  • backup size: 150M
  • backup size (unpacked): 1.5G

Migration time:

  • backup time: 2 min
  • start migration time: 1 min
  • re-register DNS node: 1 min
  • restore time: 10 min
  • finish migration time: 1 min
  • total estimated migration time: 15 min

Take to account also: time to configure IP on DNS node and time to complete “Update PowerDns server” tasks after migration.

Pre-requirements

  1. Migration is possible only for OSA 7.0.1
  2. Install mandatory HOTFIX 130329 PowerDNS v1
  3. Install mandatory HOTFIX 130570 PAU v18
  4. Prepare CentOS 7 node(s) for migration with temporary IP(s)
  5. Download migrate-powerdns-2.x.py to OA MN.
  6. Check sha1sum of migrate-powerdns-2.x.py file: d9b6348534924e2e4861533d98519c9b7047ace2

    # sha1sum migrate-powerdns-2.x.py
    

Check

  1. Execute on OA MN:

    # python migrate-powerdns-2.x.py --host-id={host_id} --check
    

    where:

    {host_id} - Host ID of CentOS 5 PowerDNS node
    

PowerDNS Database Lowercase Rules

  1. PowerDNS 3.x introduced new database rules for "domains" and "records" tables: CONSTRAINT c_lowercase_name CHECK (((name)::TEXT = LOWER((name)::TEXT)))
  2. If your old PowerDNS database contains records with uppercase symbols in the tables "domains" or "records", then "check" will fail and you need to update you records in the PowerDNS database with "lowercase" data.
  3. If your old PowerDNS database contains domains duplicates in the "domains" table, then remove domain duplicates with uppercase symbols from the "domains" table in the PowerDNS database.

MN Database IDN Data "Case Folding"

  1. If your MN database contains records with uppercase symbols in the table "dns_resource_records" in the column "idn_host" (IDN data without "case folding"), then "check" will fail and you need to update you records in the MN database with "lowercase" IDN data.

Migration

  1. Execute on OA MN:

    # python migrate-powerdns-2.x.py --host-id={host_id} --backup-and-migrate-start --backup-ip={backup_ip}
    

    where:

    {host_id} - Host ID of CentOS 5 PowerDNS node
    {backup_ip} - IP of CentOS 7 PowerDNS new node, accessible from OA MN node
    
  2. Replace CentOS 5 node with new CentOS 7 node with same IP(s): assign IP(s) and hostname from source node (CentOS 5) to the destination node (CentOS 7). Keep in mind, you will have to configure the IP addresses and interface names to the destination host as they are. That is, if the BackNet IP address of the source node is bound to the eth0 interface, then on the destination node the eth0 interface should also be configured for the BackNet IP.
  3. Reregister CentOS 7 node: PCP > Infrastructure > Service Nodes> <Node> > Summary > Reregister
  4. Complete all tasks that belong to migrated node (except failed DNS tasks).
  5. Execute on OA MN node:

    # python migrate-powerdns-2.x.py --host-id={host_id} --restore-and-migrate-finish
    

    where:

    {host_id} - Host ID of PowerDNS node
    

Post-processing

Complete all “Update PowerDns server” tasks that belong to migrated DNS server.

Cause

Resolution

0871c0b47b3b86ae3b1af4c2942cd0ce caea8340e2d186a540518d08602aa065 e12cea1d47a3125d335d68e6d4e15e07 5356b422f65bdad1c3e9edca5d74a1ae 1941880841f714e458ae4dc3d9f3062d

Email subscription for changes to this article
Save as PDF