Add patches to fix behavior when all IPA services are stopped
- Don't collect IPA servers in MetaCheck - Skip if dirsrv not available in IPAMetaCheck
This commit is contained in:
parent
96ee77bf9e
commit
7da61eab19
41
0002-Don-t-collect-the-list-of-masters-in-MetaCheck.patch
Normal file
41
0002-Don-t-collect-the-list-of-masters-in-MetaCheck.patch
Normal file
@ -0,0 +1,41 @@
|
||||
From f78a6c7297375b4721835bae2f33bf0ed34a0586 Mon Sep 17 00:00:00 2001
|
||||
From: Rob Crittenden <rcritten@redhat.com>
|
||||
Date: Wed, 15 Jul 2020 16:47:22 -0400
|
||||
Subject: [PATCH] Don't collect the list of masters in MetaCheck
|
||||
|
||||
It is already collected in IPAMetaCheck.
|
||||
|
||||
Signed-off-by: Rob Crittenden <rcritten@redhat.com>
|
||||
---
|
||||
src/ipahealthcheck/meta/core.py | 8 --------
|
||||
1 file changed, 8 deletions(-)
|
||||
|
||||
diff --git a/src/ipahealthcheck/meta/core.py b/src/ipahealthcheck/meta/core.py
|
||||
index 491a4f0..c021b79 100644
|
||||
--- a/src/ipahealthcheck/meta/core.py
|
||||
+++ b/src/ipahealthcheck/meta/core.py
|
||||
@@ -7,21 +7,13 @@ from ipahealthcheck.core import constants
|
||||
from ipahealthcheck.core.plugin import Result, duration
|
||||
from ipahealthcheck.meta.plugin import Plugin, registry
|
||||
from ipapython.version import VERSION, API_VERSION
|
||||
-from ipapython.dn import DN
|
||||
-from ipalib import api
|
||||
|
||||
|
||||
@registry
|
||||
class MetaCheck(Plugin):
|
||||
@duration
|
||||
def check(self):
|
||||
- conn = api.Backend.ldap2
|
||||
- masters_dn = DN(api.env.container_masters, api.env.basedn)
|
||||
- masters = conn.get_entries(masters_dn, conn.SCOPE_ONELEVEL)
|
||||
- known = [master.single_value['cn'] for master in masters]
|
||||
-
|
||||
yield Result(self, constants.SUCCESS,
|
||||
fqdn=socket.getfqdn(),
|
||||
- masters=known,
|
||||
ipa_version=VERSION,
|
||||
ipa_api_version=API_VERSION,)
|
||||
--
|
||||
2.25.4
|
||||
|
||||
@ -0,0 +1,29 @@
|
||||
From 4cb249430141fdc27d84ee796149a14b7e83afb5 Mon Sep 17 00:00:00 2001
|
||||
From: Rob Crittenden <rcritten@redhat.com>
|
||||
Date: Thu, 23 Jul 2020 17:07:43 -0400
|
||||
Subject: [PATCH] Require that dirsrv be running to run the IPAMetaCheck
|
||||
|
||||
Without it we don't have an LDAP connection to collect the
|
||||
list of servers.
|
||||
|
||||
Signed-off-by: Rob Crittenden <rcritten@redhat.com>
|
||||
---
|
||||
src/ipahealthcheck/ipa/meta.py | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/src/ipahealthcheck/ipa/meta.py b/src/ipahealthcheck/ipa/meta.py
|
||||
index caf27ea..e4ca323 100644
|
||||
--- a/src/ipahealthcheck/ipa/meta.py
|
||||
+++ b/src/ipahealthcheck/ipa/meta.py
|
||||
@@ -11,6 +11,8 @@ from ipalib import api
|
||||
@registry
|
||||
class IPAMetaCheck(IPAPlugin):
|
||||
"""Return meta data for the IPA installation"""
|
||||
+ requires = ('dirsrv',)
|
||||
+
|
||||
@duration
|
||||
def check(self):
|
||||
try:
|
||||
--
|
||||
2.25.4
|
||||
|
||||
@ -9,7 +9,7 @@
|
||||
|
||||
Name: %{project}-%{shortname}
|
||||
Version: 0.6
|
||||
Release: 1%{?dist}
|
||||
Release: 2%{?dist}
|
||||
Summary: Health check tool for %{projectname}
|
||||
BuildArch: noarch
|
||||
License: GPLv3
|
||||
@ -18,6 +18,8 @@ Source0: https://github.com/freeipa/freeipa-healthcheck/archive/%{version
|
||||
Source1: %{longname}.conf
|
||||
|
||||
Patch0001: 0001-Remove-ipaclustercheck.patch
|
||||
Patch0002: 0002-Don-t-collect-the-list-of-masters-in-MetaCheck.patch
|
||||
Patch0003: 0003-Require-that-dirsrv-be-running-to-run-the-IPAMetaChe.patch
|
||||
|
||||
Requires: %{project}-server
|
||||
Requires: python3-ipalib
|
||||
@ -131,6 +133,10 @@ install -p -m644 %{_builddir}/%{project}-%{shortname}-%{version}/man/man5/%{long
|
||||
|
||||
|
||||
%changelog
|
||||
* Fri Jul 24 2020 Rob Crittenden <rcritten@redhat.com> - 0.6-2
|
||||
- Don't collect IPA servers in MetaCheck
|
||||
- Skip if dirsrv not available in IPAMetaCheck
|
||||
|
||||
* Wed Jul 1 2020 Rob Crittenden <rcritten@redhat.com> - 0.6-1
|
||||
- Update to upstream 0.6
|
||||
- Don't include cluster checking yet
|
||||
|
||||
Loading…
Reference in New Issue
Block a user