Bug 1487580

Summary: Navigating to Topology - Server Roles in IPA UI displays IPA Error 4031: EmptyResult
Product: Red Hat Enterprise Linux 7 Reporter: Sudhir Menon <sumenon>
Component: ipaAssignee: IPA Maintainers <ipa-maint>
Status: CLOSED WONTFIX QA Contact: ipa-qe <ipa-qe>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.4CC: pvoborni, pvomacka, rcritten, tscherf
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-09-22 18:17:01 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:
Bug Depends On: 1487653    
Bug Blocks:    

Description Sudhir Menon 2017-09-01 10:33:57 UTC
Description of problem: Navigating to Topology - Server Roles in IPA UI displays IPA Error 4031: EmptyResult


Version-Release number of selected component (if applicable):
ipa-server-4.5.0-21.el7_4.1.x86_64

How reproducible: Always


Steps to Reproduce:
1. Install Trust with AD from cli
2. Navigate to IPA Server -- Topology -- Server Roles.


Actual results:
The page displays "IPA Error 4031: EmptyResult" no matching entry found

[Fri Sep 01 06:28:37.445094 2017] [:error] [pid 15262] ipa: DEBUG: WSGI wsgi_dispatch.__call__:
[Fri Sep 01 06:28:37.445292 2017] [:error] [pid 15262] ipa: DEBUG: WSGI jsonserver_session.__call__:
[Fri Sep 01 06:28:37.674934 2017] [:error] [pid 15262] ipa: DEBUG: Created connection context.ldap2_94339510799440
[Fri Sep 01 06:28:37.675153 2017] [:error] [pid 15262] ipa: DEBUG: WSGI jsonserver.__call__:
[Fri Sep 01 06:28:37.675287 2017] [:error] [pid 15262] ipa: DEBUG: WSGI WSGIExecutioner.__call__:
[Fri Sep 01 06:28:37.676043 2017] [:error] [pid 15262] ipa: DEBUG: raw: server_role_find(None, sizelimit=0, version=u'2.228')
[Fri Sep 01 06:28:37.676558 2017] [:error] [pid 15262] ipa: DEBUG: server_role_find(None, sizelimit=0, all=False, raw=False, version=u'2.228')
[Fri Sep 01 06:28:37.689190 2017] [:error] [pid 15262] ipa: DEBUG: WSGI wsgi_execute PublicError: Traceback (most recent call last):
[Fri Sep 01 06:28:37.689236 2017] [:error] [pid 15262]   File "/usr/lib/python2.7/site-packages/ipaserver/rpcserver.py", line 367, in wsgi_execute
[Fri Sep 01 06:28:37.689246 2017] [:error] [pid 15262]     result = command(*args, **options)
[Fri Sep 01 06:28:37.689254 2017] [:error] [pid 15262]   File "/usr/lib/python2.7/site-packages/ipalib/frontend.py", line 447, in __call__
[Fri Sep 01 06:28:37.689263 2017] [:error] [pid 15262]     return self.__do_call(*args, **options)
[Fri Sep 01 06:28:37.689270 2017] [:error] [pid 15262]   File "/usr/lib/python2.7/site-packages/ipalib/frontend.py", line 475, in __do_call
[Fri Sep 01 06:28:37.689278 2017] [:error] [pid 15262]     ret = self.run(*args, **options)
[Fri Sep 01 06:28:37.689286 2017] [:error] [pid 15262]   File "/usr/lib/python2.7/site-packages/ipalib/frontend.py", line 797, in run
[Fri Sep 01 06:28:37.689295 2017] [:error] [pid 15262]     return self.execute(*args, **options)
[Fri Sep 01 06:28:37.689302 2017] [:error] [pid 15262]   File "/usr/lib/python2.7/site-packages/ipaserver/plugins/serverrole.py", line 152, in execute
[Fri Sep 01 06:28:37.689311 2017] [:error] [pid 15262]     status=status)
[Fri Sep 01 06:28:37.689319 2017] [:error] [pid 15262]   File "/usr/lib/python2.7/site-packages/ipaserver/plugins/serverroles.py", line 116, in server_role_search
[Fri Sep 01 06:28:37.689327 2017] [:error] [pid 15262]     role_status = found_role.status(self.api, server=server_server)
[Fri Sep 01 06:28:37.689335 2017] [:error] [pid 15262]   File "/usr/lib/python2.7/site-packages/ipaserver/servroles.py", line 538, in status
[Fri Sep 01 06:28:37.689343 2017] [:error] [pid 15262]     api_instance, server=server, attrs_list=('ipaConfigString', 'cn'))
[Fri Sep 01 06:28:37.689351 2017] [:error] [pid 15262]   File "/usr/lib/python2.7/site-packages/ipaserver/servroles.py", line 216, in status
[Fri Sep 01 06:28:37.689359 2017] [:error] [pid 15262]     self._fill_in_absent_masters(ldap2, api_instance, result))
[Fri Sep 01 06:28:37.689367 2017] [:error] [pid 15262]   File "/usr/lib/python2.7/site-packages/ipaserver/servroles.py", line 174, in _fill_in_absent_masters
[Fri Sep 01 06:28:37.689375 2017] [:error] [pid 15262]     attrs_list=attrs_list)
[Fri Sep 01 06:28:37.689383 2017] [:error] [pid 15262]   File "/usr/lib/python2.7/site-packages/ipapython/ipaldap.py", line 1317, in get_entries
[Fri Sep 01 06:28:37.689391 2017] [:error] [pid 15262]     **kwargs)
[Fri Sep 01 06:28:37.689398 2017] [:error] [pid 15262]   File "/usr/lib/python2.7/site-packages/ipapython/ipaldap.py", line 1448, in find_entries
[Fri Sep 01 06:28:37.689411 2017] [:error] [pid 15262]     raise errors.EmptyResult(reason='no matching entry found')
[Fri Sep 01 06:28:37.689418 2017] [:error] [pid 15262] EmptyResult: no matching entry found
[Fri Sep 01 06:28:37.689426 2017] [:error] [pid 15262] 

Expected results: The error should be fixed and proper message should be displayed.

Additional info:

Comment 2 Sudhir Menon 2017-09-01 13:54:57 UTC
Had tried the option 'Delete Server' which caused this issue.

Comment 3 Petr Vobornik 2017-09-01 21:04:22 UTC
So this happens when you delete the last server in topology from Web UI, but Web UI is still up and running and API as well?

Comment 4 Pavel Vomacka 2017-09-04 08:28:33 UTC
After 'Server Del' on a standalone server: WebUI files will be still loaded in the browser. HTTPD server is still running and several API calls still work (i.e. user_find/user_show/json_metadata, etc). But API call 'config-show' fails and therefore the whole WebUI fails and is not usable.

Comment 5 Petr Vobornik 2017-09-22 18:17:01 UTC
This is a situation where server is doomed anyway so there is no point to fix it.