Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
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 1784037

Summary: [RFE] Allow plugins to read contents from config during initialization
Product: Red Hat Enterprise Linux 8 Reporter: Dinesh Prasanth <dmoluguw>
Component: ipa-healthcheckAssignee: Rob Crittenden <rcritten>
Status: CLOSED ERRATA QA Contact: ipa-qe <ipa-qe>
Severity: high Docs Contact:
Priority: unspecified    
Version: 8.2CC: fcami, ksiddiqu, myusuf, rcritten
Target Milestone: rcKeywords: FutureFeature
Target Release: 8.0Flags: pm-rhel: mirror+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: ipa-healthcheck-0.4-4 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-04-28 15:44:43 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Dinesh Prasanth 2019-12-16 14:49:04 UTC
Description of problem:
The current configuration of ipa-healthcheck:
1. Reads the config
2. Initializes registry    <------ Inaccessible
3. Initializes plugins     <------ Inaccessible
4. Runs plugins            <----- Accessible

As shown above, though the config is processed it is unavailable during initialization
of registry/plugin.

Version-Release number of selected component (if applicable):
0.3

How reproducible:
NA

Actual results:
Data inaccessible during plugin or registry initialization

Expected results:
Allowing to read the config data during steps #2 and #3 will allow for better
handling, for example, instance initialization 


Additional info:

Comment 1 Dinesh Prasanth 2020-01-13 15:56:44 UTC
This has been fixed upstream via PR: https://github.com/freeipa/freeipa-healthcheck/pull/102


Corresponding commit in upstream `master` branch:

commit 80fff445c9128d8da56964bb7a7db6b871f483f1
Author: Dinesh Prasanth M K <dmoluguw>
Date:   Tue Dec 10 14:02:16 2019 -0500

    Move config object from plugins to registry
    
    This patch moves the config object from the plugins
    to the registry, thereby allowing the plugins to use
    the values parsed from the healthcheck.conf file while
    initializing. This improves the way a plugin can use
    the values defined in the conf
    
    Signed-off-by: Dinesh Prasanth M K <dmoluguw>

Comment 4 Dinesh Prasanth 2020-01-16 15:19:34 UTC
@Kaleem,

This change was required for pki-healthcheck. The tool has not been merged yet and so, our QE hasn't tested it. I tested this during development and worked for me.

Comment 6 Mohammad Rizwan 2020-02-27 12:56:59 UTC
version:
ipa-server-4.8.4-6.module+el8.2.0+5773+68ace8c5.x86_64
ipa-healthcheck-0.4-4.module+el8.2.0+5489+95477d9f.noarch
ipa-healthcheck-core-0.4-4.module+el8.2.0+5489+95477d9f.noarch


[root@master ~]# ipa-healthcheck --list-sources
pki.server.healthcheck.meta.csconfig
   DogtagCertsConfigCheck
ipahealthcheck.dogtag.ca
   DogtagCertsConfigCheck
   DogtagCertsConnectivityCheck
ipahealthcheck.ds.replication
   ReplicationConflictCheck
ipahealthcheck.ds.ruv
   RUVCheck
ipahealthcheck.ipa.certs
   IPACertmongerExpirationCheck
   IPACertfileExpirationCheck
   IPACertTracking
   IPACertNSSTrust
   IPANSSChainValidation
   IPAOpenSSLChainValidation
   IPARAAgent
   IPACertRevocation
   IPACertmongerCA
   IPACAChainExpirationCheck
ipahealthcheck.ipa.dna
   IPADNARangeCheck
ipahealthcheck.ipa.idns
   IPADNSSystemRecordsCheck
ipahealthcheck.ipa.files
   IPAFileNSSDBCheck
   IPAFileCheck
   TomcatFileCheck
ipahealthcheck.ipa.host
   IPAHostKeytab
ipahealthcheck.ipa.roles
   IPACRLManagerCheck
   IPARenewalMasterCheck
ipahealthcheck.ipa.topology
   IPATopologyDomainCheck
ipahealthcheck.ipa.trust
   IPATrustAgentCheck
   IPATrustDomainsCheck
   IPADomainCheck
   IPATrustCatalogCheck
   IPAsidgenpluginCheck
   IPATrustAgentMemberCheck
   IPATrustControllerPrincipalCheck
   IPATrustControllerServiceCheck
   IPATrustControllerConfCheck
   IPATrustControllerGroupSIDCheck
   IPATrustPackageCheck
ipahealthcheck.meta.core
   MetaCheck
ipahealthcheck.meta.services
   certmonger
   dirsrv
   gssproxy
   httpd
   ipa_custodia
   ipa_dnskeysyncd
   ipa_otpd
   kadmin
   krb5kdc
   named
   pki_tomcatd
   sssd
