Felipe Barreto Volpone via FreeIPA-devel wrote:
> Hi list,
> I'm working on BZ https://bugzilla.redhat.com/show_bug.cgi?id=1409786 and I 
> need some help to understand what is going here.
> The main problem is: to check if dirsrv is running before calling
> ca.install().
> So, in order to do that I added the lines in ca install_check:
> if services.knownservices.dirsrv.is_installed() and 
>    not services.knownservices.dirsrv.is_running(): 
>     raise ScriptError('Directory Server is not running')
> is_running returns True, however, the method is_installed always returns 
> False. 
> The method checks if "dirsrv@EXAMPLE-TEST.service" is in the output of 
> "systemctl list-unit-files --full", which do not happen. 
> If I run "systemctl | grep running", dirsrv@EXAMPLE-TEST.service is in the 
> ouput. 
> What I'm missing here?

I think you'll need to override the Service is_installed method and look
for something 389-ds-specific. You'll need the instance_name for sure.
Perhaps seeing if /etc/dirsrv/slapd-REALM exists is good enough.

FreeIPA-devel mailing list -- freeipa-devel@lists.fedorahosted.org
To unsubscribe send an email to freeipa-devel-le...@lists.fedorahosted.org

Reply via email to