Bug 744234

Summary: Internal Server Error adding invalid reverse DNS zone
Product: Red Hat Enterprise Linux 6 Reporter: Jenny Severance <jgalipea>
Component: ipaAssignee: Rob Crittenden <rcritten>
Status: CLOSED ERRATA QA Contact: IDM QE LIST <seceng-idm-qe-list>
Severity: unspecified Docs Contact:
Priority: high    
Version: 6.1CC: grajaiya, mgregg, mkosek
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: ipa-2.1.3-1.el6 Doc Type: Bug Fix
Doc Text:
Do not document
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-12-06 18:42:28 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 748554    

Description Jenny Severance 2011-10-07 14:52:30 UTC
Description of problem:
Attempting to add an invalid reverse DNS zone results in an Internal Server Error.

errors_log ::

[Fri Oct 07 10:46:48 2011] [error] ipa: INFO: admin@JGALIPEA: dnszone_add(None, idnssoamname=u'ipaserver.jgalipea.redhat.com', force=u'false'): RequirementError
[Fri Oct 07 10:46:53 2011] [error] [client 10.16.64.87] mod_wsgi (pid=27085): Exception occurred processing WSGI script '/usr/share/ipa/wsgi.py'.
[Fri Oct 07 10:46:53 2011] [error] [client 10.16.64.87] Traceback (most recent call last):
[Fri Oct 07 10:46:53 2011] [error] [client 10.16.64.87]   File "/usr/share/ipa/wsgi.py", line 48, in application
[Fri Oct 07 10:46:53 2011] [error] [client 10.16.64.87]     return api.Backend.session(environ, start_response)
[Fri Oct 07 10:46:53 2011] [error] [client 10.16.64.87]   File "/usr/lib/python2.6/site-packages/ipaserver/rpcserver.py", line 142, in __call__
[Fri Oct 07 10:46:53 2011] [error] [client 10.16.64.87]     return self.route(environ, start_response)
[Fri Oct 07 10:46:53 2011] [error] [client 10.16.64.87]   File "/usr/lib/python2.6/site-packages/ipaserver/rpcserver.py", line 154, in route
[Fri Oct 07 10:46:53 2011] [error] [client 10.16.64.87]     return app(environ, start_response)
[Fri Oct 07 10:46:53 2011] [error] [client 10.16.64.87]   File "/usr/lib/python2.6/site-packages/ipaserver/rpcserver.py", line 254, in __call__
[Fri Oct 07 10:46:53 2011] [error] [client 10.16.64.87]     response = self.wsgi_execute(environ)
[Fri Oct 07 10:46:53 2011] [error] [client 10.16.64.87]   File "/usr/lib/python2.6/site-packages/ipaserver/rpcserver.py", line 223, in wsgi_execute
[Fri Oct 07 10:46:53 2011] [error] [client 10.16.64.87]     result = self.Command[name](*args, **options)
[Fri Oct 07 10:46:53 2011] [error] [client 10.16.64.87]   File "/usr/lib/python2.6/site-packages/ipalib/frontend.py", line 419, in __call__
[Fri Oct 07 10:46:53 2011] [error] [client 10.16.64.87]     default = self.get_default(**params)
[Fri Oct 07 10:46:53 2011] [error] [client 10.16.64.87]   File "/usr/lib/python2.6/site-packages/ipalib/frontend.py", line 673, in get_default
[Fri Oct 07 10:46:53 2011] [error] [client 10.16.64.87]     return dict(self.__get_default_iter(kw))
[Fri Oct 07 10:46:53 2011] [error] [client 10.16.64.87]   File "/usr/lib/python2.6/site-packages/ipalib/frontend.py", line 683, in __get_default_iter
[Fri Oct 07 10:46:53 2011] [error] [client 10.16.64.87]     default = param.get_default(**kw)
[Fri Oct 07 10:46:53 2011] [error] [client 10.16.64.87]   File "/usr/lib/python2.6/site-packages/ipalib/parameters.py", line 873, in get_default
[Fri Oct 07 10:46:53 2011] [error] [client 10.16.64.87]     default = self._get_default(**kw)
[Fri Oct 07 10:46:53 2011] [error] [client 10.16.64.87]   File "/usr/lib/python2.6/site-packages/ipalib/parameters.py", line 228, in __call__
[Fri Oct 07 10:46:53 2011] [error] [client 10.16.64.87]     return self.callback(*vals)
[Fri Oct 07 10:46:53 2011] [error] [client 10.16.64.87]   File "/usr/lib/python2.6/site-packages/ipalib/plugins/dns.py", line 312, in <lambda>
[Fri Oct 07 10:46:53 2011] [error] [client 10.16.64.87]     default_from=lambda name_from_ip: _reverse_zone_name(name_from_ip),
[Fri Oct 07 10:46:53 2011] [error] [client 10.16.64.87]   File "/usr/lib/python2.6/site-packages/ipalib/plugins/dns.py", line 151, in _reverse_zone_name
[Fri Oct 07 10:46:53 2011] [error] [client 10.16.64.87]     net = netaddr.IPNetwork(netstr)
[Fri Oct 07 10:46:53 2011] [error] [client 10.16.64.87]   File "/usr/lib/python2.6/site-packages/netaddr/ip/__init__.py", line 926, in __init__
[Fri Oct 07 10:46:53 2011] [error] [client 10.16.64.87]     raise AddrFormatError('invalid IPNetwork %s' % addr)
[Fri Oct 07 10:46:53 2011] [error] [client 10.16.64.87] AddrFormatError: invalid IPNetwork blah



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


How reproducible:


Steps to Reproduce:
1.  From the UI, Identity --> DNS --> Add --> select radio button for reverse zone
2. Enter "blah" in reverse zone field
3. Enter the ipa server's fqdn for the authoritative server
4. Click Add
  
Actual results:
Internal server error

Expected results:
Proper error message stating the zone name is invalid

Additional info:

Comment 2 Jenny Severance 2011-10-07 15:16:07 UTC
version tested :: ipa-server-2.1.1-4.el6.x86_64

Comment 3 Rob Crittenden 2011-10-07 15:34:27 UTC
Upstream ticket:
https://fedorahosted.org/freeipa/ticket/1941

Comment 6 Martin Kosek 2011-10-31 19:55:46 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
Do not document

Comment 7 Gowrishankar Rajaiyan 2011-11-03 05:23:32 UTC
"IPA Error 3009, invalid 'name_from_ip': invalid format" message displayed.

error_log:

[Thu Nov 03 10:40:03 2011] [error] ipa: INFO: exception ValidationError caught when converting options: invalid 'name_from_ip': invalid format
[Thu Nov 03 10:40:03 2011] [error] ipa: INFO: admin.PNQ.REDHAT.COM: dnszone_add(None, name_from_ip=u'blah', idnssoamname=u'decepticons.lab.eng.pnq.redhat.com', force=u'false'): ValidationError


No traceback detected. Verified in version: ipa-server-2.1.3-8.el6.x86_64

Comment 8 errata-xmlrpc 2011-12-06 18:42:28 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.

http://rhn.redhat.com/errata/RHSA-2011-1533.html