https://fedorahosted.org/freeipa/ticket/4709
With this patch, IPA should no longer call systemctl on dirsrv.tagret,
but rather on its concrete service.
Since systemctl stop waits for shutdown of services (but not targets),
we can assume dirsrv will be down (and the database unlocked) after
stop() is done.
There's a DS ticket [0] to explicitly tell systemd which process to wait
on, but in my experience, systemd guesses correctly even without that fix.
[0] https://fedorahosted.org/389/ticket/47951
--
PetrĀ³
From b963c58bf340edc0a5f316e2a574f17229bd0bcc Mon Sep 17 00:00:00 2001
From: Petr Viktorin pvikt...@redhat.com
Date: Tue, 11 Nov 2014 16:07:37 +0100
Subject: [PATCH] ipaplatform: Use the dirsrv service, not target
IPA only uses one instance of the directory server. When an instance
is not specified to a call to service.start/stop/restart/...,
use IPA's instance.
Stopping a systemd service is synchronous (bby default), but stopping
a target is not. This will change ensures that the directory server
is actually down when stop() finishes.
https://fedorahosted.org/freeipa/ticket/4709
---
ipaplatform/base/services.py | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/ipaplatform/base/services.py b/ipaplatform/base/services.py
index 01d95b39cc7b845bdc612d40b3eea29d6de2961a..5921da920f88455395b7804101b9136349fbba7c 100644
--- a/ipaplatform/base/services.py
+++ b/ipaplatform/base/services.py
@@ -187,8 +187,7 @@ def service_instance(self, instance_name, operation=None):
elements = self.systemd_name.split(@)
# Make sure the correct DS instance is returned
-if (elements[0] == 'dirsrv' and not instance_name and
-operation == 'is-active'):
+if elements[0] == 'dirsrv' and not instance_name:
return ('dirsrv@%s.service'
% str(self.api.env.realm.replace('.', '-')))
--
2.1.0
___
Freeipa-devel mailing list
Freeipa-devel@redhat.com
https://www.redhat.com/mailman/listinfo/freeipa-devel