#8601 Nightly test failure in test_trust.py::TestTrust::test_subordinate_suffix
Closed: fixed 3 years ago by abbra. Opened 3 years ago by frenaud.

The nightly test test_trust.py::TestTrust::test_subordinate_suffix is failing on the master branch. See PR #554 with the following logs and report:

self = <ipatests.test_integration.test_trust.TestTrust object at 0x7fcb8e733160>

    def test_subordinate_suffix(self):
        """Test subordinate UPN Suffixes"""
>       tasks.configure_dns_for_trust(self.master, self.ad)

test_integration/test_trust.py:250: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
pytest_ipa/integration/tasks.py:601: in configure_dns_for_trust
    master.run_command(['ipa', 'dnsforwardzone-add', ad.domain.name,
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <ipatests.pytest_ipa.integration.host.Host master.ipa.test (master)>
argv = ['ipa', 'dnsforwardzone-add', 'ad.test', '--forwarder', '192.168.122.110', '--forward-policy', ...]
set_env = True, stdin_text = None, log_stdout = True, raiseonerr = True
cwd = None, bg = False, encoding = 'utf-8', ok_returncode = 0

    def run_command(self, argv, set_env=True, stdin_text=None,
                    log_stdout=True, raiseonerr=True,
                    cwd=None, bg=False, encoding='utf-8', ok_returncode=0):
        """Wrapper around run_command to log stderr on raiseonerr=True

        :param ok_returncode: return code considered to be correct,
                              you can pass an integer or sequence of integers
        """
        result = super().run_command(
            argv, set_env=set_env, stdin_text=stdin_text,
            log_stdout=log_stdout, raiseonerr=False, cwd=cwd, bg=bg,
            encoding=encoding
        )
        # in FIPS mode SSH may print noise to stderr, remove the string
        # "FIPS mode initialized" + optional newline.
        result.stderr_bytes = FIPS_NOISE_RE.sub(b'', result.stderr_bytes)
        try:
            result_ok = result.returncode in ok_returncode
        except TypeError:
            result_ok = result.returncode == ok_returncode
        if not result_ok and raiseonerr:
            result.log.error('stderr: %s', result.stderr_text)
>           raise subprocess.CalledProcessError(
                result.returncode, argv,
                result.stdout_text, result.stderr_text
            )
E           subprocess.CalledProcessError: Command '['ipa', 'dnsforwardzone-add', 'ad.test', '--forwarder', '192.168.122.110', '--forward-policy', 'only']' returned non-zero exit status 1.

The command fails with:

DEBUG    ipatests.pytest_ipa.integration.host.Host.master.cmd182:transport.py:513 RUN ['ipa', 'dnsforwardzone-add', 'ad.test', '--forwarder', '192.168.122.110', '--forward-policy', 'only']
DEBUG    ipatests.pytest_ipa.integration.host.Host.master.cmd182:transport.py:557 Server will check DNS forwarder(s).
DEBUG    ipatests.pytest_ipa.integration.host.Host.master.cmd182:transport.py:557 This may take some time, please wait ...
DEBUG    ipatests.pytest_ipa.integration.host.Host.master.cmd182:transport.py:557 ipa: ERROR: DNS forward zone with name "ad.test." already exists
DEBUG    ipatests.pytest_ipa.integration.host.Host.master.cmd182:transport.py:217 Exit code: 1
ERROR    ipatests.pytest_ipa.integration.host.Host.master.cmd182:host.py:199 stderr: ipa: ERROR: DNS forward zone with name "ad.test." already exists

The test needs to be called after the method test_remove_nonposix_trust. The current sequence is the following:
- test_establish_nonposix_trust:
- configure DNS for trust
- establish trust with ad
- other tests related to non posix...
- test_subordinate_suffix
- configure dns for trust <<<< Fails here
- establish trust with ad
- test_remove_nonposix_trust
- remove trust
- unconfigure dns for trust

test_subordinate_suffix needs to be moved later + needs an unconfigure sequence.


Metadata Update from @frenaud:
- Issue assigned to frenaud

3 years ago

Metadata Update from @frenaud:
- Custom field on_review adjusted to https://github.com/freeipa/freeipa/pull/5303

3 years ago

master:

  • 97aa70c ipatests: fix TestTrust::test_subordinate_suffix

ipa-4-8:

  • c1b50a7 ipatests: fix TestTrust::test_subordinate_suffix

ipa-4-9:

  • bf1d652 ipatests: fix TestTrust::test_subordinate_suffix

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

3 years ago

Login to comment on this ticket.

Metadata