#8692 Nightly test failure in test_integration/test_ipahealthcheck/TestIpaHealthCheckWithADtrust
Closed: worksforme 2 years ago by mpolovka. Opened 3 years ago by mpolovka.

test_ipahealthcheck_trust_domainscheck
test_ipahealthcheck_with_external_ad_trust

are failing in PR689 with

    def test_ipahealthcheck_trust_domainscheck(self):
        """
        This testcase checks when trust between IPA-AD is established,
        IPATrustDomainsCheck displays result as SUCCESS and also
        displays ADREALM as sssd/trust domains
        """
        returncode, data = run_healthcheck(
            self.master, "ipahealthcheck.ipa.trust", "IPATrustDomainsCheck"
        )
        assert returncode == 0
        trust_domains = ', '.join((self.ad_domain, self.ad_subdomain,))
        for check in data:
            if check["kw"]["key"] == "domain-list":
                assert check["result"] == "SUCCESS"
>               assert (
                    check["kw"]["sssd_domains"] == trust_domains
                    and check["kw"]["trust_domains"] == trust_domains
E                   AssertionError: assert ('ad.test' == 'ad.test, child.ad.test'
E                     - ad.test, child.ad.test
E                     + ad.test)

and

>               assert check["kw"]["sssd_domains"] == trust_domains
E               AssertionError: assert 'ad.test, adtree.test' == 'ad.test, chi..., adtree.test'
E                 - ad.test, child.ad.test, adtree.test
E                 + ad.test, adtree.test

respectively.

Full logs


Another failure in the same test function observed in [testing_ipa-4.9_latest] Nightly PR #771

    def test_ipahealthcheck_with_external_ad_trust(self):
        """
        This testcase checks that when external trust is configured
        between IPA and AD tree domain, IPATrustDomainsCheck
        doesnot display ERROR
        """
        tasks.configure_dns_for_trust(self.master, self.tree_ad)
>       tasks.establish_trust_with_ad(
            self.master, self.ad_treedomain,
            extra_args=['--range-type', 'ipa-ad-trust', '--external=True'])

test_integration/test_ipahealthcheck.py:1643: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
pytest_ipa/integration/tasks.py:731: in establish_trust_with_ad
    run_repeatedly(
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

host = <ipatests.pytest_ipa.integration.host.Host master.ipa.test (master)>
command = ['ipa', 'trust-add', '--type', 'ad', 'adtree.test', '--range-type', ...]
assert_zero_rc = True, test = None, timeout = 30
kwargs = {'stdin_text': 'Secret123'}, time_waited = 32, time_step = 2
result = <pytest_multihost.transport.SSHCommand object at 0x7f885f6508b0>
return_code_ok = False, test_ok = True

    def run_repeatedly(host, command, assert_zero_rc=True, test=None,
                       timeout=30, **kwargs):
        """
        Runs command on host repeatedly until it's finished successfully (returns
        0 exit code and its stdout passes the test function).

        Returns True if the command was executed succesfully, False otherwise.

        This method accepts additional kwargs and passes these arguments
        to the actual run_command method.
        """

        time_waited = 0
        time_step = 2

        # Check that the test is a function
        if test:
            assert callable(test)

        while(time_waited <= timeout):
            result = host.run_command(command, raiseonerr=False, **kwargs)

            return_code_ok = not assert_zero_rc or (result.returncode == 0)
            test_ok = not test or test(result.stdout_text)

            if return_code_ok and test_ok:
                # Command successful
                return True
            else:
                # Command not successful
                time.sleep(time_step)
                time_waited += time_step

>       raise AssertionError("Command: {cmd} repeatedly failed {times} times, "
                             "exceeding the timeout of {timeout} seconds."
                             .format(cmd=' '.join(command),
                                     times=timeout // time_step,
                                     timeout=timeout))
E       AssertionError: Command: ipa trust-add --type ad adtree.test --range-type ipa-ad-trust --external=True --admin Administrator@adtree.test --password repeatedly failed 15 times, exceeding the timeout of 30 seconds.

Full logs

This does not appear to be a healthcheck issue but one probably related to setting up the trust in automation.

It might be helpful to run ipa-healthcheck with --debug to get the sssd output but its likely to just confirm what healthcheck is reporting, that one of the domains is missing from sssctl domain-list

But it could also show the output of sssctl domain-status CHILD-DOMAIN</code.

Another failure in PR #1012, [testing_master_previous]

This seems to be a transient issue tied to the setting up the trust. Also, it didn't resurface since, therefore I vote for closing it. If the error occurs again, feel free to open it.

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

2 years ago

Login to comment on this ticket.

Metadata