#9548 Nightly test failure in test_integration/test_ipa_cert_fix.py/TestCertFixReplica/test_renew_expired_cert_replica
Closed: wontfix 10 months ago by frenaud. Opened 11 months ago by mpolovka.

The nightly test test_integration/test_ipa_cert_fix.py::TestCertFixReplica::test_renew_expired_cert_replica is failing in [testing_master_previous] Nightly PR #3441 and [testing_master_testing] Nightly PR #3442
in its setup phase with an error:

E           subprocess.CalledProcessError: Command '['ipa-client-install', '--domain', 'ipa.test', '--realm', 'IPA.TEST', '--server', 'master.ipa.test', '-p', 'admin', '-w', 'Secret.123', '-U', '--no-ntp']' returned non-zero exit status 1.

pytest_ipa/integration/host.py:202: CalledProcessError
 -----------------------------Captured stderr setup------------------------------ 
ipa: WARNING: ipa: ERROR: DNS is not configured

ipa: ERROR: stderr: Client hostname: replica0.ipa.test
Realm: IPA.TEST
DNS Domain: ipa.test
IPA Server: master.ipa.test
BaseDN: dc=ipa,dc=test
Skipping chrony configuration
Successfully retrieved CA cert
    Subject:     CN=Certificate Authority,O=IPA.TEST
    Issuer:      CN=Certificate Authority,O=IPA.TEST
    Valid From:  2024-03-01 18:26:15+00:00
    Valid Until: 2044-03-01 18:26:15+00:00

Joining realm failed: JSON-RPC call failed: SSL peer certificate or SSH remote key was not OK

Installation failed. Rolling back changes.
Disabling client Kerberos and LDAP configurations
nscd daemon is not installed, skip configuration
nslcd daemon is not installed, skip configuration
Client uninstall complete.
The ipa-client-install command failed. See /var/log/ipaclient-install.log for more information

The /var/log/ipaclient-install.log was not collected.
Full report, artefacts


The test is failing because of an invalid date on the master.
For instance let's look at the logs from http://freeipa-org-pr-ci.s3-website.eu-central-1.amazonaws.com/jobs/d84d1d10-d659-11ee-88e1-fa163e19a40b/runner.log.gz

The initial date is 2024-02-28.
The test moves the date in the future with date -s +3Years+1day: Mon Mar 1 05:03:19 PM UTC 2027
Then the test intends to move back to the original date with date -s -3Years-1day but reaches Thu Feb 29 05:14:50 PM UTC 2024 instead of Feb 28 because 2024 is a leap year but 2027 is not.

The second test makes the same change +3Years+1day, then -3Years-1day and reaches Fri Mar 1 05:31:08 PM UTC 2024

The last test is called with a master set on Mar 1 06:24:20 PM UTC 2024 and a client still on Feb 28.

The issue happens only when there is a leap year and the test starts on Feb 28.

A possible fix would be to use date -s +1096days and date -s -1096days to avoid the leap year issue. But the problem won't appear until 2028, so in favor of closing as won't fix.

Similar issue is seen in test_commands: in PR#3445, with the followingreport.

The test is changing the date +15Years then -15Years and ends up 1 day later than it should. After that, client and master are de-synchronized and kerberos authentication fails on the client.

I re-ran those tests in my PRs and they succeeded. I guess it is Feb 28/29th handling in date.

How about we add a comment that it is expected to fail when executed on Feb 29, put your analysis into the commit message and close this?

Metadata Update from @frenaud:
- Issue assigned to frenaud

11 months ago

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

11 months ago

master:

  • 558a7de ipatests: some tests are date-sensitive and fail Feb 29

ipa-4-11:

  • c88db05 ipatests: some tests are date-sensitive and fail Feb 29

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

10 months ago

Closed as wontfix. The patches add a comment in the test that explain the leap year issue but don't prevent the problem.

Log in to comment on this ticket.

Metadata