#6457 ipa dnsrecord-add fails with Keyerror stack trace
Closed: fixed 2 years ago by pvoborni. Opened 2 years ago by pvoborni.

Ticket was cloned from Red Hat Bugzilla (product Red Hat Enterprise Linux 7): Bug 1384310

Description of problem:
When User tries to add DNS record for a machine using `ipa dnsrecord-add` in
interactive mode, command fails with Python keyerror stack trace

[root@ipabrserver1 /]# ipa dnsrecord-add
Record name: ipaserver1
Zone name: testrelm.test
Please choose a type of DNS resource record to be added
The most common types for this type of zone are: A, AAAA

DNS resource record type: A
A IP Address:
ipa: ERROR: KeyError: u'a_part_create_reverse'
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/ipalib/cli.py", line 1351, in run
  File "/usr/lib/python2.7/site-packages/ipalib/cli.py", line 1109, in run
    kw = self.process_keyword_arguments(cmd, kw)
  File "/usr/lib/python2.7/site-packages/ipalib/cli.py", line 1096, in
    callback(cmd, kw)
  File "/usr/lib/python2.7/site-packages/ipaclient/plugins/dns.py", line 257,
in interactive_prompt_callback
    user_options = prompt_parts(rrtype, self)
  File "/usr/lib/python2.7/site-packages/ipaclient/plugins/dns.py", line 80, in
    __get_part_param(rrtype, cmd, part, user_options, default)
  File "/usr/lib/python2.7/site-packages/ipaclient/plugins/dns.py", line 53, in
    label = unicode(cmd.params[name].label)
  File "/usr/lib/python2.7/site-packages/ipalib/base.py", line 472, in
    return self.__map[key]
KeyError: u'a_part_create_reverse'
ipa: ERROR: an internal error has occurred

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

How reproducible:

Steps to Reproduce:
1. Kinit as admin
2. Add DNS A record using ipa dnsrecord-add in interactive mode

Actual results:
Python Stack trace for KeyError

Expected results:
DNS A record should get added in IPA DNS server

Additional info:

Metadata Update from @pvoborni:
- Issue assigned to jcholast
- Issue set to the milestone: FreeIPA 4.5

2 years ago


  • 1e912f5 dns: fix dnsrecord_add interactive mode

Metadata Update from @dkupka:
- Issue close_status updated to: None

2 years ago

Metadata Update from @dkupka:
- Issue close_status updated to: fixed
- Issue status updated to: Closed (was: Open)

2 years ago

Login to comment on this ticket.