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 1780510 - Source 'ipahealthcheck.ipa.topology' not found is displayed when ipactl service is stopped
Summary: Source 'ipahealthcheck.ipa.topology' not found is displayed when ipactl servi...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: ipa-healthcheck
Version: 8.1
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: 8.0
Assignee: Rob Crittenden
QA Contact: ipa-qe
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-12-06 09:03 UTC by Sudhir Menon
Modified: 2021-05-18 15:48 UTC (History)
4 users (show)

Fixed In Version: ipa-healthcheck-0.7-1.el8
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-05-18 15:47:50 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Sudhir Menon 2019-12-06 09:03:20 UTC
Description of problem: Source 'ipahealthcheck.ipa.topology' not found is displayed when ipactl stop is run.


Version-Release number of selected component (if applicable):
ipa-server-4.8.0-11.module+el8.1.0+4247+9f3fd721.x86_64


How reproducible: Always

Steps to Reproduce:
1. Install ipa-server and then do ipactl stop.
2. Now run the command #ipa-healthcheck --source ipahealthcheck.ipa.topology
3. Run the command #ipa-healthcheck --source ipahealthcheck.meta.services

Actual results:
2. "ipa-healthcheck --source ipahealthcheck.ipa.topology" displays an error 
[root@master ~]# ipa-healthcheck --source ipahealthcheck.ipa.topology
Source 'ipahealthcheck.ipa.topology' not found

When ipa-healthcheck --source ipahealthcheck.ipa.topology --debug is run we can see a traceback.

stderr=
Calling check <ipahealthcheck.meta.services.pki_tomcatd object at 0x7f0103e33518>
Loading StateFile from '/var/lib/ipa/sysrestore/sysrestore.state'
Loading Index file from '/var/lib/ipa/sysrestore/sysrestore.index'
request POST http://master.rhel81.test:8080/ca/admin/ca/getStatus
request body ''
httplib request failed:
Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/ipapython/dogtag.py", line 230, in _httplib_request
    conn.request(method, path, body=request_body, headers=headers)
  File "/usr/lib64/python3.6/http/client.py", line 1254, in request
    self._send_request(method, url, body, headers, encode_chunked)
  File "/usr/lib64/python3.6/http/client.py", line 1300, in _send_request
    self.endheaders(body, encode_chunked=encode_chunked)
  File "/usr/lib64/python3.6/http/client.py", line 1249, in endheaders
    self._send_output(message_body, encode_chunked=encode_chunked)
  File "/usr/lib64/python3.6/http/client.py", line 1036, in _send_output
    self.send(msg)
  File "/usr/lib64/python3.6/http/client.py", line 974, in send
    self.connect()
  File "/usr/lib64/python3.6/http/client.py", line 946, in connect
    (self.host,self.port), self.timeout, self.source_address)
  File "/usr/lib64/python3.6/socket.py", line 724, in create_connection
    raise err
  File "/usr/lib64/python3.6/socket.py", line 713, in create_connection
    sock.connect(sa)
ConnectionRefusedError: [Errno 111] Connection refused
Failed to check CA status: cannot connect to 'http://master.rhel81.test:8080/ca/admin/ca/getStatus': [Errno 111] Connection refused
Calling check <ipahealthcheck.meta.services.sssd object at 0x7f0103e70128>
Starting external process
args=['/bin/systemctl', 'is-active', 'sssd.service']
Process finished, return code=0
stdout=active

stderr=
Calling check <ipahealthcheck.ipa.topology.IPATopologyDomainCheck object at 0x7f0103e90748>
Skipping ipahealthcheck.ipa.topology:IPATopologyDomainCheck because dirsrv service(s) not running
Source 'ipahealthcheck.ipa.topology' not found

3. ipa-healthcheck --source ipahealthcheck.meta.services command runs without displaying Source ipahealthcheck.meta.services not found.

Expected results:
Source 'ipahealthcheck.ipa.topology' not found is misleading and should be replaced with the proper output.

Additional info:

