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 1907481 - ipa: establishing trust fails on fetching domains from AD - oddjob locale issue
Summary: ipa: establishing trust fails on fetching domains from AD - oddjob locale issue
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: oddjob
Version: 8.4
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: 8.0
Assignee: Alexander Bokovoy
QA Contact: ipa-qe
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-12-14 15:33 UTC by Petr Vobornik
Modified: 2021-05-18 15:21 UTC (History)
4 users (show)

Fixed In Version: oddjob-0.34.7-1.el8
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-05-18 15:21:04 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Petr Vobornik 2020-12-14 15:33:19 UTC
Description of problem:
Found in FreeIPA upstream test_trust suite. Test, e.g.:  	test_integration/test_trust.py::TestTrust::()::test_establish_nonposix_trust

Version-Release number of selected component (if applicable):
ipa-server-4.9.0-0.5.rc3.module+el8.4.0+9124+ced20601.x86_64

How reproducible:
Run the test suite with the given version of package.


Expected results:
tests succeed (creation of trust works)


Additional info:
The test says:
E       AssertionError: Command: ipa trust-add --type ad ad.test --range-type ipa-ad-trust --admin Administrator --password repeatedly failed 15 times, exceeding the timeout of 30 seconds.

Command:
RUN ['ipa', 'trust-add', '--type', 'ad', 'ad.test', '--range-type', 'ipa-ad-trust', '--admin', 'Administrator', '--password']
transport.py               558 DEBUG    ipa: ERROR: error on server 'master.testrelm.test': Fetching domains from trusted forest failed. See details in the error_log
transport.py               217 DEBUG    Exit code: 1

httpd error_log entry on master:
```
ipa: ERROR: Helper fetch_domains was called for forest ad.test, return code is 1
ipa: ERROR: Standard output from the helper:
---

ipa: ERROR: Error output from the helper:
Traceback (most recent call last):
  File "/usr/libexec/ipa/oddjob/com.redhat.idm.trust-fetch-domains", line 168, in <module>
    in_server=True, log=None, context="server", confdir=paths.ETC_IPA
  File "/usr/lib/python3.6/site-packages/ipalib/plugable.py", line 503, in bootstrap
    raise errors.SystemEncodingError(encoding=fse)
ipalib.errors.SystemEncodingError: System encoding must be UTF-8, 'iso8859-1' is not supported. Set LC_ALL="C.UTF-8", or LC_ALL="" and LC_CTYPE="C.UTF-8".
--

ipa: INFO: [jsonserver_session] admin: trust_add/1('ad.test', trust_type='ad', realm_admin='Administrator', realm_passwd='********', 
```

Comment 2 Petr Vobornik 2020-12-14 15:59:45 UTC
Calling:

# systemctl edit oddjobd

And adding:
```
[Service]
Environment=LC_ALL=C.UTF-8
```

Then:
# systemctl restart oddjobd

Seems to fix the issue.

Comment 6 Kaleem 2020-12-18 13:20:05 UTC
verified with nightly compose based on following details

IPA version: (snip from runner.log):
------------------------------------
2020-12-18T10:52:28+0000 ok: [master.testrelm.test] => (item=ipa-server) => 
2020-12-18T10:52:28+0000   msg:
2020-12-18T10:52:28+0000   - arch: x86_64
2020-12-18T10:52:28+0000     epoch: null
2020-12-18T10:52:28+0000     name: ipa-server
2020-12-18T10:52:28+0000     release: 0.5.rc3.module+el8.4.0+9124+ced20601
2020-12-18T10:52:28+0000     source: rpm
2020-12-18T10:52:28+0000     version: 4.9.0

oddjob version:
---------------
oddjob-0.34.7-1.el8.x86_64

Test results: (snip from test-result.txt):
-----------------------------------------

test_establish_nonposix_trust is successful now, error not seen any other tests. One failed test is due AD env issue which is being investigated.

============================= test session starts ==============================
platform linux -- Python 3.6.8, pytest-3.10.1, py-1.10.0, pluggy-0.13.1 -- /usr/libexec/platform-python
cachedir: /home/cloud-user/.pytest_cache
metadata: {'Python': '3.6.8', 'Platform': 'Linux-4.18.0-262.el8.x86_64-x86_64-with-redhat-8.4-Ootpa', 'Packages': {'pytest': '3.10.1', 'py': '1.10.0', 'pluggy': '0.13.1'}, 'Plugins': {'metadata': '1.11.0', 'html': '1.22.1', 'multihost': '3.0', 'sourceorder': '0.5'}}
rootdir: /usr/lib/python3.6/site-packages/ipatests, inifile:
plugins: metadata-1.11.0, html-1.22.1, multihost-3.0, sourceorder-0.5
collecting ... collected 45 items

