summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAna Krivokapic <akrivoka@redhat.com>2013-06-20 17:04:49 +0200
committerAlexander Bokovoy <abokovoy@redhat.com>2013-07-11 12:39:28 +0300
commitfb166e8f5c0a959f0f1dd9ceb5d9cc8ddd3e7ef6 (patch)
tree461ec7d2a471c881625a533248fc6f95545c2906
parent3b93df4e4e4035fb9bb1c3a97673ddcaa4a582a0 (diff)
downloadfreeipa-fb166e8f5c0a959f0f1dd9ceb5d9cc8ddd3e7ef6.tar.gz
freeipa-fb166e8f5c0a959f0f1dd9ceb5d9cc8ddd3e7ef6.tar.xz
freeipa-fb166e8f5c0a959f0f1dd9ceb5d9cc8ddd3e7ef6.zip
Avoid systemd service deadlock during shutdown
https://fedorahosted.org/freeipa/ticket/3729
-rw-r--r--ipapython/platform/base/systemd.py12
1 files changed, 11 insertions, 1 deletions
diff --git a/ipapython/platform/base/systemd.py b/ipapython/platform/base/systemd.py
index 9721ac1a..84287e38 100644
--- a/ipapython/platform/base/systemd.py
+++ b/ipapython/platform/base/systemd.py
@@ -97,7 +97,17 @@ class SystemdService(base.PlatformService):
ipautil.wait_for_open_ports('localhost', ports, api.env.startup_timeout)
def stop(self, instance_name="", capture_output=True):
- ipautil.run(["/bin/systemctl", "stop", self.service_instance(instance_name)], capture_output=capture_output)
+ instance = self.service_instance(instance_name)
+
+ # 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 'context' in api.env and api.env.context in ['ipactl', 'installer']:
update_service_list = True
else: