From f16e7b3a95d48afc0e798055e8ff4ac9efd9ce28 Mon Sep 17 00:00:00 2001
From: Petr Viktorin <pviktori@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
Reviewed-By: Jan Cholasta <jcholast@redhat.com>
---
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 961c368e6b4d81d337cf0a8601075f052352ecbf..370b628c78a65591dec09db25f9f7545f920d795 100644
--- a/ipaplatform/base/services.py
+++ b/ipaplatform/base/services.py
@@ -187,8 +187,7 @@ class SystemdService(PlatformService):
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