#2676 Internal server error when Web UI calls pwpolicy_find with pkey_only option
Closed: Fixed None Opened 11 years ago by pvoborni.

Server returns internal server error when there exists 3 or more password policies.

Probably regression because of #2045

Log:

[Tue Apr 24 09:11:09 2012] [error] ipa: INFO: admin@VM-031.IDM.LAB.BOS.REDHAT.COM: group_find(None): SUCCESS
[Tue Apr 24 09:11:09 2012] [error] ipa: ERROR: non-public: KeyError: 'cospriority'
[Tue Apr 24 09:11:09 2012] [error] Traceback (most recent call last):
[Tue Apr 24 09:11:09 2012] [error]   File "/usr/lib/python2.6/site-packages/ipaserver/rpcserver.py", line 320, in wsgi_execute
[Tue Apr 24 09:11:09 2012] [error]     result = self.Command[name](*args, **options)
[Tue Apr 24 09:11:09 2012] [error]   File "/usr/lib/python2.6/site-packages/ipalib/frontend.py", line 438, in __call__
[Tue Apr 24 09:11:09 2012] [error]     ret = self.run(*args, **options)
[Tue Apr 24 09:11:09 2012] [error]   File "/usr/lib/python2.6/site-packages/ipalib/frontend.py", line 716, in run
[Tue Apr 24 09:11:09 2012] [error]     return self.execute(*args, **options)
[Tue Apr 24 09:11:09 2012] [error]   File "/usr/lib/python2.6/site-packages/ipalib/plugins/baseldap.py", line 1913, in execute
[Tue Apr 24 09:11:09 2012] [error]     entries.sort(self.entries_sortfn)
[Tue Apr 24 09:11:09 2012] [error]   File "/usr/lib/python2.6/site-packages/ipalib/plugins/pwpolicy.py", line 466, in sort_priority
[Tue Apr 24 09:11:09 2012] [error]     return cmp(int(x[1]['cospriority'][0]), int(y[1]['cospriority'][0]))
[Tue Apr 24 09:11:09 2012] [error] KeyError: 'cospriority'
[Tue Apr 24 09:11:09 2012] [error] ipa: INFO: admin@EXAMPLE.COM: pwpolicy_find(None, sizelimit=0, pkey_only=True): KeyError

Consequence: Can't edit pwpolicies in Web UI.

master:

b137b71[[BR]]
c34136b[[BR]]
e1f6962

ipa-2-2:

2271e0a[[BR]]
a79b4ce[[BR]]
71f4b2b

Note: paging for password policy page was disabled so that password policy order is right. There is a ticket for proper fix: #2677.

Metadata Update from @pvoborni:
- Issue assigned to mkosek
- Issue set to the milestone: FreeIPA 2.2 Core Effort - 2012/04

7 years ago

Login to comment on this ticket.

Metadata