init: support negation in env matches of job start/stop conditions

Bug #513035 reported by Steve Langasek on 2010-01-27
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Scott James Remnant (Canonical)
upstart (Ubuntu)
Scott James Remnant (Canonical)

Bug Description

Binary package hint: upstart

Trying to convert samba to upstart, the conversion is blocked because upstart doesn't allow correct expression of the start condition. The correct (hypothetical) condition is:

 *start on (local-filesystems and net-device-up IFACE!=lo)

aside from the known problematic issues with AND'ing the two events together (i.e.: boot; stop nmbd; restart a network interface --> initctl emit net-device-up hangs indefinitely), there's no way to express *'net-device-up IFACE!=lo' because there's no negation operator for environment string matches: the closest you can get is 'net-device up IFACE=[!l]*', but that will also exclude other interfaces whose name begins with 'l' - I don't know of any interfaces whose names match by default in the kernel, but since users can customize their interface names (and are more likely to do so on servers), I don't think having nmbd fail to start for these users is sufficient.

ProblemType: Bug
Architecture: amd64
Date: Tue Jan 26 16:19:03 2010
DistroRelease: Ubuntu 10.04
Package: upstart 0.6.3-11build1
 PATH=(custom, user)
ProcVersionSignature: Ubuntu 2.6.32-11.15-generic
SourcePackage: upstart
Uname: Linux 2.6.32-11-generic x86_64

Steve Langasek (vorlon) wrote :
Changed in upstart (Ubuntu):
importance: Undecided → Wishlist
status: New → Triaged
Changed in upstart:
status: New → Fix Committed
Changed in upstart (Ubuntu):
status: Triaged → Fix Committed
Changed in upstart:
milestone: none → 0.6.5
assignee: nobody → Scott James Remnant (scott)
Changed in upstart (Ubuntu):
assignee: nobody → Scott James Remnant (scott)
Changed in upstart:
importance: Undecided → Wishlist
summary: - no support for negation in env matches of job start/stop conditions
+ init: support negation in env matches of job start/stop conditions

0.6.5 2010-02-04 "Our last, best hope for victory"

 * Since libnih has been separated out into its own project, Upstart
   no longer includes its source and now uses the installed version by

 * The external nih-dbus-tool means that cross-compilation is trivial,
   the path to it may be overriden with NIH_DBUS_TOOL=... as an
   argument to configure. (Bug: #426740)

 * Developers may still build against a local libnih source tree by
   passing --with-local-libnih=/path/to/libnih to configure.

 * There is a new initctl "reload" command, with matching
   /sbin/reload symlink. This sends the SIGHUP signal to the running
   main process of the named job instance.

 * Event operator matches in jobs now support "!=" in addition to the
   usual "=", e.g.:

  start on net-device-added INTERFACE!=eth*

   (Bug: #513035)

 * Moved D-Bus system bus reconnection trigger from SIGHUP to SIGUSR1,
   since SIGHUP is already used for a forced configuration reload and
   causes Upstart to "forget" state.

 * Fixed bug where the default runlevel would be lost when an
   /etc/inittab file exists without an initdefault line. (Bug: #405847)

 * Fixed "Unhandled error" message from shutdown. (Bug: #426332)

 * Fixed "Unhandled error" assertion crash from Upstart child
   processes when failing to spawn a job. (Bug: #451917)

 * No longer holds /dev/console open, so the SAK SysRq key will not
   kill Upstart. (Bug: #486005)

 * Restored sync() call before reboot().

 * Added missing OPTIONS section to init(8) manpage. (Bug: #449883)

Changed in upstart:
status: Fix Committed → Fix Released
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package upstart - 0.6.5-1

upstart (0.6.5-1) lucid; urgency=low

  * New upstream release:
    - libnih has been separated out into its own project.
    - "start on" and "stop on" now support != matches. LP: #513035.
    - Fixed crash in child when unable to spawn job. LP: #451917.
    - No longer holds /dev/console open so SAK won't kill init. LP: #486005.
    - Added missing OPTIONS section to init(8). LP: #449883.

  [ Scott James Remnant ]
  * Build-depend on libnih-dev, libnih-dbus-dev and nih-dbus-tool to use
    the separated out libnih.
    - This has the fix for LP: #436758.
    - Remove changelog.nih from the doc directory.
  * Bump udev build-dependency to 147 to match upstream.
  * udev/ Update to use external libnih

  [ Johan Kiviniemi ]
  * udev/upstart-udev-bridge.c: Change -device-remove to -device-removed to
    match -device-added and -device-changed. LP: #516698.
 -- Scott James Remnant <email address hidden> Thu, 04 Feb 2010 16:30:10 -0800

Changed in upstart (Ubuntu):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers