mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2024-12-23 15:40:01 -06:00
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
This commit is contained in:
parent
8c16188519
commit
af7807aacc
@ -98,15 +98,16 @@ class SystemdService(base.PlatformService):
|
|||||||
|
|
||||||
def stop(self, instance_name="", capture_output=True):
|
def stop(self, instance_name="", capture_output=True):
|
||||||
instance = self.service_instance(instance_name)
|
instance = self.service_instance(instance_name)
|
||||||
|
args = ["/bin/systemctl", "stop", instance]
|
||||||
|
|
||||||
# The --ignore-dependencies switch is used to avoid possible
|
# The --ignore-dependencies switch is used to avoid possible
|
||||||
# deadlock during the shutdown transaction. For more details, see
|
# deadlock during the shutdown transaction. For more details, see
|
||||||
# https://fedorahosted.org/freeipa/ticket/3729#comment:1 and
|
# https://fedorahosted.org/freeipa/ticket/3729#comment:1 and
|
||||||
# https://bugzilla.redhat.com/show_bug.cgi?id=973331#c11
|
# https://bugzilla.redhat.com/show_bug.cgi?id=973331#c11
|
||||||
ipautil.run(
|
if instance == "ipa-otpd.socket":
|
||||||
["/bin/systemctl", "stop", instance, "--ignore-dependencies"],
|
args.append("--ignore-dependencies")
|
||||||
capture_output=capture_output
|
|
||||||
)
|
ipautil.run(args, capture_output=capture_output)
|
||||||
|
|
||||||
if 'context' in api.env and api.env.context in ['ipactl', 'installer']:
|
if 'context' in api.env and api.env.context in ['ipactl', 'installer']:
|
||||||
update_service_list = True
|
update_service_list = True
|
||||||
|
Loading…
Reference in New Issue
Block a user