test_integration/test_trust.py::TestTrust::test_establish_nonposix_trust PASSED [  2%]
test_integration/test_trust.py::TestTrust::test_trustdomains_found_in_nonposix_trust PASSED [  4%]
test_integration/test_trust.py::TestTrust::test_range_properties_in_nonposix_trust PASSED [  6%]
test_integration/test_trust.py::TestTrust::test_user_gid_uid_resolution_in_nonposix_trust PASSED [  8%]
test_integration/test_trust.py::TestTrust::test_ipa_commands_run_as_aduser PASSED [ 11%]
test_integration/test_trust.py::TestTrust::test_ipa_management_run_as_aduser PASSED [ 13%]
test_integration/test_trust.py::TestTrust::test_password_login_as_aduser PASSED [ 15%]
test_integration/test_trust.py::TestTrust::test_ipauser_authentication_with_nonposix_trust PASSED [ 17%]
test_integration/test_trust.py::TestTrust::test_upn_in_nonposix_trust PASSED [ 20%]
test_integration/test_trust.py::TestTrust::test_upn_user_resolution_in_nonposix_trust PASSED [ 22%]
test_integration/test_trust.py::TestTrust::test_upn_user_authentication_in_nonposix_trust PASSED [ 24%]
test_integration/test_trust.py::TestTrust::test_remove_nonposix_trust PASSED [ 26%]
test_integration/test_trust.py::TestTrust::test_subordinate_suffix FAILED [ 28%]
test_integration/test_trust.py::TestTrust::test_remove_subordinate_suffixes_trust PASSED [ 31%]
test_integration/test_trust.py::TestTrust::test_establish_posix_trust PASSED [ 33%]
test_integration/test_trust.py::TestTrust::test_trustdomains_found_in_posix_trust PASSED [ 35%]
test_integration/test_trust.py::TestTrust::test_range_properties_in_posix_trust PASSED [ 37%]
test_integration/test_trust.py::TestTrust::test_user_uid_gid_resolution_in_posix_trust PASSED [ 40%]
test_integration/test_trust.py::TestTrust::test_user_without_posix_attributes_not_visible PASSED [ 42%]
test_integration/test_trust.py::TestTrust::test_override_homedir PASSED  [ 44%]
test_integration/test_trust.py::TestTrust::test_extdom_plugin PASSED     [ 46%]
test_integration/test_trust.py::TestTrust::test_remove_posix_trust PASSED [ 48%]
test_integration/test_trust.py::TestTrust::test_invalid_range_types PASSED [ 51%]
test_integration/test_trust.py::TestTrust::test_establish_external_subdomain_trust PASSED [ 53%]
test_integration/test_trust.py::TestTrust::test_trustdomains_found_in_external_subdomain_trust PASSED [ 55%]
test_integration/test_trust.py::TestTrust::test_user_gid_uid_resolution_in_external_subdomain_trust PASSED [ 57%]
test_integration/test_trust.py::TestTrust::test_remove_external_subdomain_trust PASSED [ 60%]
test_integration/test_trust.py::TestTrust::test_establish_nonexternal_subdomain_trust PASSED [ 62%]
test_integration/test_trust.py::TestTrust::test_establish_external_treedomain_trust PASSED [ 64%]
test_integration/test_trust.py::TestTrust::test_trustdomains_found_in_external_treedomain_trust PASSED [ 66%]
test_integration/test_trust.py::TestTrust::test_user_gid_uid_resolution_in_external_treedomain_trust PASSED [ 68%]
test_integration/test_trust.py::TestTrust::test_remove_external_treedomain_trust PASSED [ 71%]
test_integration/test_trust.py::TestTrust::test_establish_nonexternal_treedomain_trust PASSED [ 73%]
test_integration/test_trust.py::TestTrust::test_establish_external_rootdomain_trust PASSED [ 75%]
test_integration/test_trust.py::TestTrust::test_trustdomains_found_in_external_rootdomain_trust PASSED [ 77%]
test_integration/test_trust.py::TestTrust::test_remove_external_rootdomain_trust PASSED [ 80%]
test_integration/test_trust.py::TestTrust::test_establish_forest_trust_with_shared_secret PASSED [ 82%]
test_integration/test_trust.py::TestTrust::test_trustdomains_found_in_forest_trust_with_shared_secret PASSED [ 84%]
test_integration/test_trust.py::TestTrust::test_user_gid_uid_resolution_in_forest_trust_with_shared_secret PASSED [ 86%]
test_integration/test_trust.py::TestTrust::test_remove_forest_trust_with_shared_secret PASSED [ 88%]
test_integration/test_trust.py::TestTrust::test_establish_external_trust_with_shared_secret PASSED [ 91%]
test_integration/test_trust.py::TestTrust::test_trustdomains_found_in_external_trust_with_shared_secret PASSED [ 93%]
test_integration/test_trust.py::TestTrust::test_user_uid_resolution_in_external_trust_with_shared_secret PASSED [ 95%]
test_integration/test_trust.py::TestTrust::test_remove_external_trust_with_shared_secret PASSED [ 97%]
test_integration/test_trust.py::TestTrust::test_server_option_with_unreachable_ad PASSED [100%]

=================================== FAILURES ===================================
FAIL test_integration/test_trust.py::TestTrust::()::test_subordinate_suffix
==================== 1 failed, 44 passed in 2809.77 seconds ====================

Comment 9 errata-xmlrpc 2021-05-18 15:21:04 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 (oddjob 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-2021:1759


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