DevStack kills services non-gracefully with systemd 219

Bug #1731275 reported by Michal Dulko
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
devstack
Fix Released
Undecided
Michal Dulko

Bug Description

This happens when using older systemd (this is CentOS 7.4.1708):

[stack@localhost kuryr-kubernetes]$ yum info systemd
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: centos2.hti.pl
 * epel: ftp.icm.edu.pl
 * extras: mirror-pl.kielcetechnologypark.net
 * updates: mirror-pl.kielcetechnologypark.net
Installed Packages
Name : systemd
Arch : x86_64
Version : 219
Release : 42.el7_4.4
Size : 21 M
Repo : installed
From repo : updates
Summary : A System and Service Manager
(...)

DevStack sets [1] TimeoutStopSec to "infinity". This is a special value that isn't supported on older systemd's:

       TimeoutStopSec=
           (...)
           Pass "0" to disable the timeout logic. Defaults to DefaultTimeoutStopSec= from the manager configuration file (see systemd-system.conf(5)).

This results in systemd sending SIGKILL services almost instantly when stopping. Often services processes get orphaned as master process doesn't stop them in time.

I think it would be best to set the default value to a sane, finite number - like 120.

[1] https://github.com/openstack-dev/devstack/blame/e4eef81c2bd257e890be636a7a9fd4cb61ea3d5b/functions-common#L1397

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to devstack (master)

Fix proposed to branch: master
Review: https://review.openstack.org/519665

Changed in devstack:
assignee: nobody → Michal Dulko (michal-dulko-f)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to devstack (master)

Reviewed: https://review.openstack.org/519665
Committed: https://git.openstack.org/cgit/openstack-dev/devstack/commit/?id=3b815a3cb2537885b501ad559bfd69ad5efb9085
Submitter: Zuul
Branch: master

commit 3b815a3cb2537885b501ad559bfd69ad5efb9085
Author: Michał Dulko <email address hidden>
Date: Tue Nov 14 16:04:51 2017 +0100

    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

Changed in devstack:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.