ipa-healthcheck fails with AttributeError: module 'datetime' has no attribute 'UTC' after RHEL 9.6 and IdM update
Issue
-
After updating IdM server to RHEL 9.6,
ipa-healthcheckreturnsAttributeError: module 'datetime' has no attribute 'UTC'error when performingReplicationCheck:"source": "ipahealthcheck.ds.replication", "check": "ReplicationCheck", "result": "CRITICAL", "uuid": "62491048-bb7a-46c3-b404-b1ab258257cc", "when": "20250926004937Z", "duration": "0.770483", "kw": { "exception": "module 'datetime' has no attribute 'UTC'", "traceback": "Traceback (most recent call last):\n File \"/usr/lib/python3.9/site-packages/ipahealthcheck/core/core.py\", line 56, in run_plugin\n for result in plugin.check():\n File \"/usr/lib/python3.9/site-packages/ipahealthcheck/core/plugin.py\", line 18, in wrapper\n for result in f(*args, **kwds):\n File \"/usr/lib/python3.9/site-packages/ipahealthcheck/ds/plugin.py\", line 108, in check\n results = self.doCheck(self.check_class, self.many)\n File \"/usr/lib/python3.9/site-packages/ipahealthcheck/ds/plugin.py\", line 97, in doCheck\n for result in results:\n File \"/usr/lib/python3.9/site-packages/lib389/_mapped_object_lint.py\", line 126, in lint\n yield from f()\n File \"/usr/lib/python3.9/site-packages/lib389/replica.py\", line 1325, in _lint_no_ruv\n ruv_dict = ruv.format_ruv()\n File \"/usr/lib/python3.9/site-packages/lib389/replica.py\", line 949, in format_ruv\n \"csn\": RUV().parse_csn(self._rid_csn.get(rid, '00000000000000000000')),\n File \"/usr/lib/python3.9/site-packages/lib389/replica.py\", line 920, in parse_csn\n time_str = datetime.datetime.fromtimestamp(timestamp, datetime.UTC).strftime('%Y-%m-%d %H:%M:%S')\nAttributeError: module 'datetime' has no attribute 'UTC'\n" }
Environment
- Red Hat Enterprise Linux 9.6
- Red Hat Identity Management (IdM) / FreeIPA
- ipa-server-4.12.2-14.el9_6.3
- 389-ds-base-2.6.1-11.el9_6
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.