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 1679958 - "ipa help topics/commands" sporadically tracebacks
Summary: "ipa help topics/commands" sporadically tracebacks
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: ipa
Version: 7.6
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: François Cami
QA Contact: ipa-qe
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-02-22 10:59 UTC by amitkuma
Modified: 2019-10-28 11:39 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-03-20 09:07:19 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Knowledge Base (Solution) 3988141 0 Customize or extend None What should PAGER be set to for users using the "ipa" command? 2019-03-14 14:27:14 UTC

Description amitkuma 2019-02-22 10:59:06 UTC
Description of problem:
# ipa help cert
ipa: ERROR: non-public: OSError: [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 833, in run
    self.print_commands(name, outfile)
  File "/usr/lib/python2.7/site-packages/ipalib/cli.py", line 907, in print_commands
    writer.write()
  File "/usr/lib/python2.7/site-packages/ipalib/cli.py", line 716, in write
    open_in_pager(data)
  File "/usr/lib/python2.7/site-packages/ipalib/util.py", line 1206, in open_in_pager
    pager_process = subprocess.Popen([pager], stdin=subprocess.PIPE)
  File "/usr/lib64/python2.7/subprocess.py", line 711, in __init__
    errread, errwrite)
  File "/usr/lib64/python2.7/subprocess.py", line 1327, in _execute_child
    raise child_exception
OSError: [Errno 2] No such file or directory
ipa: ERROR: an internal error has occurred

******Alexander Bokovoy*******
https://pagure.io/freeipa/issue/7746, this is fixed in RHEL 8.
******************************

****Customer's response on upgrade*****
unfortunately RHEL8 beta isn't really an option for us in the productive environment.
***************************************

********Investigation************
ipa was trying to print_commands().
goes for writing writer.write(), which is all good. But now, it finds buffer_length > terminal_height(), which should not happen and calls pager.

        def write(self):
            if self.buffer_length > get_terminal_height():
                data = "\n".join(self.buffer).encode("utf-8")
                open_in_pager(data)
            else:
                try:
                    for line in self.buffer:
                        print(line, file=self.outfile)
                except IOError:
                    pass

In open_in_pager(), ipa process cannot communicate with pager process. popen(). Perhaps its not running and throws. [Errno 2] No such file or directory

def open_in_pager(data):
    pager = os.environ.get("PAGER", "less")
    pager_process = subprocess.Popen([pager], stdin=subprocess.PIPE)

        def write(self):
            if self.buffer_length > get_terminal_height():
                data = "\n".join(self.buffer).encode("utf-8")
                open_in_pager(data)

PAGER is an environmental variable commonly used for specifying an application that accepts standard input and shows it on
standard output per page: more, less, etc. It is a traditional way to customize access to such pagers from multiple applications. See, for example, https://en.wikipedia.org/wiki/Terminal_pager.
*********************************

-Customer expects to backport fix in rhel7.

Version-Release number of selected component (if applicable):
ipa-server-4.6.4-10.el7.x86_64.rpm  

How reproducible:
sporadically in customer Env

Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:
-

Comment 16 François Cami 2019-03-20 09:07:19 UTC
Red Hat Identity Management Engineering has evaluated this request, and while we recognize that it is a valid request, we do not expect this to be implemented in the product in the foreseeable future. This is due to other priorities for the product, and not a reflection on the request itself. We are therefore closing this out as WONTFIX. If you have any concerns about this, please feel free to reopen this bugzilla stating why it should be fixed.

Comment 17 amitkuma 2019-10-28 11:39:04 UTC
Customer cases closed, clearing the flag.
Will reopen if customer comes back.


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