#2701 ipa config-mod --delattr user and group search fields returns internal server error
Closed: Fixed None Opened 11 years ago by rcritten.

https://bugzilla.redhat.com/show_bug.cgi?id=817831 (Red Hat Enterprise Linux 6)

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@TESTRELM.COM: config_mod(de
lattr=(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@TESTRELM.COM:
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@TESTRELM.COM:
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:

Metadata Update from @rcritten:
- Issue assigned to pviktori
- Issue set to the milestone: FreeIPA 3.0 Beta 1

7 years ago

Login to comment on this ticket.

Metadata