RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 2099484 - IPADNSSystemRecordsCheck displays warning message for 2 expected ipa-ca AAAA records.
Summary: IPADNSSystemRecordsCheck displays warning message for 2 expected ipa-ca AAAA ...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: ipa-healthcheck
Version: ---
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: pre-dev-freeze
: ---
Assignee: Rob Crittenden
QA Contact: ipa-qe
URL:
Whiteboard:
: 2115275 (view as bug list)
Depends On: 2158775 2166326
Blocks: 2099497
TreeView+ depends on / blocked
 
Reported: 2022-06-21 06:00 UTC by Sudhir Menon
Modified: 2023-05-16 09:30 UTC (History)
7 users (show)

Fixed In Version: ipa-healthcheck-0.12-1.el8
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 2099497 (view as bug list)
Environment:
Last Closed: 2023-05-16 08:28:45 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker FREEIPA-8385 0 None None None 2022-06-21 06:11:40 UTC
Red Hat Issue Tracker RHELPLAN-125803 0 None None None 2022-06-21 06:11:44 UTC
Red Hat Product Errata RHBA-2023:2794 0 None None None 2023-05-16 08:29:36 UTC

Description Sudhir Menon 2022-06-21 06:00:00 UTC
Description of problem: IPADNSSystemRecordsCheck displays warning message for 2 expected ipa-ca AAAA records.

Version-Release number of selected component (if applicable):
ipa-server-4.9.8-8.module+el8.7.0+14711+1e093de3.x86_64

How reproducible: Always.

Steps to Reproduce:
1. Install IPA server and replica with ca having both --ip-address=ipv4-address and --ip-address=ipv6-address
2. Run ipa-healthcheck tool for IPADNSSystemRecordsCheck and check the result.

Actual results:
Although IPA Server and replica both are having IPV6 address assigned to CA, the healthcheck tool complains that only one entry is present.

#ipa-healthcheck --failures-only
{
"source": "ipahealthcheck.ipa.idns",
"check": "IPADNSSystemRecordsCheck",
"result": "WARNING",
"uuid": "5fe925f2-6bd5-411c-9a0d-352d850b792c",
"when": "20220617143708Z",
"duration": "0.038578",
"kw": {
"msg": "Got {count} ipa-ca A records, expected {expected}",
"count": 1,
"expected": 2
}

Expected results:
Fix the WARNING message displayed.

Additional info: Logging this bug to have it tracked for 8.7 release.
Upstream issue has already been logged.
https://github.com/freeipa/freeipa-healthcheck/issues/270

Comment 1 Sudhir Menon 2022-06-21 06:06:00 UTC
Adding Flo's observation on the pagure ticket.

The issue happens when IPv4 or IPv6 is configured on one server but not on all the servers.

Relevant code: 
 freeipa-healthcheck/src/ipahealthcheck/ipa/idns.py 
195 ca_count = 0 
196 for server in system_records.servers_data: 
197     master = system_records.servers_data.get(server) 
198     if 'CA server' in master.get('roles'): 
199         ca_count += 1 
200  
201 if len(answers) != ca_count: 

freeipa-healthcheck/src/ipahealthcheck/ipa/idns.py 

230 ca_count = 0 
231 for server in system_records.servers_data: 
232     master = system_records.servers_data.get(server) 
233     if 'CA server' in master.get('roles'): 
234         ca_count += 1 
235  
236 if len(answers) != ca_count: 

ca_count is incremented for each server with the CA role, not considering that the server could have either IPv4 or IPv6 disabled. 
The code assumes all-or-nothing: if one server has an IPv4 address, all the other ones are expected to also have an IPv4 address
and ipa-ca should contain an A record for each server with the CA role. Same for IPv6.

Comment 2 Rob Crittenden 2022-06-21 17:34:06 UTC
This is working as designed. There is no way to know at execution time whether this is on purpose or not. A missing ipa-ca record can impact ACME in particular. Hence it is marked as a WARNING.

Comment 3 Rob Crittenden 2022-06-24 17:15:18 UTC
Upstream version 0.10 added the option to suppress a source, a check or a key. This would be one way to silence the warning if it does not apply. In this case the ca_count_a_rec could be suppressed so that healthcheck returns 0 if this is a desired configuration.

Comment 4 Rob Crittenden 2022-08-04 11:53:42 UTC
*** Bug 2115275 has been marked as a duplicate of this bug. ***

Comment 5 Rob Crittenden 2022-08-24 18:11:33 UTC
Use new approach to validate whether the ipa-ca DNS record is complete

The previous method counted the number of servers with CA's and expected an identical count of servers in ipa-ca, for each of the A and AAAA types.

If one server had only A or AAAA records then this count could be off and issue a spurious warning.

Instead get the list of A and AAAA records for servers with a CA and compare the IP addresses to those of the A and AAAA records of ipa-ca. Return a warning if any are missing or not expected (e.g. a server was removed but remains in ipa-ca).

Upstream PR https://github.com/freeipa/freeipa-healthcheck/pull/274

Comment 21 errata-xmlrpc 2023-05-16 08:28:45 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (idm:client and idm:DL1 bug fix and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2023:2794


Note You need to log in before you can comment on or make changes to this bug.