summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAna Krivokapic <akrivoka@redhat.com>2013-07-11 14:23:05 +0200
committerAlexander Bokovoy <abokovoy@redhat.com>2013-07-11 18:04:55 +0300
commitaf7807aacc6cf1beb25e53483b54bd599bd6421d (patch)
tree0587c6958494e7608f93a69e4ed03a74f6fbc052
parent8c161885198c7ca8f3be8a8b0e3154ca5344dafb (diff)
downloadfreeipa-af7807aacc6cf1beb25e53483b54bd599bd6421d.zip
freeipa-af7807aacc6cf1beb25e53483b54bd599bd6421d.tar.gz
freeipa-af7807aacc6cf1beb25e53483b54bd599bd6421d.tar.xz
Use --ignore-dependencies only when necessary
Using the --ignore-dependencies switch was causing the ipactl stop command not to stop all instances of dirsrv and dogtag. Make sure the switch is used only when necessary, i.e. to prevent ipa-otpd.socket from getting stuck during the shutdown transaction. https://fedorahosted.org/freeipa/ticket/3730 https://fedorahosted.org/freeipa/ticket/3729
-rw-r--r--ipapython/platform/base/systemd.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/ipapython/platform/base/systemd.py b/ipapython/platform/base/systemd.py
index 84287e3..f122018 100644
--- a/ipapython/platform/base/systemd.py
+++ b/ipapython/platform/base/systemd.py
@@ -98,15 +98,16 @@ class SystemdService(base.PlatformService):
def stop(self, instance_name="", capture_output=True):
instance = self.service_instance(instance_name)
+ args = ["/bin/systemctl", "stop", instance]
# The --ignore-dependencies switch is used to avoid possible
# deadlock during the shutdown transaction. For more details, see
# https://fedorahosted.org/freeipa/ticket/3729#comment:1 and
# https://bugzilla.redhat.com/show_bug.cgi?id=973331#c11
- ipautil.run(
- ["/bin/systemctl", "stop", instance, "--ignore-dependencies"],
- capture_output=capture_output
- )
+ if instance == "ipa-otpd.socket":
+ args.append("--ignore-dependencies")
+
+ ipautil.run(args, capture_output=capture_output)
if 'context' in api.env and api.env.context in ['ipactl', 'installer']:
update_service_list = True