Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Report when all ipa-ca records are missing in IPADNSSystemRecordsCheck #287

Merged
merged 1 commit into from
Apr 11, 2023

Conversation

rcritten
Copy link
Collaborator

If no DNS records were returned at all then the check for mismatches was missed. Add a special case for this scenario by using a placeholder for the IP address for a given CA server. If no records are returned at all this case will catch it. If any exist at all then the current code will handle it.

This is is easily reproduced using a non-IPA DNS server like Google or Cloudflare where all lookups will fail.

Fixes: #284

If no DNS records were returned at all then the check for mismatches
was missed. Add a special case for this scenario by using a placeholder
for the IP address for a given CA server. If no records are returned
at all this case will catch it. If any exist at all then the
current code will handle it.

This is is easily reproduced using a non-IPA DNS server like
Google or Cloudflare where all lookups will fail.

Fixes: freeipa#284

Signed-off-by: Rob Crittenden <rcritten@redhat.com>
Copy link

@f-trivino f-trivino left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @rcritten,

I tested the code and worksforme, I installed ipa-server without DNS and pointed nameserver to 8.8.8.8, then after running ipa-healthcheck with your code I do see:

  {
    "source": "ipahealthcheck.ipa.idns",
    "check": "IPADNSSystemRecordsCheck",
    "result": "WARNING",
    "uuid": "968839f8-aff6-41c5-90f8-fc35c6b43712",
    "when": "20230411122848Z",
    "duration": "96.235592",
    "kw": {
      "key": "ipa_ca_missing_master.testrealm.test",
      "server": "master.testrealm.test",
      "msg": "missing IP address for ipa-ca server {server}"
    }
  }
]

@rcritten
Copy link
Collaborator Author

Thanks!

@rcritten rcritten merged commit 8ca8512 into freeipa:master Apr 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

IPADNSSystemRecordsCheck's false positive result for ipa-ca rrs
2 participants