[PKG-Openstack-devel] Bug#767711: openstack-pkg-tools: systemd start fails a fresh install

Mikael Cluseau mcluseau at isi.nc
Sun Nov 2 01:54:49 UTC 2014


Package: openstack-pkg-tools
Version: 16
Severity: important

Dear Maintainer,

The systemd service files do not create the (required) runtime directories (/var/run/${PROJECT_NAME}). This is required to have
the PID file written since the init script is ran as a non-root user ($SYSTEM_USER, like keystone for keystone).

I propose the following fix: https://github.com/MikaelCluseau/debian-openstack-pkg-tools/commit/514de23de656dda1bd92d6012254685e0cc27b57

commit 514de23de656dda1bd92d6012254685e0cc27b57
Author: Mikaël Cluseau <mcluseau at isi.nc>
Date:   Sun Nov 2 11:03:13 2014 +1100

    Fix the missing RuntimeDirectory in systemd units.
    
    Generic fix since init-script-template requires this directory to exist
    and cannot create it when started with systemd: the systemd unit sets
    the user who start the init-script, which cannot create the runtime
    directory since it's not root.

diff --git a/init-template/pkgos-gen-systemd-unit b/init-template/pkgos-gen-systemd-unit
index 0ce0858..8168319 100755
--- a/init-template/pkgos-gen-systemd-unit
+++ b/init-template/pkgos-gen-systemd-unit
@@ -35,6 +35,7 @@ User=${SYSTEM_USER}
 Group=${SYSTEM_GROUP}
 ExecStart=${SCRIPTNAME} systemd-start
 ExecStop=${SCRIPTNAME} systemd-stop
+RuntimeDirectory=/var/run/${PROJECT_NAME}
 PIDFile=/var/run/${PROJECT_NAME}/${NAME}.pid
 Restart=on-failure
 Type=forking


-- System Information:
Debian Release: jessie/sid
  APT prefers testing-updates
  APT policy: (500, 'testing-updates'), (500, 'testing')
Architecture: amd64 (x86_64)

Kernel: Linux 3.16-3-amd64 (SMP w/2 CPU cores)
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)
Shell: /bin/sh linked to /bin/dash

-- no debconf information



More information about the Openstack-devel mailing list