#3204 Adding dns zone using --name-server and --ip-address, adds zone with incorrect data
Closed: Fixed None Opened 8 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 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

  --> --ip-address= has to be used because hostname is not resolvable to IP
  --> 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=  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):

How reproducible:

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

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

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)

4 years ago

Login to comment on this ticket.