Skip to content

Commit

Permalink
Add a dirsrv requires to services that look up their names in LDAP
Browse files Browse the repository at this point in the history
Some services aren't included in ipaplaform.knownservices
like smb and winbind. It is possible to discover the
service name using the same method used by ipactl, via roles.

If dirsrv isn't started then this will blow up spectacularly
so use requires as a guard against it.

Fixes: #301

Signed-off-by: Rob Crittenden <[email protected]>
  • Loading branch information
rcritten committed Sep 29, 2023
1 parent 9603491 commit d57ed31
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions src/ipahealthcheck/meta/services.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,8 @@ def check(self, instance=''):

@registry
class ipa_custodia(IPAServiceCheck):
requires = ('dirsrv',)

def check(self, instance=''):
self.service_name = self.get_service_name('KEYS')

Expand All @@ -138,6 +140,8 @@ def check(self, instance=''):

@registry
class kadmin(IPAServiceCheck):
requires = ('dirsrv',)

def check(self, instance=''):
self.service_name = self.get_service_name('KPASSWD')

Expand All @@ -150,6 +154,8 @@ def check(self, instance=''):

@registry
class krb5kdc(IPAServiceCheck):
requires = ('dirsrv',)

def check(self, instance=''):
self.service_name = self.get_service_name('KDC')

Expand All @@ -162,6 +168,8 @@ def check(self, instance=''):

@registry
class named(IPAServiceCheck):
requires = ('dirsrv',)

def check(self, instance=''):
self.service_name = self.get_service_name('DNS')

Expand All @@ -174,6 +182,8 @@ def check(self, instance=''):

@registry
class ods_enforcerd(IPAServiceCheck):
requires = ('dirsrv',)

def check(self, instance=''):
self.service_name = self.get_service_name('DNSSEC')

Expand All @@ -186,6 +196,8 @@ def check(self, instance=''):

@registry
class ipa_ods_exporter(IPAServiceCheck):
requires = ('dirsrv',)

def check(self, instance=''):
self.service_name = self.get_service_name('DNSKeyExporter')

Expand All @@ -198,6 +210,8 @@ def check(self, instance=''):

@registry
class ipa_dnskeysyncd(IPAServiceCheck):
requires = ('dirsrv',)

def check(self, instance=''):
self.service_name = self.get_service_name('DNSKeySync')

Expand All @@ -210,6 +224,8 @@ def check(self, instance=''):

@registry
class pki_tomcatd(IPAServiceCheck):
requires = ('dirsrv',)

def check(self, instance=''):
self.service_name = self.get_service_name('CA')

Expand Down Expand Up @@ -238,6 +254,8 @@ def check(self, instance=''):

@registry
class smb(IPAServiceCheck):
requires = ('dirsrv',)

def check(self, instance=''):
self.service_name = self.get_service_name('ADTRUST')

Expand All @@ -250,6 +268,8 @@ def check(self, instance=''):

@registry
class winbind(IPAServiceCheck):
requires = ('dirsrv',)

def check(self, instance=''):
self.service_name = self.get_service_name('EXTID')

Expand Down

0 comments on commit d57ed31

Please sign in to comment.