Cleanup GNS entries when nslookup returns more than 3 addresses for SCAN

Check scan addresses
[root@gract1 Desktop]# srvctl config scan
SCAN name: gract-scan.grid12c.example.com, Network: 1
Subnet IPv4: 192.168.1.0/255.255.255.0/eth1, dhcp
Subnet IPv6: 
SCAN 0 IPv4 VIP: -/scan1-vip/192.168.1.173
SCAN VIP is enabled.
SCAN VIP is individually enabled on nodes: 
SCAN VIP is individually disabled on nodes: 
SCAN 1 IPv4 VIP: -/scan2-vip/192.168.1.165
SCAN VIP is enabled.
SCAN VIP is individually enabled on nodes: 
SCAN VIP is individually disabled on nodes: 
SCAN 2 IPv4 VIP: -/scan3-vip/192.168.1.166
SCAN VIP is enabled.
SCAN VIP is individually enabled on nodes: 
SCAN VIP is individually disabled on nodes: 

Verify SCAN addresses with nslookup
[root@gract1 Desktop]#  nslookup gract-scan.grid12c.example.com
Server:        192.168.1.50
Address:    192.168.1.50#53

Non-authoritative answer:
Name:    gract-scan.grid12c.example.com
Address: 192.168.1.173
Name:    gract-scan.grid12c.example.com
Address: 192.168.1.166
Name:    gract-scan.grid12c.example.com
Address: 192.168.1.165
Name:    gract-scan.grid12c.example.com
Address: 192.168.1.188
Name:    gract-scan.grid12c.example.com
Address: 192.168.1.190
Name:    gract-scan.grid12c.example.com
Address: 192.168.1.161
--> Here we get 6 addresses but expecting only 3
    Note some of the addresses are not responding on ICMP/ping requests

Check GNS status 
[root@gract1 ~]#  $GRID_HOME/bin/srvctl config gns -list
gract-scan A 192.168.1.161 Unique Flags: 0x81
gract-scan A 192.168.1.165 Unique Flags: 0x1
gract-scan A 192.168.1.166 Unique Flags: 0x1
gract-scan A 192.168.1.173 Unique Flags: 0x1
gract-scan A 192.168.1.188 Unique Flags: 0x81
gract-scan A 192.168.1.190 Unique Flags: 0x81
gract-scan1-vip A 192.168.1.173 Unique Flags: 0x1
gract-scan2-vip A 192.168.1.165 Unique Flags: 0x1
gract-scan3-vip A 192.168.1.161 Unique Flags: 0x81
gract-scan3-vip A 192.168.1.166 Unique Flags: 0x1
gract-scan3-vip A 192.168.1.188 Unique Flags: 0x81
gract-scan3-vip A 192.168.1.190 Unique Flags: 0x81
--> We have wrong addresses for gract-scan and gract-scan3-vip 

Delete unused SCAN VIP addresses  192.168.1.188,  192.168.1.190,  192.168.1.161 
   
[root@gract1 Desktop]# srvctl update gns -delete  gract-scan -address 192.168.1.161
[root@gract1 Desktop]# srvctl update gns -delete  gract-scan -address  192.168.1.190
[root@gract1 Desktop]# srvctl update gns -delete  gract-scan -address 192.168.1.188
[root@gract1 Desktop]# srvctl update gns -delete  gract-scan3-vip -address 192.168.1.161
[root@gract1 Desktop]# srvctl update gns -delete  gract-scan3-vip -address 192.168.1.190
[root@gract1 Desktop]# srvctl update gns -delete  gract-scan3-vip -address 192.168.1.188

Restart DNS nameserver to clear cached addresses 
[root@ns1 Desktop]#  service named restart
Stopping named: .                                          [  OK  ]
Starting named:                                            [  OK  ]

Verify with nslookup 
[root@gract1 ~]#  nslookup gract-scan.grid12c.example.com
Server:        192.168.1.50
Address:    192.168.1.50#53

Non-authoritative answer:
Name:    gract-scan.grid12c.example.com
Address: 192.168.1.173
Name:    gract-scan.grid12c.example.com
Address: 192.168.1.165
Name:    gract-scan.grid12c.example.com
Address: 192.168.1.166
--> works now

Verify GNS entries for 2 node cluster 
[root@gract1 ~]# $GRID_HOME/bin/srvctl config gns -list | egrep 'vip|scan'
gract-scan A 192.168.1.165 Unique Flags: 0x1
gract-scan A 192.168.1.166 Unique Flags: 0x1
gract-scan A 192.168.1.173 Unique Flags: 0x1
gract-scan1-vip A 192.168.1.173 Unique Flags: 0x1
gract-scan2-vip A 192.168.1.165 Unique Flags: 0x1
gract-scan3-vip A 192.168.1.166 Unique Flags: 0x1
gract1-vip A 192.168.1.160 Unique Flags: 0x81
gract2-vip A 192.168.1.172 Unique Flags: 0x1

Ping these addresses
[grid@gract3 ~]$ ping gract1-vip
[grid@gract3 ~]$ ping gract-scan1-vip
[grid@gract3 ~]$ ping gract-scan 
..

Leave a Reply

Your email address will not be published. Required fields are marked *


You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>