freeipa / freeipa-healthcheck

Check the health of a freeIPA installation
GNU General Public License v3.0
50 stars 28 forks source link

Traceback when calling pki-healthcheck #310

Closed flo-renaud closed 1 year ago

flo-renaud commented 1 year ago

With the new 0.15 release of freeipa-healthcheck, the command pki-healthcheck reports a traceback that didn't happen with 0.14. Successful execution with 0.14:

[root@server ~]# rpm -qa freeipa-healthcheck
freeipa-healthcheck-0.14-1.fc38.noarch
[root@server ~]# ipa-healthcheck 
[]
[root@server ~]# pki-healthcheck 
[]

Traceback with 0.15:

[root@server ~]# rpm -qa freeipa-healthcheck
freeipa-healthcheck-0.15-1.fc38.noarch
[root@server ~]# ipa-healthcheck 
[]
[root@server ~]# pki-healthcheck 
Traceback (most recent call last):
  File "/usr/sbin/pki-healthcheck", line 33, in <module>
    sys.exit(load_entry_point('pkihealthcheck==0.1', 'console_scripts', 'pki-healthcheck')())
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/pki/server/healthcheck/core/main.py", line 53, in main
    sys.exit(checks.run_healthcheck())
             ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/ipahealthcheck/core/core.py", line 468, in run_healthcheck
    api.Backend.ldap2.disconnect()
    ^^^^^^^^^^^
AttributeError: 'API' object has no attribute 'Backend'

The file src/ipahealthcheck/core/core.py was changed with commit 4a9ebb37cb296a41fefcd5898a3b1a69e6539720.

The issue was detected in the nightly test testing-fedora/test_ipahealthcheck_cli_fsspace in PR#3134, in test_integration/test_ipahealthcheck.py::TestIpaHealthCLI::test_pki_healthcheck.