#8876 Nightly failure in test_installation.py::TestInstallWithCA1::test_install_with_bad_ldap_conf
Closed: fixed 2 years ago by frenaud. Opened 2 years ago by frenaud.

The nightly test test_installation.py::TestInstallWithCA1::test_install_with_bad_ldap_conf is randomly failing, see for instance PR #951 with the following report:

>   request.addfinalizer(lambda: cls().uninstall(self))

../pytest_multihost/plugin.py:79: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
test_integration/base.py:102: in uninstall
    tasks.uninstall_master(replica)
pytest_ipa/integration/tasks.py:1066: in uninstall_master
    result = host.run_command(uninstall_cmd)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <ipatests.pytest_ipa.integration.host.Host replica0.ipa.test (replica)>
argv = ['ipa-server-install', '--uninstall', '-U', '--ignore-topology-disconnect', '--ignore-last-of-role']
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-server-install', '--uninstall', '-U', '--ignore-topology-disconnect', '--ignore-last-of-role']' returned non-zero exit status 1.

The error is the following:

ipa: ERROR: stderr: invalid 'PKINIT enabled server': all masters must have IPA master role enabled
The ipa-server-install command failed. See /var/log/ipaserver-uninstall.log for more information

The test is uninstalling a replica with ipa-server-install --uninstall but does not call ipa server-del first.


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

2 years ago

master:

  • 6f49cc0 ipatests: delete the replica before uninstallation

ipa-4-9:

  • 2b22450 ipatests: delete the replica before uninstallation

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

2 years ago

Login to comment on this ticket.

Metadata