#8345 ipa-adtrust-install fails when replica is offline
Closed: fixed by frenaud. Opened by frenaud.

Ticket was cloned from Red Hat Bugzilla (product Red Hat Enterprise Linux 7): Bug 1842950

Created attachment 1694442
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

Metadata Update from @frenaud:
- Custom field rhbz adjusted to https://bugzilla.redhat.com/show_bug.cgi?id=1842950

The issue happens on RHEL7 because python2 is used instead of python3.
The fix is required on ipa-4-6 branch only (other branches moved to python3).

Metadata Update from @frenaud:
- Issue assigned to frenaud

Metadata Update from @frenaud:
- Custom field on_review adjusted to https://github.com/freeipa/freeipa/pull/4738
- Custom field test_case adjusted to test_integration/test_adtrust_install.py::TestIpaAdTrustInstall::()::test_add_agent_on_stopped_replica

ipa-4-6:

  • dad858a70c551a00fa1cf8f1c7ac3f6122b6df24 ipa-adtrust-install: avoid failure when replica is offline

Metadata Update from @frenaud:
- Issue close_status updated to: fixed
- Issue status updated to: Closed (was: Open)

Metadata