Provide finite value for systemd's TimeoutStopSec
This commit switches TimeoutStopSec in DevStack's systemd unit files from "infinity" to "300". There are two motivations for that change: * 5 minutes should be more than enough to stop a service. * systemd included in CentOS 7 and RHEL 7 doesn't support "infinity" as a value, "0" should be provided instead. When "infinity" is set, systemd will kill the service instantly, leaving service children processes orphaned. Instead of differentiating here, we can just set a sane, finite number. Closes-Bug: 1731275 Change-Id: I0a079ea9879fa4fbba23104c2f5ab6e0721a2a2a
This commit is contained in:
parent
2e3c96a3ad
commit
3b815a3cb2
@ -1394,7 +1394,7 @@ function write_user_unit_file {
|
||||
iniset -sudo $unitfile "Service" "User" "$user"
|
||||
iniset -sudo $unitfile "Service" "ExecStart" "$command"
|
||||
iniset -sudo $unitfile "Service" "KillMode" "process"
|
||||
iniset -sudo $unitfile "Service" "TimeoutStopSec" "infinity"
|
||||
iniset -sudo $unitfile "Service" "TimeoutStopSec" "300"
|
||||
iniset -sudo $unitfile "Service" "ExecReload" "$KILL_PATH -HUP \$MAINPID"
|
||||
if [[ -n "$group" ]]; then
|
||||
iniset -sudo $unitfile "Service" "Group" "$group"
|
||||
|
Loading…
Reference in New Issue
Block a user