Bug 817831

Summary: ipa config-mod --delattr user and group search fields returns internal server error
Product: Red Hat Enterprise Linux 6 Reporter: Jenny Severance <jgalipea>
Component: ipaAssignee: Rob Crittenden <rcritten>
Status: CLOSED ERRATA QA Contact: Namita Soman <nsoman>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.3CC: mkosek
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: ipa-3.0.0-1.el6 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-02-21 09:12:23 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Jenny Severance 2012-05-01 14:03:33 UTC
Description of problem:

Attempting to delattr on required ipa configuration user and group search fields results in an internal server error

# ipa config-mod --delattr=ipausersearchfields="uid,givenname,sn,telephonenumber,ou,title"
ipa: ERROR: an internal error has occurred

/var/log/httpd/error_log

[Tue May 01 09:39:49 2012] [error] ipa: ERROR: non-public: AttributeError: 'NoneType' object has no attribute 'split'
[Tue May 01 09:39:49 2012] [error] Traceback (most recent call last):
[Tue May 01 09:39:49 2012] [error]   File "/usr/lib/python2.6/site-packages/ipaserver/rpcserver.py", line 320, in wsgi_execute
[Tue May 01 09:39:49 2012] [error]     result = self.Command[name](*args, **options)
[Tue May 01 09:39:49 2012] [error]   File "/usr/lib/python2.6/site-packages/ipalib/frontend.py", line 438, in __call__
[Tue May 01 09:39:49 2012] [error]     ret = self.run(*args, **options)
[Tue May 01 09:39:49 2012] [error]   File "/usr/lib/python2.6/site-packages/ipalib/frontend.py", line 716, in run
[Tue May 01 09:39:49 2012] [error]     return self.execute(*args, **options)
[Tue May 01 09:39:49 2012] [error]   File "/usr/lib/python2.6/site-packages/ipalib/plugins/baseldap.py", line 1278, in execute
[Tue May 01 09:39:49 2012] [error]     ldap, dn, entry_attrs, attrs_list, *keys, **options
[Tue May 01 09:39:49 2012] [error]   File "/usr/lib/python2.6/site-packages/ipalib/plugins/config.py", line 218, in pre_callback
[Tue May 01 09:39:49 2012] [error]     fields = entry_attrs[k].split(',')
[Tue May 01 09:39:49 2012] [error] AttributeError: 'NoneType' object has no attribute 'split'
[Tue May 01 09:39:49 2012] [error] ipa: INFO: admin: config_mod(delattr=(u'ipausersearchfields=uid,givenname,sn,telephonenumber,ou,title',), rights=False, all=False, raw=False, version=u'2.34'): AttributeError
[Tue May 01 09:40:11 2012] [error] ipa: INFO: admin: config_mod(delattr=(u'ipausersearchfields=cn,member',), rights=False, all=False, raw=False, version=u'2.34'): AttrValueNotFound

# ipa config-mod --delattr=ipagroupsearchfields=cn,description
ipa: ERROR: an internal error has occurred

[Tue May 01 10:00:09 2012] [error] ipa: INFO: admin: group_del((u'mygroup',), continue=False): SUCCESS
[Tue May 01 10:01:08 2012] [error] ipa: ERROR: non-public: AttributeError: 'NoneType' object has no attribute 'split'
[Tue May 01 10:01:08 2012] [error] Traceback (most recent call last):
[Tue May 01 10:01:08 2012] [error]   File "/usr/lib/python2.6/site-packages/ipaserver/rpcserver.py", line 320, in wsgi_execute
[Tue May 01 10:01:08 2012] [error]     result = self.Command[name](*args, **options)
[Tue May 01 10:01:08 2012] [error]   File "/usr/lib/python2.6/site-packages/ipalib/frontend.py", line 438, in __call__
[Tue May 01 10:01:08 2012] [error]     ret = self.run(*args, **options)
[Tue May 01 10:01:08 2012] [error]   File "/usr/lib/python2.6/site-packages/ipalib/frontend.py", line 716, in run
[Tue May 01 10:01:08 2012] [error]     return self.execute(*args, **options)
[Tue May 01 10:01:08 2012] [error]   File "/usr/lib/python2.6/site-packages/ipalib/plugins/baseldap.py", line 1278, in execute
[Tue May 01 10:01:08 2012] [error]     ldap, dn, entry_attrs, attrs_list, *keys, **options
[Tue May 01 10:01:08 2012] [error]   File "/usr/lib/python2.6/site-packages/ipalib/plugins/config.py", line 218, in pre_callback
[Tue May 01 10:01:08 2012] [error]     fields = entry_attrs[k].split(',')
[Tue May 01 10:01:08 2012] [error] AttributeError: 'NoneType' object has no attribute 'split'

Automated test results ::

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: [   LOG    ] :: ipaconfig_mod_delattr ipagroupsearchfields negative test
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