ipahealthcheck.system.filesystemspace
   FileSystemSpaceCheck
[root@master ~]# ipa-healthcheck --source ipahealthcheck.meta.services
[
  {
    "source": "ipahealthcheck.meta.services",
    "check": "certmonger",
    "result": "SUCCESS",
    "uuid": "2bcbd6b7-d3b4-4185-87b1-c3d3834907b2",
    "when": "20200227125233Z",
    "duration": "0.009105",
    "kw": {
      "status": true
    }
  },
  {
    "source": "ipahealthcheck.meta.services",
    "check": "dirsrv",
    "result": "SUCCESS",
    "uuid": "6878dd55-0513-41fb-820c-88cd3c9537de",
    "when": "20200227125233Z",
    "duration": "0.007935",
    "kw": {
      "status": true
    }
  },
  {
    "source": "ipahealthcheck.meta.services",
    "check": "gssproxy",
    "result": "SUCCESS",
    "uuid": "a89b31fa-f44f-4a80-8d1f-f8a4f621ec43",
    "when": "20200227125233Z",
    "duration": "0.007761",
    "kw": {
      "status": true
    }
  },
  {
    "source": "ipahealthcheck.meta.services",
    "check": "httpd",
    "result": "SUCCESS",
    "uuid": "a1c7491f-0103-45cf-b11d-7ee7623ac576",
    "when": "20200227125233Z",
    "duration": "0.007540",
    "kw": {
      "status": true
    }
  },
  {
    "source": "ipahealthcheck.meta.services",
    "check": "ipa_custodia",
    "result": "SUCCESS",
    "uuid": "32d25b48-185b-4131-bd60-6bd364f127b0",
    "when": "20200227125233Z",
    "duration": "0.007459",
    "kw": {
      "status": true
    }
  },
  {
    "source": "ipahealthcheck.meta.services",
    "check": "ipa_dnskeysyncd",
    "result": "SUCCESS",
    "uuid": "fff4fca0-2fcb-4314-8c75-1b7bbb85335b",
    "when": "20200227125233Z",
    "duration": "0.007478",
    "kw": {
      "status": true
    }
  },
  {
    "source": "ipahealthcheck.meta.services",
    "check": "ipa_otpd",
    "result": "SUCCESS",
    "uuid": "cf58c103-1d89-41b1-919b-5f76f4e47b16",
    "when": "20200227125233Z",
    "duration": "0.007369",
    "kw": {
      "status": true
    }
  },
  {
    "source": "ipahealthcheck.meta.services",
    "check": "kadmin",
    "result": "SUCCESS",
    "uuid": "f2572162-6dcf-4d08-a5e0-2ad900f97faf",
    "when": "20200227125233Z",
    "duration": "0.007487",
    "kw": {
      "status": true
    }
  },
  {
    "source": "ipahealthcheck.meta.services",
    "check": "krb5kdc",
    "result": "SUCCESS",
    "uuid": "e72a1628-e062-4a4c-a5cc-06d3a5659a87",
    "when": "20200227125233Z",
    "duration": "0.007231",
    "kw": {
      "status": true
    }
  },
  {
    "source": "ipahealthcheck.meta.services",
    "check": "named",
    "result": "SUCCESS",
    "uuid": "cf5acf34-d44c-4409-a936-f007c13516b7",
    "when": "20200227125233Z",
    "duration": "0.007370",
    "kw": {
      "status": true
    }
  },
  {
    "source": "ipahealthcheck.meta.services",
    "check": "pki_tomcatd",
    "result": "SUCCESS",
    "uuid": "73157ebd-4daf-4206-a1c6-269f86f81b92",
    "when": "20200227125233Z",
    "duration": "0.060435",
    "kw": {
      "status": true
    }
  },
  {
    "source": "ipahealthcheck.meta.services",
    "check": "sssd",
    "result": "SUCCESS",
    "uuid": "b0eb0d9e-d9c8-4f91-a631-87d521cf74e7",
    "when": "20200227125233Z",
    "duration": "0.009088",
    "kw": {
      "status": true
    }
  }
]
[root@master ~]# 
[root@master ~]# 
[root@master ~]# 
[root@master ~]# ipactl stop 
Stopping ipa-dnskeysyncd Service
Stopping ipa-otpd Service
Stopping pki-tomcatd Service
Stopping ipa-custodia Service
Stopping httpd Service
Stopping named Service
Stopping kadmin Service
Stopping krb5kdc Service
Stopping Directory Service
ipa: INFO: The ipactl command was successful
[root@master ~]# 
[root@master ~]# 
[root@master ~]# ipa-healthcheck --source ipahealthcheck.meta.services
[
  {
    "source": "ipahealthcheck.meta.services",
    "check": "certmonger",
    "result": "SUCCESS",
    "uuid": "9c6003e6-0e58-4604-b7e0-a00f4dd05f9d",
    "when": "20200227125256Z",
    "duration": "0.009345",
    "kw": {
      "status": true
    }
  },
  {
    "source": "ipahealthcheck.meta.services",
    "check": "dirsrv",
    "result": "ERROR",
    "uuid": "2533ffeb-86c5-4d5a-b8e0-4cfe6d289473",
    "when": "20200227125256Z",
    "duration": "0.008076",
    "kw": {
      "status": false,
      "msg": "dirsrv: not running"
    }
  },
  {
    "source": "ipahealthcheck.meta.services",
    "check": "gssproxy",
    "result": "SUCCESS",
    "uuid": "97e16cba-adee-4700-a3b1-11426e4ae466",
    "when": "20200227125256Z",
    "duration": "0.007643",
    "kw": {
      "status": true
    }
  },
  {
    "source": "ipahealthcheck.meta.services",
    "check": "httpd",
    "result": "ERROR",
    "uuid": "d67e3518-b9a0-4c3c-8db2-69c4a3997a43",
    "when": "20200227125256Z",
    "duration": "0.008746",
    "kw": {
      "status": false,
      "msg": "httpd: not running"
    }
  },
  {
    "source": "ipahealthcheck.meta.services",
    "check": "ipa_custodia",
    "result": "ERROR",
    "uuid": "73664ee1-cd75-453f-a6fc-b209fe304f20",
    "when": "20200227125256Z",
    "duration": "0.008420",
    "kw": {
      "status": false,
      "msg": "ipa-custodia: not running"
    }
  },
  {
    "source": "ipahealthcheck.meta.services",
    "check": "ipa_dnskeysyncd",
    "result": "ERROR",
    "uuid": "b94c330f-f23d-4b3f-a359-a476f2fb7005",
    "when": "20200227125256Z",
    "duration": "0.008399",
    "kw": {
      "status": false,
      "msg": "ipa-dnskeysyncd: not running"
    }
  },
  {
    "source": "ipahealthcheck.meta.services",
    "check": "ipa_otpd",
    "result": "ERROR",
    "uuid": "44c485e8-9f0a-4e86-98df-2a79aa4e6535",
    "when": "20200227125256Z",
    "duration": "0.008178",
    "kw": {
      "status": false,
      "msg": "ipa-otpd: not running"
    }
  },
  {
    "source": "ipahealthcheck.meta.services",
    "check": "kadmin",
    "result": "ERROR",
    "uuid": "38082d04-c9e2-4d03-927f-1cd1fe1cdff7",
    "when": "20200227125256Z",
    "duration": "0.007875",
    "kw": {
      "status": false,
      "msg": "kadmin: not running"
    }
  },
  {
    "source": "ipahealthcheck.meta.services",
    "check": "krb5kdc",
    "result": "ERROR",
    "uuid": "ea00917b-d5f8-44a2-9cf4-9aa66a48c618",
    "when": "20200227125256Z",
    "duration": "0.007864",
    "kw": {
      "status": false,
      "msg": "krb5kdc: not running"
    }
  },
  {
    "source": "ipahealthcheck.meta.services",
    "check": "named",
    "result": "ERROR",
    "uuid": "cfb446a5-d45f-4195-b1ed-5e95227f71d8",
    "when": "20200227125256Z",
    "duration": "0.008876",
    "kw": {
      "status": false,
      "msg": "named: not running"
    }
  },
  {
    "source": "ipahealthcheck.meta.services",
    "check": "pki_tomcatd",
    "result": "ERROR",
    "uuid": "bbbde7dd-ffef-4623-8db0-7dffba0bb491",
    "when": "20200227125256Z",
    "duration": "0.000549",
    "kw": {
      "status": false,
      "msg": "pki_tomcatd: not running"
    }
  },
  {
    "source": "ipahealthcheck.meta.services",
    "check": "sssd",
    "result": "SUCCESS",
    "uuid": "e5c4fb1f-ab2b-4a4a-ba1f-6602f0bc5c07",
    "when": "20200227125256Z",
    "duration": "0.007764",
    "kw": {
      "status": true
    }
  }
]
[root@master ~]#

ipa-healthcheck is working fine. Moving to verify.

Comment 8 errata-xmlrpc 2020-04-28 15:44:43 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, 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/RHEA-2020:1640