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
... | ... |
@@ -1394,7 +1394,7 @@ function write_user_unit_file { |
1394 | 1394 |
iniset -sudo $unitfile "Service" "User" "$user" |
1395 | 1395 |
iniset -sudo $unitfile "Service" "ExecStart" "$command" |
1396 | 1396 |
iniset -sudo $unitfile "Service" "KillMode" "process" |
1397 |
- iniset -sudo $unitfile "Service" "TimeoutStopSec" "infinity" |
|
1397 |
+ iniset -sudo $unitfile "Service" "TimeoutStopSec" "300" |
|
1398 | 1398 |
iniset -sudo $unitfile "Service" "ExecReload" "$KILL_PATH -HUP \$MAINPID" |
1399 | 1399 |
if [[ -n "$group" ]]; then |
1400 | 1400 |
iniset -sudo $unitfile "Service" "Group" "$group" |