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 2079698 - Output raised AttributeError: 'str' object has no attribute 'render' when output_type="" is specified in ipahealthcheck.conf file.
Summary: Output raised AttributeError: 'str' object has no attribute 'render' when out...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 9
Classification: Red Hat
Component: ipa-healthcheck
Version: 9.1
Hardware: Unspecified
OS: Unspecified
medium
unspecified
Target Milestone: rc
: ---
Assignee: Rob Crittenden
QA Contact: ipa-qe
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-04-28 06:19 UTC by Sudhir Menon
Modified: 2022-11-15 11:21 UTC (History)
3 users (show)

Fixed In Version: ipa-healthcheck-0.9-8.el9
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-11-15 10:22:33 UTC
Type: Bug
Target Upstream Version:
Embargoed:
pm-rhel: mirror+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker FREEIPA-8204 0 None None None 2022-04-28 06:23:18 UTC
Red Hat Issue Tracker RHELPLAN-120296 0 None None None 2022-04-28 06:23:22 UTC
Red Hat Product Errata RHBA-2022:8113 0 None None None 2022-11-15 10:22:43 UTC

Description Sudhir Menon 2022-04-28 06:19:45 UTC
Description of problem: Output raised AttributeError: 'str' object has no attribute 'render' when output_type="" is specified in ipahealthcheck.conf file.

Version-Release number of selected component (if applicable):
ipa-healthcheck-0.9-5.el9.noarch

How reproducible:
Always

Steps to Reproduce:
1. Install ipa-healthcheck
2. Edit ipahealthcheck.conf file as below

[root@server ~]# cat /etc/ipahealthcheck/ipahealthcheck.conf 
[default]
output_type=


Actual results:
[root@server ~]# ipa-healthcheck --all
Unhandler rdtype 256
Unhandler rdtype 256
Unhandler rdtype 256
Unhandler rdtype 256
Output raised AttributeError: 'str' object has no attribute 'render'

Expected results: Instead of the above error message its better to display user-friendly message. 

Additional info:

Comment 1 Michal Polovka 2022-05-18 14:20:56 UTC
Pre-verified manually using RHEL9.1 machine with ipa-healthcheck-0.9-7.el9.noarch  

# cat /etc/ipahealthcheck/ipahealthcheck.conf
[default]
output_type=""

# ipa-healthcheck --all
Unhandler rdtype 256
Unhandler rdtype 256
Unhandler rdtype 256
Unhandler rdtype 256
Output raised AttributeError: 'str' object has no attribute 'render'

The original issue is still present, therefore marking as failed pre-verification. Automation in progress.

Comment 2 Rob Crittenden 2022-05-18 15:38:55 UTC
It actually affects anything not know, so output_type=foo fails as well. Looking into it.

Comment 3 Rob Crittenden 2022-05-18 15:42:04 UTC
I did not backport the complete fix.

Comment 4 Rob Crittenden 2022-05-18 15:44:25 UTC
Missing upstream commit eb6cb8ec7abad0d627ad82fb2761fa313849f2fc

Comment 8 Michal Polovka 2022-05-25 11:06:22 UTC
Moving back to Modified, as it needs pre-verification.

Comment 9 Michal Polovka 2022-05-25 11:09:52 UTC
Pre-verified using automation from tests/test_options.py::test_incorrect_output_type_cfg_file with the package ipa-healthcheck-0.9-8.el9.noarch

# python3 -m pytest -vvv tests/test_options.py 
==================================================================================== test session starts =====================================================================================
platform linux -- Python 3.9.10, pytest-6.2.2, py-1.10.0, pluggy-0.13.1 -- /usr/bin/python3
cachedir: .pytest_cache
rootdir: /root/freeipa-healthcheck
collected 3 items                                                                                                                                                                            

tests/test_options.py::test_options_merge PASSED                                                                                                                                       [ 33%]
tests/test_options.py::test_cfg_file_debug_option PASSED                                                                                                                               [ 66%]
tests/test_options.py::test_incorrect_output_type_cfg_file PASSED                                                                                                                      [100%]

===================================================================================== 3 passed in 1.85s ======================================================================================

Therefore marking as pre-verified: tested.

Comment 11 Michal Polovka 2022-05-27 05:49:42 UTC
Verified using the automation from with the package ipa-healthcheck-0.9-8.el9.noarch tests/test_options.py::test_incorrect_output_type_cfg_file on RHEL9.1 machine

# python3 -m pytest -vvv tests/test_options.py 
==================================================================================== test session starts =====================================================================================
platform linux -- Python 3.9.10, pytest-6.2.2, py-1.10.0, pluggy-0.13.1 -- /usr/bin/python3
cachedir: .pytest_cache
rootdir: /root/freeipa-healthcheck
collected 3 items                                                                                                                                                                            

tests/test_options.py::test_options_merge PASSED                                                                                                                                       [ 33%]
tests/test_options.py::test_cfg_file_debug_option PASSED                                                                                                                               [ 66%]
tests/test_options.py::test_incorrect_output_type_cfg_file PASSED                                                                                                                      [100%]

===================================================================================== 3 passed in 2.54s ======================================================================================


Therefore marking as verified.

Comment 13 errata-xmlrpc 2022-11-15 10:22:33 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 (ipa-healthcheck bug fix and enhancement update), 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-2022:8113


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