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 2151513 - upstream test t_discover_uri.py failed [rhel-9.2]
Summary: upstream test t_discover_uri.py failed [rhel-9.2]
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 9
Classification: Red Hat
Component: krb5
Version: 9.2
Hardware: Unspecified
OS: Unspecified
unspecified
low
Target Milestone: beta
: ---
Assignee: Julien Rische
QA Contact: Filip Dvorak
URL:
Whiteboard:
Depends On: 1993463 1995196
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-12-07 12:33 UTC by Julien Rische
Modified: 2023-05-09 10:42 UTC (History)
2 users (show)

Fixed In Version: krb5-1.20.1-3.el9
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 1993463
Environment:
Last Closed: 2023-05-09 08:25:24 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker FREEIPA-9146 0 None None None 2022-12-07 12:42:26 UTC
Red Hat Issue Tracker RHELPLAN-141528 0 None None None 2022-12-07 12:42:33 UTC
Red Hat Product Errata RHSA-2023:2570 0 None None None 2023-05-09 08:26:08 UTC

Description Julien Rische 2022-12-07 12:33:55 UTC
This issue is affecting the tests migration to TMT. In the context of a side-tag, all the subpackages are installed simultaneously. However some packages that are typically part of the same side-tag (like FreeIPA) depend on sssd-client, which is conflicting with krb5-tests.

As a consequence, upstream tests have to be patched in order to work with the sssd_krb5_locator_plugin.so plugin provided by sssd-client.

+++ This bug was initially created as a clone of Bug #1993463 +++

Description of problem:
The upstream tests t_discover_uri.py started to fail with krb5-1.19.1-11 on the new compose RHEL-9.0.0-20210810.1.

Version-Release number of selected component (if applicable):
RHEL-9.0.0-20210810.1
krb5-1.19.1-11.el9
resolv_wrapper-1.1.7-1.fc34

How reproducible:


Steps to Reproduce:
1.rpmbuild -ba ~/rpmbuild/SPECS/krb5.spec
2.make runenv.py -C /root/rpmbuild/BUILD/krb5-1.19.1/src
3.PYTHONPATH=/root/rpmbuild/BUILD/krb5-1.19.1/src/util /usr/bin/python3 ./t_discover_uri.py -v

