freeipa

FreeIPA is an integrated Identity and Authentication solution for Linux/UNIX networked environments.  |  http://www.freeipa.org/

#6457 ipa dnsrecord-add fails with Keyerror stack trace

Created 2 years ago by pvoborni
Modified a year ago

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: 192.168.121.41
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
    sys.exit(api.Backend.cli.run(argv))
  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
process_keyword_arguments
    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
prompt_parts
    __get_part_param(rrtype, cmd, part, user_options, default)
  File "/usr/lib/python2.7/site-packages/ipaclient/plugins/dns.py", line 53, in
__get_part_param
    label = unicode(cmd.params[name].label)
  File "/usr/lib/python2.7/site-packages/ipalib/base.py", line 472, in
__getitem__
    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):
ipa-server-4.4.0-12.el7.x86_64

How reproducible:
100%

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:
a year ago

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

master:

  • 1e912f5 dns: fix dnsrecord_add interactive mode
a year ago

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

a year ago

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

Login to comment on this ticket.

defect

IPA

https://bugzilla.redhat.com/show_bug.cgi?id=1384310

cancel