#9052 Nightly test failure (updates-testing) in test_ipa_cert_fix.py::TestCertFixReplica teardown
Closed: fixed by frenaud. Opened by frenaud.

The nightly tests are failing in the teardown method of the class test_ipa_cert_fix.py::TestCertFixReplica. See PR #1329 [testing_master_testing] (logs, report) or PR #1330 - [testing_master_testing_selinux) (logs, report).

Test scenario:
- install master
- install replica
- move date +3years+1day in the fixture expire_certs
- execute the test (ipa-cert-fix)
- the last part of the fixture moves the date back
- IntegrationTest @uninstall method is called, uninstalls replica and master

The uninstallation of the replica fails (see ipaserver-uninstall.log) when updating the entry cn=Enterprise ACME Administrators,ou=groups,o=ipaca by removing uniquemember: uid=acme-replica0.ipa.test,ou=people,o=ipaca with an OperationsError:

2021-11-25T14:32:48Z DEBUG update_entry modlist [(1, 'uniqueMember', [b'uid=acme-replica0.ipa.test,ou=people,o=ipaca'])]
2021-11-25T14:32:48Z DEBUG Unhandled LDAPError: OPERATIONS_ERROR: {'msgtype': 103, 'msgid': 22, 'result': 1, 'desc': 'Operations error', 'ctrls': []}

and dirsrv error.log shows it's related to the jump back in time:

[25/Nov/2021:14:32:48.828095339 +0000] - INFO - csngen_new_csn - Detected large jump in CSN time.  Delta: -94780710 (current time: 1637850768  vs  previous time: 1732631478)
[25/Nov/2021:14:32:48.828777083 +0000] - ERR - _csngen_adjust_local_time - Adjustment limit exceeded; value - 94780710, limit - 86400
[25/Nov/2021:14:32:48.829477262 +0000] - ERR - ldbm_back_modify - failed to generate modify CSN for entry (cn=Enterprise ACME Administrators,ou=groups,o=ipaca), aborting operation

The test can be adapted to avoid this issue:
- modify the fixture expire_certs so that it uninstalls replica and server before moving the date back
- override the uninstall method in the class TestCertFixReplica with the following:

    @classmethod
    def uninstall(cls, mh):
        # Uninstall method is empty as the uninstallation is done in
        # the fixture
        pass

@myusuf could you have a look at this issue? Thanks

master:

  • f18a6c023be797e6bc4f6934b5a8cc6d706f85c0 ipatests: Fix test_ipa_cert_fix.py::TestCertFixReplica teardown

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

ipa-4-9:

  • ba7ec71ba96280da3841ebe47df2a6dc1cd6341e ipatests: Fix test_ipa_cert_fix.py::TestCertFixReplica teardown

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

Metadata