#8940 Nightly test failure in test_integration/test_otp.py/TestOTPToken/test_check_otpd_after_idle_timeout
Closed: fixed by mpolovka. Opened by mpolovka.

Test test_check_otpd_after_idle_timeout is failing in [testing_master_previous] Nightly PR #1083 with an error:

    def test_check_otpd_after_idle_timeout(self, setup_otp_nsslapd):
        """Test for OTP when the LDAP connection timed out.
        Test for : https://pagure.io/freeipa/issue/6587
        ipa-otpd was exiting with failure when LDAP connection timed out.
        Test to verify that when the nsslapd-idletimeout is exceeded (30s idle,
        60s sleep) then the ipa-otpd process should exit without error.
        """
        since = time.strftime('%H:%M:%S')
        tasks.kinit_admin(self.master)
        otpuid, totp = add_otptoken(self.master, USER, otptype="totp")
        try:
            # kinit with OTP auth
            otpvalue = totp.generate(int(time.time())).decode("ascii")
            kinit_otp(self.master, USER, password=PASSWORD, otp=otpvalue)
            time.sleep(60)
            failed_services = self.master.run_command(
                ['systemctl', 'list-units', '--state=failed']
            )
            assert "ipa-otpd" not in failed_services.stdout_text
            cmd_jornalctl = self.master.run_command(
                ['journalctl', '--since={}'.format(since)]
            )
            regex = r".*ipa-otpd@.*\sSucceeded"
>           assert re.search(regex, cmd_jornalctl.stdout_text)
E           assert None
E            +  where None = <function search at 0x7f68caeca0d0>('.*ipa-otpd@.*\\sSucceeded', '-- Logs begin at Wed 2021-08-04 00:43:40 UTC, end at Wed 2021-08-04 00:54:35 UTC. --\nAug 04 00:53:34 master.ipa.test...:52:08:5f:81:2f:62:ac direction=? spid=23379 suid=0  exe="/usr/sbin/sshd" hostname=? addr=? terminal=? res=success\'\n')
E            +    where <function search at 0x7f68caeca0d0> = re.search
E            +    and   '-- Logs begin at Wed 2021-08-04 00:43:40 UTC, end at Wed 2021-08-04 00:54:35 UTC. --\nAug 04 00:53:34 master.ipa.test...:52:08:5f:81:2f:62:ac direction=? spid=23379 suid=0  exe="/usr/sbin/sshd" hostname=? addr=? terminal=? res=success\'\n' = <pytest_multihost.transport.SSHCommand object at 0x7f68c8097340>.stdout_text

Full report


@amore can you have a look at the failure? this is a new test introduced yesterday and it's failing in fedora33 (the journal log may be slightly different with this version).

Additional comment: please use since = time.strftime('%Y-%m-%d %H:%M:%S') to avoid issues similar to https://pagure.io/freeipa/issue/8918

Metadata Update from @frenaud:
- Custom field on_review adjusted to https://github.com/freeipa/freeipa/pull/5952
- Issue assigned to amore

master:

  • 16b3788f688f04311b41c942b02a2f01d4136364 ipatests: Refactor test_check_otpd_after_idle_timeout

ipa-4-6:

  • 3b79b27e848b3c500eafaacfedf55d95dd4e3df1 ipatests: Refactor test_check_otpd_after_idle_timeout

ipa-4-9:

  • eac03d6828d0bac1925c897090fc77e250eaee04 ipatests: Refactor test_check_otpd_after_idle_timeout

ipa-4-8:

  • 827ff652539fc13caf53e931a9f12dcfd9f09938 ipatests: Refactor test_check_otpd_after_idle_timeout

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

New failure observed in fixed version on the line 319 of https://pagure.io/freeipa/c/16b3788f688f04311b41c942b02a2f01d4136364

[testing_ipa-4.6] Nightly PR #1094 , report

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

Closing as the fix was not present in the time of the test being run.

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

Metadata