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
5
votes
2 answers

Privileges when doing sudo to another domain user

Suppose I have a corporate domain mydomain using MS Active Directory. In the domain I have the users myuser and youruser. Now, on one specific Ubuntu machine mymachine, myuser has sudo rights, and does sudo su youruser (or sudo -u youruser sh).…
JHH
  • 173
  • 1
  • 6
5
votes
1 answer

Is there a timeout for init.d scripts running during boot process?

I am creating a few scripts that are being registered to execute on server start on CentOS 6.5. One of this scripts has a while loop that blocks until it finds a successful start message on the log of another process that is also being started…
groo
  • 153
  • 1
  • 6
5
votes
1 answer

Pre-populate vagrant synced folder contents

I'm currently building an rather complicated server stack (a ruby on rails app) that I want developers to be able to work on without having to install everything themselves. Therefore I use Vagrant to allow them to do that. The idea is that when you…
user125756
  • 183
  • 6
5
votes
1 answer

Daemon dies but upstart thinks it is still running

If the daemon process dies, I'm unable to restart it manually: start foo results in a message that "start: Job is already running: foo", and stop foo hangs indefinitely. start on runlevel [2345] stop on runlevel [016] kill timeout 90 expect…
ejain
  • 233
  • 2
  • 7
5
votes
2 answers

Cannot find upstart logs in syslog despite a log-priority of debug (ubuntu 13.04 & mint 16)

I've set upstart log level to "debug" sudo initctl log-priority debug But I still cannot see anything in /var/log/syslog. sudo initctl emit hello # no log sudo initctl start my-broken-service # still no log I've checked rsyslog config (in…
Bruno Bieth
  • 161
  • 1
  • 4
5
votes
3 answers

chkconfig equivalent for upstart jobs on CentOS6

On RHEL6/CentOS6 what is the upstart way to: chkconfig add my-svc chkconfig my-svc on Explanation: I have written an /etc/init/xvc0.conf job. I can do start xvc0 on the CLI, but after reboot initctl list gives me ... xvc0 stop/waiting ... So…
Alien Life Form
  • 2,279
  • 2
  • 21
  • 31
5
votes
1 answer

Upstart won't reload it's configuration

I have a service I'm trying to write an upstart script for and it's not going too well. At some point, I decided I needed a fresh start and removed the upstart configuration file. stop myservice rm -f /etc/init/myservice.conf initctl…
ctrlc-root
  • 181
  • 1
  • 8
5
votes
3 answers

Using Upstart to manage Unicorn w/ rbenv + bundler binstubs w/ ruby-local-exec shebang

Alright, this is melting my brain. It might have something to do with the fact that I don't understand Upstart as well as I should. Sorry in advance for the long question. I'm trying to use Upstart to manage a Rails app's Unicorn master process.…
codykrieger
  • 187
  • 1
  • 7
5
votes
1 answer

Ubuntu upstart hangs on interactive start & stop

How do I get Ubuntu upstart to not hang on interactive start & stop? I have created many upstart scripts that work fine during init, but often hang when I enter them at the console. If I CTRL+C out, all that happens is that the job changes state.…
danorton
  • 695
  • 1
  • 8
  • 25
5
votes
3 answers

How can I receive an email when an upstart monitored script respawns?

My upstart config looks something like this start on filesystem stop on runlevel S respawn exec /path/to/my/script When this script dies and is respawned I would like to receive an email. Is this possible, or am I using the wrong tool for the…
mloughran
  • 151
  • 3
5
votes
1 answer

Upstart vs Supervisord to manage WSGI processes

Thoughts? I'm running Ubuntu 10.0.4
Dick Brouwer
  • 151
  • 3
5
votes
1 answer

sleep in upstart script (upstart synchronism)

I've written this code to automatically start KVM Virtual Machine at boot of host system, and stop Virtual Machine at shutdown or reboot of host system. start on startup start on started networking and started qemu-kvm and started libvirt-bin stop…
francesco
  • 51
  • 1
  • 2
4
votes
1 answer

Should I rather explicitly run programs in foreground (instead as a daemon), or `expect fork` when configuring upstart daemons?

Many programs allow to be run either in daemon mode (which is usually the default), or explicitly run it in foreground with a flag such as -f. Now when configuring upstart to run programs like this, I can either do exec foo -f # run in…
Jakub Arnold
  • 1,674
  • 10
  • 25
  • 33
4
votes
2 answers

ec2 upstart, what is the `start on` command to wait for network

This is my first time with upstart and am using EC2. os/upstart = aws base AMI latest version - upstart-0.6.5-13.3.13.amzn1.x86_64 I can not get the following script to launch when waiting for the network to initiate. It will work if using standard …
art vanderlay
  • 171
  • 1
  • 3
4
votes
1 answer

How to prevent a service from starting until a volume is mounted?

Using Ubuntu 12.04 or 14.04, how can I prevent an upstart service from starting until a couple of network volumes (GlusterFS) get successfully mounted?
Pablo
  • 7,249
  • 25
  • 68
  • 83
1 2
3
18 19