Bug 1842950

Summary: ipa-adtrust-install fails when replica is offline
Product: Red Hat Enterprise Linux 7 Reporter: Sergey Orlov <sorlov>
Component: ipaAssignee: Florence Blanc-Renaud <frenaud>
Status: CLOSED ERRATA QA Contact: ipa-qe <ipa-qe>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.9CC: ksiddiqu, pcech, rcritten, tscherf
Target Milestone: rcKeywords: TestCaseProvided
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: ipa-4.6.8-4.el7 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-09-29 19:59:37 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Sergey Orlov 2020-06-02 12:45:09 UTC
Created attachment 1694442 [details]
failed_test_test_add_agent_on_stopped_replica.txt

Description of problem:
The problem found during verification of https://bugzilla.redhat.com/1817919.
Command ipa-adtrust-install fails when one of the replicas is down.


Version-Release number of selected component (if applicable):
ipa-server-trust-ad-4.6.8-3.el7.x86_64

How reproducible:
Always

Steps to Reproduce:
1. install IPA server + one replica
2. On IPA replica: ipactl stop
3. On IPA server: ipa-adtrust-install --add-agents

Actual results:
...
WARNING: 1 IPA masters are not yet able to serve information about users from trusted forests.
Installer can add them to the list of IPA masters allowed to access information about trusts.
If you choose to do so, you also need to restart LDAP service on those masters.
Refer to ipa-adtrust-install(1) man page for details.

IPA master [replica1.testrelm.test]? [no]: yes

[Errno 111] Connection refused
[root@master1 vagrant]# echo $?
1

Expected results:
Command succeeds and writes message that ipa and sssd need to be restarted.


Additional info:
Attached file failed_test_test_add_agent_on_stopped_replica.txt contains test report for upstream test test_integration/test_adtrust_install.py::test_add_agent_on_stopped_replica

Created attachment 1694442 [details]
failed_test_test_add_agent_on_stopped_replica.txt

Comment 2 Florence Blanc-Renaud 2020-06-03 11:13:29 UTC
Upstream ticket:
https://pagure.io/freeipa/issue/8345

Comment 3 Florence Blanc-Renaud 2020-06-04 15:25:56 UTC
Fixed upstream
ipa-4-6:
https://pagure.io/freeipa/c/dad858a70c551a00fa1cf8f1c7ac3f6122b6df24

Note: the fix is specific to ipa-4-6 branch because rhel7 is still using python2, no fix required on other branches.

Comment 6 Sergey Orlov 2020-06-08 10:27:30 UTC
Fix verified:
ipa-server-4.6.8-4.el7.x86_64

test_integration/test_adtrust_install.py::TestIpaAdTrustInstall::test_samba_config_file PASSED [ 16%]
test_integration/test_adtrust_install.py::TestIpaAdTrustInstall::test_add_agent_not_allowed PASSED [ 33%]
test_integration/test_adtrust_install.py::TestIpaAdTrustInstall::test_add_agent_on_stopped_replica PASSED [ 50%]
test_integration/test_adtrust_install.py::TestIpaAdTrustInstall::test_add_agent_on_running_replica_without_compat PASSED [ 66%]
test_integration/test_adtrust_install.py::TestIpaAdTrustInstall::test_add_agent_on_running_replica_with_compat PASSED [ 83%]
test_integration/test_adtrust_install.py::TestIpaAdTrustInstall::test_schema_compat_attribute PASSED [100%]

Comment 8 errata-xmlrpc 2020-09-29 19:59: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 (Moderate: ipa 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-2020:3936