Actual results:
# PYTHONPATH=/root/rpmbuild/BUILD/krb5-1.19.1/src/util /usr/bin/python3 ./t_discover_uri.py -v
*** [1] Executing: ./t_locate_kdc TEST
in module_locate_server
ran off end of plugin list
looking in krb5.conf for realm TEST entry kdc; ports 88,0
config file lookup failed: Profile relation not found
t_locate_kdc: Cannot find KDC for requested realm - exiting
*** [1] Completed with return code 1
*** Failure: ./t_locate_kdc failed with code 1.
*** Last command (#1): ./t_locate_kdc TEST
*** Output of last command:
in module_locate_server
ran off end of plugin list
looking in krb5.conf for realm TEST entry kdc; ports 88,0
config file lookup failed: Profile relation not found
t_locate_kdc: Cannot find KDC for requested realm - exiting
Use --debug=NUM to run a command under a debugger.  Use
--stop-after=NUM to stop after a daemon is started in order to
attach to it with a debugger.  Use --help to see other
options.


Expected results:
t_discover_uri.py should pass.

Additional info:

--- Additional comment from Robbie Harwood on 2021-08-18 14:25:34 UTC ---

upstream trunk is broken as well, even on rawhide.

--- Additional comment from Robbie Harwood on 2021-08-18 15:47:52 UTC ---

This is a bit awkward since resolv_wrapper isn't packaged for RHEL, so rather than reassign I'm going to mark this as blocked on the Fedora ticket.

--- Additional comment from Julien Rische on 2022-05-03 16:00:38 UTC ---

I tried to reproduce this error on RHEL-9.1.0-20220424.2 with:
* krb5-1.19.1-18
* resolv_wrapper-1.1.7-4.fc36

# PYTHONPATH=/root/rpmbuild/BUILD/krb5-1.19.1/src/util /usr/bin/python3 ./t_discover_uri.py -v
*** [1] Executing: ./t_locate_kdc TEST
in module_locate_server
element 0 is 0x7fbd56369cc0
plugin doesn't handle this realm (KRB5_PLUGIN_NO_HANDLE)
ran off end of plugin list
looking in krb5.conf for realm TEST entry kdc; ports 88,0
config file lookup failed: Profile relation not found
7 servers:
0: h:kdc1 t:https p:443 m:0 P:
1: h:kdc2 t:https p:443 m:1 P:path
2: h:kdc3 t:https p:300 m:0 P:path
3: h:KDC4 t:udp p:88 m:1 P:
4: h:kdc5 t:tcp p:500 m:0 P:
5: h:192.168.1.6 t:tcp p:88 m:0 P:
6: h:dead:beef:cafe:7 t:tcp p:700 m:0 P:
*** [1] Completed with return code 0
*** Failure: URI answers do not match
*** Last command (#1): ./t_locate_kdc TEST
*** Output of last command:
in module_locate_server
element 0 is 0x7fbd56369cc0
plugin doesn't handle this realm (KRB5_PLUGIN_NO_HANDLE)
ran off end of plugin list
looking in krb5.conf for realm TEST entry kdc; ports 88,0
config file lookup failed: Profile relation not found
7 servers:
0: h:kdc1 t:https p:443 m:0 P:
1: h:kdc2 t:https p:443 m:1 P:path
2: h:kdc3 t:https p:300 m:0 P:path
3: h:KDC4 t:udp p:88 m:1 P:
4: h:kdc5 t:tcp p:500 m:0 P:
5: h:192.168.1.6 t:tcp p:88 m:0 P:
6: h:dead:beef:cafe:7 t:tcp p:700 m:0 P:
Use --debug=NUM to run a command under a debugger.  Use
--stop-after=NUM to stop after a daemon is started in order to
attach to it with a debugger.  Use --help to see other
options.

Filip, do you think this error is still related to resolv_wrapper?

--- Additional comment from Julien Rische on 2022-05-13 16:42:12 UTC ---

Looking at this code from t_discover_uri.py[1], we see the error is caused by a mismatch between the expected and actual outputs:

===
j = 0
for i in range(4, 12):
    if l[i].strip() != expected[j]:
        fail('URI answers do not match')
    j += 1
===

Lines are compared one buy one, but skipping the 4 first lines are skipped. This is because these lines are log messages. However, we have 6 lines:

===
in module_locate_server
element 0 is 0x7fbd56369cc0
plugin doesn't handle this realm (KRB5_PLUGIN_NO_HANDLE)
ran off end of plugin list
looking in krb5.conf for realm TEST entry kdc; ports 88,0
config file lookup failed: Profile relation not found
===

Actually, this is because the default "service_locator" plugin is not the only one being, as it should be. The SSSD one is tried first:

/usr/lib64/krb5/plugins/libkrb5/sssd_krb5_locator_plugin.so provided by sssd-client

However, this plugin ignores some parts of the custom environment that is being setup for this test, including the TEST realm which is unknown to SSSD. Hence the get_krb5info() call[2] fails for this realm, resulting in 2 extra lines of error logs.

After uninstalling sssd-client, we obtain the 4 expected heading log lines, and the test succeed:

===
in module_locate_server
ran off end of plugin list
looking in krb5.conf for realm TEST entry kdc; ports 88,0
config file lookup failed: Profile relation not found
===

I think we are 2 options here:
* Modify t_discover_uri.py to start comparison at the 7th line
* Make sure sssd-client is not installed on the test host


[1] https://github.com/krb5/krb5/blob/krb5-1.19.1-final/src/lib/krb5/os/t_discover_uri.py
[2] https://github.com/SSSD/sssd/blob/2.6.2/src/krb5_plugin/sssd_krb5_locator_plugin.c#L493

Comment 8 errata-xmlrpc 2023-05-09 08:25:24 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 (Moderate: krb5 security, 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/RHSA-2023:2570


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