#8486 Nightly test failure in est_integration/test_vault.py::test_create_and_retrieve_vault_replica_with_kra
Opened 3 months ago by mpolovka. Modified 3 months ago

The nightly test test_integration/test_vault.py::TestInstallKRA::()::test_create_and_retrieve_vault_replica_with_krafailed with test_integration/test_vault.py::TestInstallKRA::()::test_create_and_retrieve_vault_replica_with_kra

PR393, logs

self = <ipatests.test_integration.test_vault.TestInstallKRA object at 0x7f213d66be48>

    def test_create_and_retrieve_vault_replica_with_kra(self):

        # install KRA on replica
        tasks.install_kra(self.replicas[0], first_instance=False)

        # create vault
        self.replicas[0].run_command([
            "ipa", "vault-add",
            self.vault_name_replica_with_KRA,
            "--password", self.vault_password,
            "--type", "symmetric",
        ])

        # archive secret
        self.replicas[0].run_command([
            "ipa", "vault-archive",
            self.vault_name_replica_with_KRA,
            "--password", self.vault_password,
            "--data", self.vault_data,
        ])
        time.sleep(WAIT_AFTER_ARCHIVE)

        self._retrieve_secret([self.vault_name_replica_with_KRA])

        ################# master #################
        # test master again after KRA was installed on replica
        # create vault
        self.master.run_command([
            "ipa", "vault-add",
            self.vault_name_master2,
            "--password", self.vault_password,
            "--type", "symmetric",
        ])

        # archive secret
        self.master.run_command([
            "ipa", "vault-archive",
            self.vault_name_master2,
            "--password", self.vault_password,
            "--data", self.vault_data,
        ])
        time.sleep(WAIT_AFTER_ARCHIVE)

        self._retrieve_secret([self.vault_name_master2])

        ################ old vaults ###############
        # test if old vaults are still accessible
        self._retrieve_secret([
            self.vault_name_master,
>           self.vault_name_replica_without_KRA,
        ])

test_integration/test_vault.py:204: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
test_integration/test_vault.py:46: in _retrieve_secret
    "--password", self.vault_password,
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <ipatests.pytest_ipa.integration.host.Host master.ipa.test (master)>
argv = ['ipa', 'vault-retrieve', 'ci_test_vault_replica_without_kra', '--password', 'password']
set_env = True, stdin_text = None, log_stdout = True, raiseonerr = True
cwd = None, ok_returncode = 0

    def run_command(self, argv, set_env=True, stdin_text=None,
                    log_stdout=True, raiseonerr=True,
                    cwd=None, 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(Host, self).run_command(
            argv, set_env=set_env, stdin_text=stdin_text,
            log_stdout=log_stdout, raiseonerr=False, cwd=cwd
        )
        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
            )
E           subprocess.CalledProcessError: Command '['ipa', 'vault-retrieve', 'ci_test_vault_replica_without_kra', '--password', 'password']' returned non-zero exit status 2.

pytest_ipa/integration/host.py:90: CalledProcessError
----------------------------- Captured stderr call -----------------------------

