upstart jobs will start services before all network interfaces are up and will not restart on runlevel 1->2

Bug #1030197 reported by Clint Byrum
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
cinder (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

description "Cinder api server"
author "Chuck Short <email address hidden>

start on (filesystem and net-device-up IFACE!=lo)
stop on runlevel [016]

chdir /var/run

pre-start script
    mkdir -p /var/run/cinder
    chown cinder:cinder /var/run/cinder

    mkdir -p /var/lock/cinder
    chown nova:root /var/lock/nova
end script

exec su -s /bin/sh -c "cinder-api" cinder

This should be

start on runlevel [2345]

Which guarantees all interfaces from /etc/network/interfaces have at least been tried and waited on for 2 minutes (failsafe will boot the system anyway after 2 minutes)

Also using su is not recommended as it opens a pam session. Instead, use start-stop-daemon, as recommended here:

http://upstart.ubuntu.com/cookbook/#run-a-job-as-a-different-user

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package cinder - 2012.2~f3~20120809.102-0ubuntu1

---------------
cinder (2012.2~f3~20120809.102-0ubuntu1) quantal; urgency=low

  [ Adam Gandelman ]
  * debian/control: Add python-setuptools dependency.
  * debian/cinder-common.postinst: Fix syntax errors, fix permissions.
  * debian/cinder-common.dirs: Correct, etc/nova -> etc/cinder.
  * debian/{cinder_sudoers, rules, cinder-common.install}: Install proper
    cinder_sudoers.
  * debian/cinder-*.upstart: Close quotes, replace 'nova' references with
    'cinder'.
  * debian/cinder.conf: Specify correct sql_connection.
  * debian/cinder-scheduler.postinst: Added. Migrate local databases only.

  [ Chuck Short ]
  * debian/*.upstart: Fix upstart jobs to run with right interfaces.
    (LP: #1030197)
  * debian/control: Drop python-babel, python-nosexcover
  * debian/control: Add python-mox, pep8
  * debian/rules: Re-add get-orig-source
  * debian/rules: Enable testsuite.
  * debian/cinder.conf: Update config file.
  * debian/cinder-{api,volumes,scheduler}.manpages: Add manpages.
  * New upstream version.
  * debian/rules: Don't run pep8 tests
  * debian/patches/0001-Use-setuptools-git.patch: Cleanup manifest
  * debian/control: Add python-setuptools-git
  * debian/control: Add section for python-cinder
  * fix lintian warnings and errors.
  * debian/cinder-common.install: Remove clear_rabbit_queues since it
    will conflict with nova installed.
 -- Chuck Short <email address hidden> Fri, 10 Aug 2012 12:05:11 -0500

Changed in cinder (Ubuntu):
status: New → 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.