Questions tagged [upstart]

Upstart is an event-based replacement for the /sbin/init daemon which handles starting of tasks and services during boot, stopping them during shutdown and supervising them while the system is running.

Upstart was created due to fundamental limitations in existing systems. Those systems can be categorized into two types:

  • System V init system
  • Dependency-based init systems

It was necessary to outline the limitations of the SysV and dependency-based init systems to appreciate why Upstart is special...

Upstart is revolutionary as it recognises and was designed specifically for a dynamic system. It handles asynchronicity by emitting events. This too is revolutionary.

Upstart emits "events" which services can register an interest in. When an event -- or combination of events -- is emitted that satisfies some service's requirements, Upstart will automatically start or stop that service. If multiple jobs have the same "start on" condition, Upstart will start those jobs ''in parallel''. To be manifest: Upstart handles starting the "dependent" services itself - this is not handled by the service file itself as it is with dependency-based systems.

Further, Upstart is being guided by the ultimate arbiter of hardware devices: the kernel.

In essence, Upstart is an event engine: it creates events, handles the consequences of those events being emitted and starts and stops processes as required. Like the best Unix software, it does this job very well. It is efficient, fast, flexible and reliable. It makes use of "helper" daemons (such as the upstart-udev-bridge and the upstart-socket-bridge) to inject new types of events into the system and react to these events. This design is sensible and clean: the init system itself must not be compromised since if it fails, the kernel panics. Therefore, any functionality which is not considered "core" functionality is farmed out to other daemons.

See more at The Upstart cookbook

284 questions
0
votes
1 answer

Allocate pseudo TTY in Upstart configuration file

We would like to use Upstart to manage a Java process and run it as non-root using sudo. We are on RHEL 6 which means that Upstart is too old to allow us to explicitly specify a user hence the use of sudo. However, the Sudo configuration file…
0
votes
1 answer

How can I use /usr/bin/xvfb-run in an upstart start-stop-daemon

Is this the correct syntax? It seems that Upstart is starting two instances of this daemon: start on runlevel [2345] stop on runlevel [06] limit nofile 32768 32768 env DISPLAY=:0 respawn script [ -r /etc/default/splash ] && .…
Tony
  • 1,281
  • 4
  • 17
  • 23
0
votes
0 answers

setuid upstart not working

I have created a .conf file in which I include setuid mario setgid mario in order to run as mario user. The program I run in the exec command is forever which runs an instance of node which inside spawns cvlc. cvlc does not permit to be…
Mario
  • 127
  • 3
0
votes
1 answer

Starting iaxmodem and faxmodem with upstart

How can I use Upstart to start iaxmodem and faxgetty when I have multiple modems? Centos 6.4 has a nice warning as listed below which incites me to believe the standard inittab lines will not work. # inittab is only used by upstart for the default…
Mitch
  • 2,363
  • 14
  • 23
0
votes
1 answer

Ubuntu upstart: Why does restart do the same thing as stop?

This is my upstart file /etc/init/myapp.conf: description "Example of starting Node with Upstart and Forever" start on filesystem or runlevel [2345] stop on runlevel [06] expect fork console output setuid lwood env HOME=/home/lwood script cd…
lwood
  • 65
  • 1
  • 5
0
votes
1 answer

upstart exec prevents daemon from creating pid

I have a simple upstart script that exec my daemon. When doing so, the correct pid is returned by upstart, but my daemon is not able to create the actual pid file. script VM=$(cat /proc/meminfo | grep MemTotal | awk '{ print $2 }') ulimit…
0
votes
1 answer

Upstart for monitoring forking daemon?

According to this link, it said Upstart is one of the best options for running traditional forking daemons, since it actually uses ptrace to make sure it's watching the correct process ids. Now consider the case of Apache httpd running in…
Howard
  • 2,135
  • 13
  • 48
  • 72
0
votes
1 answer

Minimal container ubuntu image docker like

I'm playing around with LXC. My goal is to run a single process within a container and I'm now focusing on processes running within my container. When I create a basic LXC template on ubuntu 12.04, I've got about ten processes running (including…
rmonjo
  • 231
  • 2
  • 4
  • 12
0
votes
1 answer

upstart always re-starts mysql and will not re-read the conf file

I am using upstart on OEL 6, an old version 0.6.5. I created a conf file to start/stop mysql with a pre-stop section and respawn. Now when I want to change the conf file, I cannot get it re-read because each time I stop mysql it gets re-started and…
Pete
  • 131
  • 6
0
votes
1 answer

What is the "best" `start on` value for an Upstart (init) scripts?

I often see start on runlevel [2345] in Upstart init scripts, but sometimes (e.g., here) I see other events being used to determine start time. How do I know which events (or status codes) should be used for a given program? For instance, I am…
orokusaki
  • 2,763
  • 4
  • 32
  • 43
0
votes
1 answer

Ubuntu - Upstart with a python script that start and finish their own processes

I'm trying to setup with Upstart a python script that launch several internal procs and kill them if is required with this sentences: $ listener.py -startall $ listener.py -killall My Upstart file: # Listener Service description "Listener…
chespinoza
  • 111
  • 4
0
votes
1 answer

Use $HOSTNAME in upstart script

(Can|how do) I use $HOSTNAME in an Ubuntu upstart script like this: start on started foo stop on stopped foo exec someexecutable -n "$HOSTNAME""_bb"
RickyA
  • 300
  • 1
  • 4
  • 12
0
votes
1 answer

can't access sourced variables inside Upstart script stanzas

I'm trying to use the variables defined in /etc/environment in an upstart script. I'm able to export the variable to the child process but for some reason I not able to use them in the upstart script stanza itself. This works: script .…
techjacker
  • 133
  • 6
0
votes
1 answer

Getting mysqld_multi to work with upstart

I used this guide to get started and this wiki page as a reference for the upstart script. My problem is that when I do a service mysql start I get six processes instead of two, as if upstart ran three times. Here are the processes copied from…
jason
  • 126
  • 7
0
votes
1 answer

Move an LXC container to a dm-crypt/LUKS filesystem

I need to move a container to a different filesystem, specifically a subdir of an already mounted LUKS/dm-crypt home dir. I tried moving it there and then bind mounting or symlinking it to /var/lib/lxc/foo but when I do lxc-start -n foo just exits…
Ross Patterson
  • 149
  • 2
  • 8