Bug 1030214 - BIND will not start if CONF_HOSTS_DOMAIN is a subdomain of CONF_DOMAIN
BIND will not start if CONF_HOSTS_DOMAIN is a subdomain of CONF_DOMAIN
Status: CLOSED ERRATA
Product: OpenShift Container Platform
Classification: Red Hat
Component: Pod (Show other bugs)
2.0.0
Unspecified Unspecified
medium Severity medium
: ---
: ---
Assigned To: Luke Meyer
libra bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-11-14 02:56 EST by Johnny Liu
Modified: 2017-03-08 12 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-12-16 04:11:19 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Johnny Liu 2013-11-14 02:56:07 EST
Description of problem:
In openshift.sh script, see the description of CONF_DOMAIN and CONF_HOSTS_DOMAIN:

# domain / CONF_DOMAIN
#   Default: example.com
#   The network domain under which app DNS entries will be placed.
# CONF_DOMAIN="example.com"

# hosts_domain / CONF_HOSTS_DOMAIN
#   Default: hosts.example.com
#   If specified and host DNS is to be created, this domain will be created
#   and used for creating host DNS records (app records will still go in the
#   main domain).
# CONF_HOSTS_DOMAIN="hosts.example.com"

If user following the above instruction, un-comment "CONF_HOSTS_DOMAIN" and "CONF_DOMAIN", then install named, named will failed to be started, get the following error:
+ service named start
Starting named: 
Error in named configuration:
zone localhost.localdomain/IN: loaded serial 0
zone localhost/IN: loaded serial 0
zone 1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa/IN: loaded serial 0
zone 1.0.0.127.in-addr.arpa/IN: loaded serial 0
zone 0.in-addr.arpa/IN: loaded serial 0
zone hosts.example.com/IN: hosts.example.com/MX 'mail.hosts.example.com' has no address records (A or AAAA)
zone hosts.example.com/IN: loaded serial 2011112904
zone example.com/IN: NS 'ns1.hosts.example.com' has no address records (A or AAAA)
zone example.com/IN: not loaded due to errors.
_default/example.com/IN: bad zone
                                                           [FAILED]


After debug, found CONF_HOSTS_DOMAIN can not be set to be sub domain of CONF_DOMAIN.
If I set CONF_HOSTS_DOMAIN="hosts.com" and CONF_DOMAIN="example.com", then it works. So the description in the installation script is a little confused to user, that may be mislead user.

Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:
Comment 2 Luke Meyer 2013-11-14 16:43:03 EST
No, the description in openshift.sh is fine; there should be no problem with CONF_HOSTS_DOMAIN being a subdomain of CONF_DOMAIN. It works fine with the 1.2 script. I think this is a subtle naming issue that for some reason only exists in the 2.0 script - will have to track it down.
Comment 3 Luke Meyer 2013-11-21 12:53:57 EST
Discussed with Mark, it is actually true that with a containing domain like this, I need a "glue record" in the app domain for the NS or BIND complains. My tests were generally with peer domains e.g. "apps.example.com" and "hosts.example.com". Will fix that soon.
Comment 4 Luke Meyer 2013-11-22 16:39:07 EST
openshift-extras scripts updated, both for 1.2 and 2.0 beta. We don't discuss creating a HOSTS_DOMAIN in the docs so I'm not thinking it's relevant there.
Comment 5 Johnny Liu 2013-11-25 06:27:09 EST
Verified this bug with the latest openshift.sh script, PASS.

export CONF_INSTALL_COMPONENTS=named
export CONF_DOMAIN=example.com
export CONF_HOSTS_DOMAIN=hosts.example.com

Use the old script, fail to start named.
# /etc/init.d/named restart
Stopping named: .                                          [  OK  ]
Starting named: 
Error in named configuration:
zone localhost.localdomain/IN: loaded serial 0
zone localhost/IN: loaded serial 0
zone 1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa/IN: loaded serial 0
zone 1.0.0.127.in-addr.arpa/IN: loaded serial 0
zone 0.in-addr.arpa/IN: loaded serial 0
zone hosts.example.com/IN: hosts.example.com/MX 'mail.hosts.example.com' has no address records (A or AAAA)
zone hosts.example.com/IN: loaded serial 2011112904
zone example.com/IN: NS 'ns1.hosts.example.com' has no address records (A or AAAA)
zone example.com/IN: not loaded due to errors.
_default/example.com/IN: bad zone
                                                           [FAILED]
# cat /var/named/dynamic/example.com.db 
$ORIGIN .
$TTL 1	; 1 seconds (for testing only)
example.com		IN SOA	ns1.hosts.example.com. hostmaster.example.com. (
				2011112904 ; serial
				60         ; refresh (1 minute)
				15         ; retry (15 seconds)
				1800       ; expire (30 minutes)
				10         ; minimum (10 seconds)
				)
			NS	ns1.hosts.example.com.
			MX	10 mail.example.com.
$ORIGIN example.com.



Use the latest script, it PASS.
# /etc/init.d/named stop
Stopping named: .                                          [  OK  ]
# /etc/init.d/named start
Starting named:                                            [  OK  ]
# cat /var/named/dynamic/example.com.db 
$ORIGIN .
$TTL 1	; 1 seconds (for testing only)
example.com		IN SOA	ns1.hosts.example.com. hostmaster.example.com. (
				2011112904 ; serial
				60         ; refresh (1 minute)
				15         ; retry (15 seconds)
				1800       ; expire (30 minutes)
				10         ; minimum (10 seconds)
				)
			NS	ns1.hosts.example.com.
			MX	10 mail.example.com.
$ORIGIN example.com.
ns1.hosts			A	192.168.59.198

Note You need to log in before you can comment on or make changes to this bug.