:: [   LOG    ] :: Executing: ipa config-mod --delattr=ipagroupsearchfields=cn,description
:: [   LOG    ] :: "ipa config-mod --delattr=ipagroupsearchfields=cn,description" failed as expected.
:: [   FAIL   ] :: ERROR: Message not as expected. GOT: ipa: ERROR: an internal error has occurred  EXP: ipa: ERROR: 'ipagroupsearchfields' is required 
:: [   FAIL   ] :: Verify expected error message. (Expected 0, got 1)
:: [   LOG    ] :: Verifies bugzilla https://bugzilla.redhat.com/show_bug.cgi?id=
:: [   LOG    ] :: Duration: 8s
:: [   LOG    ] :: Assertions: 0 good, 2 bad
:: [   FAIL   ] :: RESULT: ipaconfig_mod_delattr ipagroupsearchfields negative test

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: [   LOG    ] :: ipaconfig_mod_delattr ipausersearchfields negative test
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

:: [   LOG    ] :: Executing: ipa config-mod --delattr=ipausersearchfields=uid,givenname,sn,telephonenumber,ou,title
:: [   LOG    ] :: "ipa config-mod --delattr=ipausersearchfields=uid,givenname,sn,telephonenumber,ou,title" failed as expected.
:: [   FAIL   ] :: ERROR: Message not as expected. GOT: ipa: ERROR: an internal error has occurred  EXP: ipa: ERROR: 'ipausersearchfields' is required 
:: [   FAIL   ] :: Verify expected error message. (Expected 0, got 1)
:: [   LOG    ] :: Verifies bugzilla https://bugzilla.redhat.com/show_bug.cgi?id=
:: [   LOG    ] :: Duration: 8s
:: [   LOG    ] :: Assertions: 0 good, 2 bad
:: [   FAIL   ] :: RESULT: ipaconfig_mod_delattr ipausersearchfields negative test


Version-Release number of selected component (if applicable):
ipa-server-2.2.0-11.el6.i686

How reproducible:
always

Steps to Reproduce:
1. ipa config-show (to get current value of user search fields
2. ipa config-mod --delattr=ipausersearchfields="uid,givenname,sn,telephonenumber,ou,title"
3.
  
Actual results:

Internal Server Error


Expected results:

ipa: ERROR: 'ipausersearchfields' is required
ipa: ERROR: 'ipagroupsearchfields' is required





Additional info:

Comment 1 Rob Crittenden 2012-05-01 14:11:01 UTC
Upstream ticket:
https://fedorahosted.org/freeipa/ticket/2701

Comment 2 Martin Kosek 2012-05-15 08:03:34 UTC
Fixed upstream:
master: https://fedorahosted.org/freeipa/changeset/ece68f381a1bcf38d2f9c2d1b7f960438d5e2241

Comment 5 Namita Soman 2013-01-15 03:28:18 UTC
Verified using: ipa-server.x86_64 0:3.0.0-21.el6

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: [   LOG    ] :: ipaconfig_mod_delattr ipagroupsearchfields negative test
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

:: [16:13:46] ::  Executing: ipa config-mod --delattr=ipagroupsearchfields=cn,description
ipa: ERROR: 'ipagroupsearchfields' is required
:: [16:13:47] ::  "ipa config-mod --delattr=ipagroupsearchfields=cn,description" failed as expected.
:: [   PASS   ] :: Error message as expected: ipa: ERROR: 'ipagroupsearchfields' is required
:: [   PASS   ] :: Verify expected error message.
:: [16:13:48] ::  Verifies bugzilla https://bugzilla.redhat.com/show_bug.cgi?id=817831
'420fddbb-c79c-4757-9f9c-3b8f1a211c39'
ipaconfig-mod-delattr-ipagroupsearchfields-negative-test result: PASS

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: [   LOG    ] :: ipaconfig_mod_delattr ipausersearchfields negative test
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

:: [16:13:50] ::  Executing: ipa config-mod --delattr=ipausersearchfields=uid,givenname,sn,telephonenumber,ou,title
ipa: ERROR: 'ipausersearchfields' is required
:: [16:13:51] ::  "ipa config-mod --delattr=ipausersearchfields=uid,givenname,sn,telephonenumber,ou,title" failed as expected.
:: [   PASS   ] :: Error message as expected: ipa: ERROR: 'ipausersearchfields' is required
:: [   PASS   ] :: Verify expected error message.
:: [16:13:52] ::  Verifies bugzilla https://bugzilla.redhat.com/show_bug.cgi?id=817831
'5f41252f-1c36-479e-b8c8-3295bde230c3'
ipaconfig-mod-delattr-ipausersearchfields-negative-test result: PASS

Comment 7 errata-xmlrpc 2013-02-21 09:12:23 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-2013-0528.html