#3204 Adding dns zone using --name-server and --ip-address, adds zone with incorrect data
Closed: Fixed None Opened 11 years ago by mkosek.

https://bugzilla.redhat.com/show_bug.cgi?id=868956 (Red Hat Enterprise Linux 6)

Description of problem:

Can add zone using cmd below:
# ipa dnszone-add --name-server=ipaqa64vmc.testrelm.com
--admin-email=ipaqar.redhat.com --serial=2010010701 --refresh=303 --retry=101
--expire=1202 --minimum=33 --ttl=55 westford.testrelm.com

To this Petr's response:
CLI adds implicit dot to end of the name-server parameter.
That is a reason why it works in your case.

There are two rules:
--name-server=host.name.ends.with.dot.
  --> name has to be resolvable to IP address
      (i.e. name belongs to existing zone and is resolvable)
  --> your test case falls to this category because of implicit dot
  --> test will pass because "ipaqa64vmc.testrelm.com" is resolvable

--name-server=relative.hostname
  --> --ip-address= has to be used because hostname is not resolvable to IP
address
  --> relative.hostname will be expanded to relative.hostname.new.zone. - this
name can't be resolvable because that zone doesn't exist yet


So tried the below which adds the zone, but has invalid data:

# ipa dnszone-add --name-server=pspacek --ip-address=10.34.4.89  q.test
Administrator e-mail address [hostmaster.q.test.]:
ipa: ERROR: 'dnszoneidnsname' is required

[root@pspacek nsupdate-test]# ipa dnszone-show q.test
  Zone name: q.test
  Authoritative nameserver: pspacek.                <<<<---- that is wrong -
there should not be a dot at the end of name
  Administrator e-mail address: hostmaster.q.test.
  SOA serial: 1350916014
  SOA refresh: 3600
  SOA retry: 900
  SOA expire: 1209600
  SOA minimum: 3600
  Active zone: TRUE
  Allow query: any;
  Allow transfer: none;

Version-Release number of selected component (if applicable):
ipa-server-3.0.0-105.20121016T0259zgitf6bd4b0.el6.x86_64

How reproducible:
always

Steps to Reproduce:
1. Add a new zone usign relative hostname, and ipaddress
2.
3.

Actual results:
throws an error, adds the zone, but dnszone-show has a period at the end of the
nameserver

Expected results:
add zone sucessully, with no error and dnszone-show should not have a period at
the end of the nameserver.

Additional info:

Metadata Update from @mkosek:
- Issue assigned to mkosek
- Issue set to the milestone: FreeIPA 3.0.1 (bug fixing)

7 years ago

Login to comment on this ticket.

Metadata