freeipa / freeipa-healthcheck

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

Don't fail if a service name cannot be looked up in LDAP #313

Closed rcritten closed 1 year ago

rcritten commented 1 year ago

A new method was introduced to handle more IPA services. This requires looking some of them up in LDAP. dirsrv not running was not being caught so raised an error instead.

Fixes: https://github.com/freeipa/freeipa-healthcheck/issues/312

flo-renaud commented 1 year ago

Hi @rcritten Thanks for the PR, works for me. Tested on fedora 39:

# systemctl stop dirsrv@IPA-TEST.service
# ipa-healthcheck --source ipahealthcheck.ipa.topology
Source 'ipahealthcheck.ipa.topology' is missing one or more requirements 'dirsrv'
# ipa-healthcheck --source ipahealthcheck.meta --check krb5kdc
Source 'ipahealthcheck.meta' is missing one or more requirements 'dirsrv'
# ipa-healthcheck
[
  {
    "source": "ipahealthcheck.meta.services",
    "check": "dirsrv",
    "result": "ERROR",
    "uuid": "dd8f25d7-6791-46ce-9a11-c60d2f4683e3",
    "when": "20231114084138Z",
    "duration": "0.008669",
    "kw": {
      "status": false,
      "msg": "dirsrv: not running"
    }
  }
]
#