Bug 1030214 - BIND will not start if CONF_HOSTS_DOMAIN is a subdomain of CONF_DOMAIN
Summary: BIND will not start if CONF_HOSTS_DOMAIN is a subdomain of CONF_DOMAIN
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Node
Version: 2.0.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: ---
Assignee: Luke Meyer
QA Contact: libra bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-11-14 07:56 UTC by Johnny Liu
Modified: 2017-03-08 17:35 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-12-16 09:11:19 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Johnny Liu 2013-11-14 07:56:07 UTC
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 21:43:03 UTC
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 17:53:57 UTC
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 21:39:07 UTC
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 11:27:09 UTC
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.