pgreco / rpms / ipa

Forked from forks/areguera/rpms/ipa 4 years ago
Clone

Blame SOURCES/0024-ipaplatform-Use-the-dirsrv-service-not-target.patch

e3ffab
From f16e7b3a95d48afc0e798055e8ff4ac9efd9ce28 Mon Sep 17 00:00:00 2001
e3ffab
From: Petr Viktorin <pviktori@redhat.com>
e3ffab
Date: Tue, 11 Nov 2014 16:07:37 +0100
e3ffab
Subject: [PATCH] ipaplatform: Use the dirsrv service, not target
e3ffab
e3ffab
IPA only uses one instance of the directory server. When an instance
e3ffab
is not specified to a call to service.start/stop/restart/...,
e3ffab
use IPA's instance.
e3ffab
e3ffab
Stopping a systemd service is synchronous (bby default), but stopping
e3ffab
a target is not. This will change ensures that the directory server
e3ffab
is actually down when stop() finishes.
e3ffab
e3ffab
https://fedorahosted.org/freeipa/ticket/4709
e3ffab
e3ffab
Reviewed-By: Jan Cholasta <jcholast@redhat.com>
e3ffab
---
e3ffab
 ipaplatform/base/services.py | 3 +--
e3ffab
 1 file changed, 1 insertion(+), 2 deletions(-)
e3ffab
e3ffab
diff --git a/ipaplatform/base/services.py b/ipaplatform/base/services.py
e3ffab
index 961c368e6b4d81d337cf0a8601075f052352ecbf..370b628c78a65591dec09db25f9f7545f920d795 100644
e3ffab
--- a/ipaplatform/base/services.py
e3ffab
+++ b/ipaplatform/base/services.py
e3ffab
@@ -187,8 +187,7 @@ class SystemdService(PlatformService):
e3ffab
         elements = self.systemd_name.split("@")
e3ffab
 
e3ffab
         # Make sure the correct DS instance is returned
e3ffab
-        if (elements[0] == 'dirsrv' and not instance_name and
e3ffab
-            operation == 'is-active'):
e3ffab
+        if elements[0] == 'dirsrv' and not instance_name:
e3ffab
 
e3ffab
             return ('dirsrv@%s.service'
e3ffab
                     % str(self.api.env.realm.replace('.', '-')))
e3ffab
-- 
e3ffab
2.1.0
e3ffab