Bug 1384310 - ipa dnsrecord-add fails with Keyerror stack trace
Summary: ipa dnsrecord-add fails with Keyerror stack trace
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: ipa
Version: 7.3
Hardware: Unspecified
OS: Unspecified
Target Milestone: rc
: ---
Assignee: IPA Maintainers
QA Contact: Abhijeet Kasurde
Depends On:
TreeView+ depends on / blocked
Reported: 2016-10-13 05:16 UTC by Abhijeet Kasurde
Modified: 2017-08-01 09:42 UTC (History)
6 users (show)

Fixed In Version: ipa-4.5.0-1.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2017-08-01 09:42:02 UTC
Target Upstream Version:

Attachments (Terms of Use)

System ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2017:2304 normal SHIPPED_LIVE ipa bug fix and enhancement update 2017-08-01 12:41:35 UTC

Description Abhijeet Kasurde 2016-10-13 05:16:25 UTC
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 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):

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:

Comment 2 Petr Vobornik 2016-11-04 13:27:39 UTC
Upstream ticket:

Comment 3 David Kupka 2017-03-08 15:32:30 UTC
Fixed upstream

Comment 6 Abhijeet Kasurde 2017-05-25 08:21:05 UTC
Verified using IPA version :: ipa-server-4.5.0-13.el7.x86_64

Steps followed while verification ::

[root@ipaserver01 ~]# ipa dnsrecord-add
Record name: hostname1
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:
  Record name: hostname1
  A record:

[root@ipaserver01 ~]# ipa dnsrecord-show testrelm.test hostname1
  Record name: hostname1
  A record:

Marking BZ as verified.

Comment 7 errata-xmlrpc 2017-08-01 09:42:02 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.


Note You need to log in before you can comment on or make changes to this bug.