ECS: How to Add or Remove a DNS Server
Summary: This article shows how to modify the ECS DNS configuration.
Instructions
Before changing DNS settings, always confirm with the customer.
Note: A new feature is released in xDoctor 4-8.104.0 and later. This is now automated with xDoctor to quickly attempt to discover the potential cause of xDoctor RAP075 errors. If the script is unable to correct the xDoctor RAP075 errors, it provides a detailed summary of its findings.
For more information, follow article ECS: ObjectScale: How to run KB Automation Scripts (Auto Pilot) (Log in as a registered Dell Support user is required to view this article). If you are unable to upgrade to xDoctor 4.8.104 or later, follow the Manual Section of this article.
Process:
- To find the master node of the rack:
# ssh master.rack
admin@ecsnode5:~> ssh master.rack admin@ecsnode1:~>
- To find the NAN IP, you can use the IP identified in the alert or from getclusterinfo -i for your target with this script:
# getclusterinfo -i
admin@ecsnode1:~> getclusterinfo -i Registered Racks ================ Ip Address epoxy seg mac seg color seg id NAN Hostname =============== ===== ================= ========== ======= ============ 169.254.1.1 False 00:00:00:00:00:00 red 1 provo-red.nanlocal Node private Node Public BMC Ip Address Id Status Mac Ip Address Mac Ip Address Private.4(NAN) Node Name =============== ====== ====== ================= =============== ================= =============== =============== ========= 192.168.219.1 1 MA 00:00:00:00:00 0.0.0.0 00:00:00:00:00 192.168.219.101 169.254.1.1 provo-red 192.168.219.2 2 SA 00:00:00:00:00 0.0.0.0 00:00:00:00:00 192.168.219.102 169.254.1.2 sandy-red 192.168.219.3 3 SA 00:00:00:00:00 0.0.0.0 00:00:00:00:00 192.168.219.103 169.254.1.3 orem-red 192.168.219.4 4 SA 00:00:00:00:00 0.0.0.0 00:00:00:00:00 192.168.219.104 169.254.1.4 ogden-red 192.168.219.5 5 SA 00:00:00:00:00 0.0.0.0 00:00:00:00:00 192.168.219.105 169.254.1.5 layton-red 192.168.219.6 6 SA 00:00:00:00:00 0.0.0.0 00:00:00:00:00 192.168.219.106 169.254.1.6 logan-red 192.168.219.7 7 SA 00:00:00:00:00 0.0.0.0 00:00:00:00:00 192.168.219.107 169.254.1.7 lehi-red 192.168.219.8 8 SA 00:00:00:00:00 0.0.0.0 00:00:00:00:00 192.168.219.108 169.254.1.8 murray-red Status: M - Master, S - Slave E - Epoxy I - Initializing, U - Updating, A - Active P - On, O - Off ! - Warning/Error list: 1 -(W) Hostname set to default hostname set by installer 169.254.2.1 False 00:00:00:00:00:00 green 2 tucson-green.nanlocal Node private Node Public BMC Ip Address Id Status Mac Ip Address Mac Ip Address Private.4(NAN) Node Name =============== ====== ====== ================= =============== ================= =============== =============== ========= 192.168.219.1 1 MA 00:00:00:00:00 0.0.0.0 00:00:00:00:00 192.168.219.101 169.254.2.1 provo-green 192.168.219.2 2 SA 00:00:00:00:00 0.0.0.0 00:00:00:00:00 192.168.219.102 169.254.2.2 sandy-green 192.168.219.3 3 SA 00:00:00:00:00 0.0.0.0 00:00:00:00:00 192.168.219.103 169.254.2.3 orem-rgreen 192.168.219.4 4 SA 00:00:00:00:00 0.0.0.0 00:00:00:00:00 192.168.219.104 169.254.2.4 ogden-green 192.168.219.5 5 SA 00:00:00:00:00 0.0.0.0 00:00:00:00:00 192.168.219.105 169.254.2.5 layton-green 192.168.219.6 6 SA 00:00:00:00:00 0.0.0.0 00:00:00:00:00 192.168.219.106 169.254.2.6 logan-green 192.168.219.7 7 SA 00:00:00:00:00 0.0.0.0 00:00:00:00:00 192.168.219.107 169.254.2.7 lehi-green 192.168.219.8 8 SA 00:00:00:00:00 0.0.0.0 00:00:00:00:00 192.168.219.108 169.254.2.8 murray-green Status: M - Master, S - Slave E - Epoxy I - Initializing, U - Updating, A - Active P - On, O - Off ! - Warning/Error list: 1 -(W) Hostname set to default hostname set by installer
- Run the automation command from the master node with xDoctor 4-8.104.0 and above. This Automation is menu driven with validation steps throughout the execution.
Note: The following validations take place before adding the new DNS server IP:
-
- Validate forward DNS lookup.
- Validate reverse DNS lookup.
- Validate and display DNS lookup mismatch.
Command:
# sudo xdoctor autopilot --kb 19614 --target-rack <rack color>
Example: (In this example we are working on rack 1)
admin@ecsnode1:~> sudo xdoctor autopilot --kb 19614 --target-rack red Using /etc/ansible/ansible.cfg as config file VERSION: 3.0 Playbook tasks: 66 Role tasks: 28 Total tasks: 94 across 1 host(s)
Option for automation script:
- Select Option that you want to do Add a DNS server to the configuration or Remove a DNS server from the configuration.
TASK [Ask user if they want to change DNS IP configuration or DNS search configuration] ********************************************************************************************************************** [Ask user if they want to change DNS IP configuration or DNS search configuration] ****************************************************************************** Please select one of the following options to change DNS IP or DNS search configuration: ****************************************************************************** (1) Change DNS IP configuration. (2) Change DNS search configuration. (0) Exit ******************************************************************************"
- Changing of DNS IP configuration.
TASK [Ask user if they want to add or remove a DNS server] *************************************************************************************************************************************************** [Ask user if they want to add or remove a DNS server] ****************************************************************************** Please select one of the following options to add or remove an DNS server: ****************************************************************************** (1) Add an DNS server to the configuration. (2) Remove an DNS server from the configuration. (0) Exit ****************************************************************************** :
-
- Change DNS IP configuration ->(1) Add a DNS server to the configuration.
TASK [Ask for DNS server IP if adding] *********************************************************************************************************************************************************************** [Ask for DNS server IP if adding] ****************************************************************************** Enter the IP of the DNS server you want to add: ****************************************************************************** :
-
- Change DNS IP configuration
->(2) Remove an DNS server from the configuration
- Change DNS IP configuration
TASK [Prompt user to select DNS server to remove] ************************************************************************************************************************************************************ [Prompt user to select DNS server to remove] ******************************************************************************* Enter the letter of the DNS server you want to remove: ******************************************************************************* (0) Exit ******************************************************************************* :
- Change DNS search configuration.
TASK [Ask user if they want to add or remove a DNS search domain] ******************************************************************************************************************************************** [Ask user if they want to add or remove a DNS search domain] ****************************************************************************** Please select one of the following options to add or remove an DNS search domain: ****************************************************************************** (1) Add a DNS search domain. (2) Remove a DNS search domain. (0) Exit ******************************************************************************
-
- Change DNS search configuration. -> (1) Add a DNS search domain.
TASK [Ask for DNS search domain if adding] ******************************************************************************************************************************************************************* [Ask for DNS search domain if adding] ****************************************************************************** Please enter the DNS search domain you want to add: ****************************************************************************** :
-
- Change DNS search configuration. -> (2) Remove a DNS search domain
TASK [Prompt user to select DNS search domain to remove] ***************************************************************************************************************************************************** [Prompt user to select DNS search domain to remove] ****************************************************************************** Please select the DNS search domain you want to remove: ****************************************************************************** (a) xxxx.xxxx.com (0) Exit ****************************************************************************** :
Manual Section
In the event the script fails:
How to add IPs and DNSSearch to the DNS configuration:
setrackinfo -a to configure the DNS server. Repeat the command for each DNS server at the customer site (or separate with space).
# sudo setrackinfo -a DNSServer <DNS_Server_IP> Example: # sudo setrackinfo -a DNSServer x.x.x.x # sudo setrackinfo -a DNSServer y.y.y.y or # sudo setrackinfo -a DNSServer x.x.x.x y.y.y.yUse
setrackinfo -a to configure DNS search. We must run the command once for each specification order of most specific to least specific.
# sudo setrackinfo -a DNSSearch <DNS_Search_Specification> Example: # sudo setrackinfo -a DNSSearch corp.dell.com # sudo setrackinfo -a DNSSearch dell.com
How to remove IPs from DNS configuration:
setrackinfo -d to remove one or more from a list (applies to DNSServer or DNSSearch)
Example: # sudo setrackinfo -d DNSServer x.x.x.x y.y.y.y