user jobs don't start on boot

Bug #1065965 reported by John Leach
48
This bug affects 11 people
Affects Status Importance Assigned to Milestone
upstart
New
Undecided
Unassigned

Bug Description

User jobs aren't loaded into Upstart until the user creates an Upstart session, so any user jobs set to start on certain boot events don't get started.

Bradley Ayers worked around this by creating an early running system job that created a session for all users that have user jobs defined: http://bradleyayers.blogspot.com.au/2012/04/enabling-upstart-user-jobs-to-start-at.html

But this no longer works under Ubuntu Precise because the only way to create a user session with Upstart is via dbus and dbus isn't running early enough to create a user session before runlevels, or even before net-device-up and others apparently (Bradley was hooking in pre rc-sysinit). Presumably in previous Ubuntu releases either dbus started earlier or initctl could communicate with Uptart without dbus somehow.

I've personally worked around this by changing Bradley's script to run after dbus and emit a "user-jobs" event that my user jobs can listen on, but this isn't very flexible.

For many reasons, it's probably not a great idea to have Upstart trying to look in all user home directories on boot by default, but it'd be good to be able to configure upstart with a list of users to consider for user jobs (and maybe by using a group too?)

Or at least have a method of telling upstart about a particular user's jobs as Bradley's script originally managed (upstart 1.5 codebase doesn't suggest this is possible).

Revision history for this message
Steve Dodd (anarchetic) wrote :
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.