Bug 1477243 - ipa help command returns traceback when no cache is present
Summary: ipa help command returns traceback when no cache is present
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: ipa
Version: 7.4
Hardware: Unspecified
OS: Unspecified
Target Milestone: rc
: ---
Assignee: IPA Maintainers
QA Contact: Michal Reznik
: 1544592 (view as bug list)
Depends On:
Blocks: 1493411
TreeView+ depends on / blocked
Reported: 2017-08-01 14:41 UTC by Pavel Vomacka
Modified: 2018-04-10 16:45 UTC (History)
8 users (show)

Fixed In Version: ipa-4.5.0-21.el7.2.2
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1493411 (view as bug list)
Last Closed: 2018-04-10 16:43:55 UTC
Target Upstream Version:

Attachments (Terms of Use)
verification_steps (2.24 KB, text/plain)
2017-12-13 09:50 UTC, Michal Reznik
no flags Details

System ID Priority Status Summary Last Updated
Fedora Pagure freeipa issue 7325 None None None 2018-02-06 16:28:35 UTC
Red Hat Product Errata RHBA-2018:0918 None None None 2018-04-10 16:45:26 UTC

Description Pavel Vomacka 2017-08-01 14:41:59 UTC
Description of problem:
When calling IPA command 'ipa help' for the first time the traceback is shown instead of valid output. 

Version-Release number of selected component (if applicable):
ipa-4.5.0-21.el7_4.1 and all older ipa-4.5.0 versions

How reproducible:

Steps to Reproduce:
1. Install ipa-server
2. kinit
3. call ipa help

Actual results:
Traceback which might be seen in Additional info.

Expected results:
See help.

Additional info:

ipa: WARNING: Failed to read schema: [Errno 2] No such file or directory: u'/home/user/.cache/ipa/schema/1/7a5de3fd'
ipa: ERROR: TypeError: 'NoneType' object has no attribute '__getitem__'
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/ipalib/cli.py", line 1351, in run
  File "/usr/lib/python2.7/site-packages/ipalib/cli.py", line 1101, in run
    cmd = self.get_command(argv)
  File "/usr/lib/python2.7/site-packages/ipalib/cli.py", line 1070, in get_command
  File "/usr/lib/python2.7/site-packages/ipalib/frontend.py", line 444, in __call__
  File "/usr/lib/python2.7/site-packages/ipalib/plugable.py", line 230, in ensure_finalized
  File "/usr/lib/python2.7/site-packages/ipalib/plugable.py", line 210, in finalize
  File "/usr/lib/python2.7/site-packages/ipalib/cli.py", line 733, in _on_finalize
    if c.NO_CLI:
  File "/usr/lib/python2.7/site-packages/ipaclient/remote_plugins/schema.py", line 247, in NO_CLI
    halp = self._schema[self.schema_key].get_help(self.full_name)
  File "/usr/lib/python2.7/site-packages/ipaclient/remote_plugins/schema.py", line 329, in get_help
    return self._schema.get_help(self.name, key)
  File "/usr/lib/python2.7/site-packages/ipaclient/remote_plugins/schema.py", line 520, in get_help
    return self._help[namespace][member]
TypeError: 'NoneType' object has no attribute '__getitem__'
ipa: ERROR: an internal error has occurred

Comment 2 Petr Vobornik 2017-08-07 11:37:57 UTC
Upstream ticket:

Comment 3 Petr Vobornik 2017-08-18 16:11:23 UTC
Upstream ticket:

Comment 7 Petr Vobornik 2017-09-01 21:05:36 UTC

    9308e63fde736ea4274a280f18c83a4bc2935c81 Store help in Schema before writing to disk
    7352b731169e4f995b3ffe254b9e0cae6b82a763 Disable pylint in get_help function because of type confusion.

Comment 10 Michal Reznik 2017-12-13 09:49:59 UTC
Verified on ipa-server-4.5.4-6.el7.x86_64

Comment 11 Michal Reznik 2017-12-13 09:50:44 UTC
Created attachment 1367217 [details]

Comment 12 Rob Crittenden 2018-02-13 16:19:40 UTC
*** Bug 1544592 has been marked as a duplicate of this bug. ***

Comment 15 errata-xmlrpc 2018-04-10 16:43:55 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.


Note You need to log in before you can comment on or make changes to this bug.