Change DNS service node IP

Discussion in 'Plesk Automation Suggestions and Feedback' started by SteveITS, Aug 29, 2016.

  1. SteveITS

    SteveITS Mega Poster

    Messages:
    220
    Hi, we will shortly need to move a DNS service node to a new service, so it will have a new IP. We would prefer to keep the same DNS server hostname. Is the below method acceptable?

    1) delete the old service node from PPA (we have two others)
    2) add the new server as a new DNS service node with the same hostname
    3) change the hostname to point to the new IP
    4) switch the DNS service to external and back for all DNS zones (https://kb.odin.com/en/118999)
    5) change glue record for the hostname to point to the new IP

    My understanding is step 4 is necessary to get the new service node updated with the zone files...?

    Thanks,
     
  2. SteveITS

    SteveITS Mega Poster

    Messages:
    220
    I asked support, this is the way.
     
    Last edited: Sep 29, 2016
  3. SteveITS

    SteveITS Mega Poster

    Messages:
    220
    I submitted feedback to the KB but it appears the SQL query includes all domains already marked external. To exclude I think one would use:

    psql -h`hostname` -Uplesk plesk --no-align --field-separator ' ' -t -c "select d.domain_id, s.sub_id from domains d left join subs_resources s on d.hosting_res=s.rt_instance_id where s.sub_id is not null;" > sub_id
     
    JustinSoul likes this.
  4. JustinSoul

    JustinSoul Odin Team

    Messages:
    42
    Hello Steve,

    That's correct. Actually, `select` described in the article just ignores DNS zones with empty `sub_id`, but it's good for performance optimization. I added corrected query to KB: https://kb.odin.com/en/118999

    Thank you.
     
  5. SteveITS

    SteveITS Mega Poster

    Messages:
    220
    Updating and detailing my steps for posterity:

    1) Remove old node from Products/Resources/DNS
    2) Ensure all service templates have Parameters/DNS set to "Use default value" (or, not the one being removed)
    3) Switch the DNS service to external and back for all DNS zones (https://kb.odin.com/en/118999; note: single quotes around the password)
    4) For all domains hosted under the admin user (sub_id=1) manually set DNS to Internal using control panel > Services > DNS Zones (KB118999 throws an error on those, but support is working on it)
    5) Set all reverse DNS zones to not use this DNS service node
    (at this point no domains should be using the old service node)
    6) Delete the old service node from PPA
    7) Change the hostname to point to the new IP
    8) Add the new server as a new DNS service node with the same hostname
    9) Set this node as a slave name server in Products/Resources/DNS
    10) Ensure all service templates have Parameters/DNS set to "Use default value" (or, include the one being added...no, it does not remember to "use default")
    11) Switch the DNS service to external and back for all DNS zones (https://kb.odin.com/en/118999)
    12) For all domains hosted under the admin user (sub_id=1) manually set DNS to Internal using control panel > Services > DNS Zones
    13) Double check if this is a slave DNS server: file /var/named/run-root/var/pem_zones should be the same size on all slave DNS servers (assuming all domains use both slaves)
    14) Set all reverse DNS zones to use this DNS service node
    15) change glue record for the hostname to point to the new IP
     
    Last edited: Oct 10, 2016

Share This Page