Comment 1 Sudhir Menon 2019-12-06 09:14:30 UTC
The behaviour seems to be the same  when dirsrv instance is not running and the checks require the service to be running.

[root@master ~]# ipa-healthcheck --source ipahealthcheck.dogtag.ca --check DogtagCertsConnectivityCheck --debug
Loading Index file from '/var/lib/ipa/sysrestore/sysrestore.index'
Failed to connect to LDAP: cannot connect to 'ldapi://%2Fvar%2Frun%2Fslapd-RHEL81-TEST.socket': Connection refused
Skipping ipahealthcheck.dogtag.ca:DogtagCertsConnectivityCheck because dirsrv service(s) not running
Check 'DogtagCertsConnectivityCheck' not found in Source 'ipahealthcheck.dogtag.ca'

Comment 3 Rob Crittenden 2020-11-03 21:19:25 UTC
Fixed in upstream: 
1fedf08a6de405b87897c4b7ed30f62cae88cd47

Comment 9 Sumedh Sidhaye 2020-12-18 03:28:20 UTC
Build used for verification:

ipa-client-4.9.0-0.5.rc3.module+el8.4.0+9124+ced20601.x86_64
ipa-client-common-4.9.0-0.5.rc3.module+el8.4.0+9124+ced20601.noarch
ipa-common-4.9.0-0.5.rc3.module+el8.4.0+9124+ced20601.noarch
ipa-healthcheck-0.7-3.module+el8.4.0+9007+5084bdd8.noarch
ipa-healthcheck-core-0.7-3.module+el8.4.0+9007+5084bdd8.noarch
ipa-selinux-4.9.0-0.5.rc3.module+el8.4.0+9124+ced20601.noarch
ipa-server-4.9.0-0.5.rc3.module+el8.4.0+9124+ced20601.x86_64
ipa-server-common-4.9.0-0.5.rc3.module+el8.4.0+9124+ced20601.noarch
ipa-server-dns-4.9.0-0.5.rc3.module+el8.4.0+9124+ced20601.noarch
ipa-server-trust-ad-4.9.0-0.5.rc3.module+el8.4.0+9124+ced20601.x86_64

test_integration/test_ipahealthcheck.py::TestIpaHealthCheck::test_ipahealthcheck_topology_with_ipactl_stop PASSED [ 34%]

------------------------------ Captured log setup ------------------------------
transport.py               391 INFO     RUN ['ipactl', 'stop']
transport.py               513 DEBUG    RUN ['ipactl', 'stop']
transport.py               558 DEBUG    ipa: INFO: The ipactl command was successful
transport.py               558 DEBUG    Stopping ipa-dnskeysyncd Service
transport.py               558 DEBUG    Stopping ipa-otpd Service
transport.py               558 DEBUG    Stopping pki-tomcatd Service
transport.py               558 DEBUG    Stopping ipa-custodia Service
transport.py               558 DEBUG    Stopping httpd Service
transport.py               558 DEBUG    Stopping named Service
transport.py               558 DEBUG    Stopping kadmin Service
transport.py               558 DEBUG    Stopping krb5kdc Service
transport.py               558 DEBUG    Stopping Directory Service
transport.py               217 DEBUG    Exit code: 0
------------------------------ Captured log call -------------------------------
transport.py               391 INFO     RUN ['ipa-healthcheck', '--source', 'ipahealthcheck.ipa.topology', '--debug']
transport.py               513 DEBUG    RUN ['ipa-healthcheck', '--source', 'ipahealthcheck.ipa.topology', '--debug']
transport.py               558 DEBUG    Loading StateFile from '/var/lib/ipa/sysrestore/sysrestore.state'
transport.py               558 DEBUG    Loading StateFile from '/var/lib/ipa/sysrestore/sysrestore.state'
transport.py               558 DEBUG    Source 'ipahealthcheck.ipa.topology' is missing one or more requirements 'dirsrv'
transport.py               217 DEBUG    Exit code: 1

Comment 11 errata-xmlrpc 2021-05-18 15:47:50 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 (Moderate: idm:DL1 and idm:client security, 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/RHSA-2021:1846


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