xcat-core icon indicating copy to clipboard operation
xcat-core copied to clipboard

makedns: missing reverse DNS records, breaks RR DNS

Open MarkBergman-cbica opened this issue 4 years ago • 0 comments

Multiple hostname records may exist in /etc/hosts with the same primary hostname and multiple IP addresses to provide for round-robin DNS.

The "makedns" command (xCAT-2.16.1.lenovo1-1.x86_64, under CentOS 7.7, bind-9.11.4-16.P2) creates correct forward (A) records but only creates a single reverse (PTR) DNS record.

Example:

# grep foobar /etc/hosts
10.20.100.1 foobar dummy-hostname-for-RR-dns1
10.20.100.2 foobar dummy-hostname-for-RR-dns2
10.20.100.3 foobar dummy-hostname-for-RR-dns3
# makedns -n --verbose
domain name = mysite.local
nameservers = 10.20.1.1
Handling foobar in /etc/hosts.
zone info for this 10.20.0.0: 20.10.IN-ADDR.ARPA.
Getting reverse zones, this may take several minutes for a large cluster.
Completed getting reverse zones.
Stop named service
get_dbdir: /var/named/
Update Named Conf dir /var/named/ /var/named/
Updating zones.
Completed updating zones.
Restarting named
Restarting named complete
Updating DNS records, this may take several minutes for a large cluster.
Completed updating DNS records.
DNS setup is completed
#
# host foobar
foobar.mysite.local has address 10.20.100.2
foobar.mysite.local has address 10.20.100.1
foobar.mysite.local has address 10.20.100.3
# host 10.20.100.1
1.100.20.10.IN-ADDR.ARPA domain name pointer foobar.mysite.local.
# host 10.20.100.2
Host 2.100.20.10.in-addr.arpa. not found: 3(NXDOMAIN)
# host 10.20.100.3
Host 3.100.20.10.in-addr.arpa. not found: 3(NXDOMAIN)
# cd /var/named
# rndc freeze mysite.local
# rndc thaw mysite.local
A zone reload and thaw was started.
Check the logs to see the result.
#
# grep -A2 foobar db.mysite.local
dummy-hostname-for-RR-dns1 CNAME foobar
dummy-hostname-for-RR-dns2 CNAME foobar
dummy-hostname-for-RR-dns3 CNAME foobar
foobar			A	10.20.100.1
			A	10.20.100.3
			A	10.20.100.2

# rndc freeze 20.10.IN-ADDR.ARPA
# rndc thaw 20.10.IN-ADDR.ARPA
A zone reload and thaw was started.
Check the logs to see the result.
# grep foobar db.10.20
1.100			PTR	foobar.mysite.local.
# egrep "[123]\.100" db.10.20
1.100			PTR	foobar.mysite.local.

MarkBergman-cbica avatar Feb 20 '21 01:02 MarkBergman-cbica