Article ID: 130194, created on Jan 20, 2017, last review on Apr 14, 2017

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: dd0fb9240c9a88e83f6c758ab2ab0cef0c4a7be9

    # 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.

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 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).
  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

Email subscription for changes to this article
Save as PDF