RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1702651 - Command ipa conole is broken
Summary: Command ipa conole is broken
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: ipa
Version: 7.7
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: IPA Maintainers
QA Contact: ipa-qe
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-04-24 11:25 UTC by Sergey Orlov
Modified: 2019-08-06 13:09 UTC (History)
8 users (show)

Fixed In Version: ipa-4.6.5-8.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-08-06 13:09:37 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2019:2241 0 None None None 2019-08-06 13:09:54 UTC

Description Sergey Orlov 2019-04-24 11:25:14 UTC
Description of problem:
"ipa console" command fails with error

Version-Release number of selected component (if applicable):
ipa-server-4.6.5-6.el7.x86_64

How reproducible:
Stable

Steps to Reproduce:
1. install ipa server
2. run "ipa console"


Actual results:
ipa: ERROR: non-public: IOError: [Errno 2] No such file or directory
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/ipalib/backend.py", line 141, in execute
    return self.Command[_name](*args, **options)
  File "/usr/lib/python2.7/site-packages/ipalib/frontend.py", line 450, in __call__
    return self.__do_call(*args, **options)
  File "/usr/lib/python2.7/site-packages/ipalib/frontend.py", line 478, in __do_call
    ret = self.run(*args, **options)
  File "/usr/lib/python2.7/site-packages/ipalib/cli.py", line 1012, in run
    self._setup_tab_completion(local)
  File "/usr/lib/python2.7/site-packages/ipalib/cli.py", line 971, in _setup_tab_completion
    readline.read_history_file(history)
IOError: [Errno 2] No such file or directory
ipa: ERROR: an internal error has occurred


Expected results:
(Custom IPA interactive Python console)
    api: IPA API object
    pp: pretty printer


Additional info:
The error is at line 972 in /usr/lib/python2.7/site-packages/ipalib/cli.py: when history file does not exists IOError is raised, but the code expects it to be OSError.

Comment 3 Rob Crittenden 2019-04-24 14:07:31 UTC
It is due to this commit 10de2f37a25e1781026014ef1ee7180b17e8f422 which added readline tab completion and history support.

Looks like python 3 raises a different exception.

Comment 4 Christian Heimes 2019-04-24 14:19:23 UTC
In Python 3, IOError is OSError. I suggest to only modify the 4.7 branch and simply catch IOError.

Comment 5 Sergey Orlov 2019-04-24 14:19:41 UTC
Upstream ticket:
https://pagure.io/freeipa/issue/7922

Comment 6 Sergey Orlov 2019-04-24 14:21:46 UTC
Christian, may be you mean 4.6 branch?

Comment 7 Christian Heimes 2019-04-24 15:06:40 UTC
4.7 with backport to 4.6.

Master supports only Python 3 and does not need fixing.

Comment 8 Christian Heimes 2019-04-26 12:29:20 UTC
Fixed upstream
ipa-4-7:
https://pagure.io/freeipa/c/818f94d8d9ab08e72bac9ba61b6fd2a733df5ebf

Comment 9 Christian Heimes 2019-04-26 13:49:55 UTC
Fixed upstream
ipa-4-6:
https://pagure.io/freeipa/c/0082ddf2df0e27649c4d6637ef850fd7238ef28b

Comment 14 errata-xmlrpc 2019-08-06 13:09:37 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.

https://access.redhat.com/errata/RHBA-2019:2241


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