diff options
author | Ana Krivokapic <akrivoka@redhat.com> | 2013-06-20 17:04:49 +0200 |
---|---|---|
committer | Alexander Bokovoy <abokovoy@redhat.com> | 2013-07-11 13:26:28 +0300 |
commit | f99bbb97e71cec50754c756d06a905cb879fdf4d (patch) | |
tree | e10e174568ed5394ee6fae761cff087b24b992b4 /ipapython | |
parent | 219fd1abd38f496c3097e732ec495916ed37f4d6 (diff) | |
download | freeipa.git-f99bbb97e71cec50754c756d06a905cb879fdf4d.tar.gz freeipa.git-f99bbb97e71cec50754c756d06a905cb879fdf4d.tar.xz freeipa.git-f99bbb97e71cec50754c756d06a905cb879fdf4d.zip |
Avoid systemd service deadlock during shutdown
https://fedorahosted.org/freeipa/ticket/3729
Diffstat (limited to 'ipapython')
-rw-r--r-- | ipapython/platform/base/systemd.py | 12 |
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: |