[ipatests.pytest_ipa.integration.host.Host.master.cmd42] Added vault "ci_test_vault_master2"
[ipatests.pytest_ipa.integration.host.Host.master.cmd42] -----------------------------------
[ipatests.pytest_ipa.integration.host.Host.master.cmd42]   Vault name: ci_test_vault_master2
[ipatests.pytest_ipa.integration.host.Host.master.cmd42]   Type: symmetric
[ipatests.pytest_ipa.integration.host.Host.master.cmd42]   Salt: 6Dykf0jX4Nt/0DAoLWETYQ==
[ipatests.pytest_ipa.integration.host.Host.master.cmd42]   Owner users: admin
[ipatests.pytest_ipa.integration.host.Host.master.cmd42]   Vault user: admin
[ipatests.pytest_ipa.integration.host.Host.master.cmd42] Exit code: 0
[ipatests.pytest_ipa.integration.host.Host.master.ParamikoTransport] RUN ['ipa', 'vault-archive', 'ci_test_vault_master2', '--password', 'password', '--data', 'SSBsb3ZlIENJIHRlc3RzCg==']
[ipatests.pytest_ipa.integration.host.Host.master.cmd43] RUN ['ipa', 'vault-archive', 'ci_test_vault_master2', '--password', 'password', '--data', 'SSBsb3ZlIENJIHRlc3RzCg==']
[ipatests.pytest_ipa.integration.host.Host.master.cmd43] ------------------------------------------------
[ipatests.pytest_ipa.integration.host.Host.master.cmd43] Archived data into vault "ci_test_vault_master2"
[ipatests.pytest_ipa.integration.host.Host.master.cmd43] ------------------------------------------------
[ipatests.pytest_ipa.integration.host.Host.master.cmd43] Exit code: 0
[ipatests.pytest_ipa.integration.host.Host.master.ParamikoTransport] RUN ['ipa', 'vault-retrieve', 'ci_test_vault_master2', '--password', 'password']
[ipatests.pytest_ipa.integration.host.Host.master.cmd44] RUN ['ipa', 'vault-retrieve', 'ci_test_vault_master2', '--password', 'password']
[ipatests.pytest_ipa.integration.host.Host.master.cmd44] -------------------------------------------------
[ipatests.pytest_ipa.integration.host.Host.master.cmd44] Retrieved data from vault "ci_test_vault_master2"
[ipatests.pytest_ipa.integration.host.Host.master.cmd44] -------------------------------------------------
[ipatests.pytest_ipa.integration.host.Host.master.cmd44]   Data: SSBsb3ZlIENJIHRlc3RzCg==
[ipatests.pytest_ipa.integration.host.Host.master.cmd44] Exit code: 0
[ipatests.pytest_ipa.integration.host.Host.replica0.ParamikoTransport] RUN ['ipa', 'vault-retrieve', 'ci_test_vault_master2', '--password', 'password']
[ipatests.pytest_ipa.integration.host.Host.replica0.cmd60] RUN ['ipa', 'vault-retrieve', 'ci_test_vault_master2', '--password', 'password']
[ipatests.pytest_ipa.integration.host.Host.replica0.cmd60] -------------------------------------------------
[ipatests.pytest_ipa.integration.host.Host.replica0.cmd60] Retrieved data from vault "ci_test_vault_master2"
[ipatests.pytest_ipa.integration.host.Host.replica0.cmd60] -------------------------------------------------
[ipatests.pytest_ipa.integration.host.Host.replica0.cmd60]   Data: SSBsb3ZlIENJIHRlc3RzCg==
[ipatests.pytest_ipa.integration.host.Host.replica0.cmd60] Exit code: 0
[ipatests.pytest_ipa.integration.host.Host.master.ParamikoTransport] RUN ['ipa', 'vault-retrieve', 'ci_test_vault_master', '--password', 'password']
[ipatests.pytest_ipa.integration.host.Host.master.cmd45] RUN ['ipa', 'vault-retrieve', 'ci_test_vault_master', '--password', 'password']
[ipatests.pytest_ipa.integration.host.Host.master.cmd45] ------------------------------------------------
[ipatests.pytest_ipa.integration.host.Host.master.cmd45] Retrieved data from vault "ci_test_vault_master"
[ipatests.pytest_ipa.integration.host.Host.master.cmd45] ------------------------------------------------
[ipatests.pytest_ipa.integration.host.Host.master.cmd45]   Data: SSBsb3ZlIENJIHRlc3RzCg==
[ipatests.pytest_ipa.integration.host.Host.master.cmd45] Exit code: 0
[ipatests.pytest_ipa.integration.host.Host.replica0.ParamikoTransport] RUN ['ipa', 'vault-retrieve', 'ci_test_vault_master', '--password', 'password']
[ipatests.pytest_ipa.integration.host.Host.replica0.cmd61] RUN ['ipa', 'vault-retrieve', 'ci_test_vault_master', '--password', 'password']
[ipatests.pytest_ipa.integration.host.Host.replica0.cmd61] ------------------------------------------------
[ipatests.pytest_ipa.integration.host.Host.replica0.cmd61] Retrieved data from vault "ci_test_vault_master"
[ipatests.pytest_ipa.integration.host.Host.replica0.cmd61] ------------------------------------------------
[ipatests.pytest_ipa.integration.host.Host.replica0.cmd61]   Data: SSBsb3ZlIENJIHRlc3RzCg==
[ipatests.pytest_ipa.integration.host.Host.replica0.cmd61] Exit code: 0
[ipatests.pytest_ipa.integration.host.Host.master.ParamikoTransport] RUN ['ipa', 'vault-retrieve', 'ci_test_vault_replica_without_kra', '--password', 'password']
[ipatests.pytest_ipa.integration.host.Host.master.cmd46] RUN ['ipa', 'vault-retrieve', 'ci_test_vault_replica_without_kra', '--password', 'password']
[ipatests.pytest_ipa.integration.host.Host.master.cmd46] ipa: ERROR: No archived data.
[ipatests.pytest_ipa.integration.host.Host.master.cmd46] Exit code: 2
ipa: ERROR: stderr: ipa: ERROR: No archived data.

Login to comment on this ticket.

Metadata