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
1
vote
1 answer

RHEL6 Upstart: Flow of Events During Reboot

I have a situation where a RHEL 6.4 server is sending TERM and KILL signals too quickly, before applications and databases have had a chance to gracefully stop. It seems that Upstart is handing control to the sysv-rc scripts prematurely. To…
skohrs
  • 1,520
  • 11
  • 23
1
vote
1 answer

upstart: starting a service as soon as ipv4 is ready

I have a service (small http service that listens on 0.0.0.0:8080) written in python that starts at system boot. The problem is that sometimes at server boot it starts too soon, when even IPv4 is not yet initialized (?) by kernel. Serivce failes…
thor
  • 658
  • 1
  • 7
  • 18
1
vote
0 answers

Upstart - make "reload" behave like "restart"

I have a daemon process that doesn't respond to SIGHUP sent when running reload. It runs under an unprivileged user, and I can't restart it without sudo privileges. Is there a way to make reload to behave the same as restart, by changing the task…
yprez
  • 183
  • 1
  • 10
1
vote
1 answer

Writing an upstart file which allows the user to input username and password

I'm trying to write an upstart file for OpenConnect. The task is pretty simple, but I'm stuck because I don't want to provide the username and password in a config file, but prompt the user to provide them each time. The upstart file, placed in…
Robert Munteanu
  • 1,644
  • 5
  • 23
  • 41
1
vote
1 answer

Starting command on boot with correct user env vars

I am attempting to create a start-up script that will run this command on boot for my ubuntu 12.04 server: bundle exec thin -R config.ru start -p 3030 When I run it as a regular user it works just fine, the thin web server starts and I can access my…
joshmmo
  • 113
  • 6
1
vote
0 answers

Make sure an upstart job is stopped after /etc/init.d/nginx during shutdown

I have an upstart job X that control some web processes. During shutdown, I want to make sure that X is stopped after /etc/init.d/nginx, so that there won't be any 502 returned to the HAProxy instance fronting this server. HAProxy does health check…
sayap
  • 164
  • 6
1
vote
0 answers

Upstart shows non-existent process running

I am using upstart 1.8-0ubuntu1 on Ubuntu-1210-quantal-64-minimal. It shows me nginx to be running, when it's not. # service nginx status nginx start/running, process 2543 # ps -p 2543 PID TTY TIME CMD My config: # nginx description…
Samat
  • 149
  • 2
1
vote
0 answers

Upstart task to wait for iscsi target to become available?

I've got a couple of virtualization servers running Ubuntu 12.04 and Virtualbox and just bought a Synology NAS which I plan to use as an iSCSI target to serve storage for the VMs. I realize that enterprise installations with backup generators and…
Steve Prior
  • 111
  • 1
1
vote
0 answers

Does my deploy user need to belong to the sudoer list for Upstart to start GUnicorn?

Does my deploy user need to belong to the sudoer list for Upstart to start GUnicorn? Here is the error from my Upstart log deploy is not in the sudoers file. This incident will be reported. It works fine if I do not specify the setuid and setgid.…
indi
  • 181
  • 5
1
vote
1 answer

Solaris SMF to Upstart on RHEL6

I am planning a migration from Solaris/x86 to RHEL6. Part of this migration will be migrating services from SMF to the RHEL6 equivalent, which appears to be upstart. While init.d scripts still seem to be supported, I want to take advantage of a more…
aaa90210
  • 351
  • 6
  • 15
1
vote
1 answer

Upstart job to start, stop and restart other jobs

I have around between 3 and 8 upstart jobs in various Ubuntu boxes that I wish to easily start, stop or restart all together. It seems that upstart would make it easy to do that, but I'm not sure how. Should I use dependencies to make a single dummy…
Pablo Fernandez
  • 7,438
  • 25
  • 71
  • 83
1
vote
1 answer

Proper upstart config for meteor?

I'm hoping to find out how to tell upstart that meteor will fork more than twice? I followed their instructions at http://upstart.ubuntu.com/cookbook/#how-to-establish-fork-count to count the forks and it reports 21 times. This is kind of a non…
Mike Graf
  • 407
  • 1
  • 4
  • 14
1
vote
1 answer

Updating Upstart on Centos 6.3

I have a Centos 6.3 server -- alone among all my Ubuntu servers for historical reasons -- with Upstart 0.6.5. I need to update that upstart to at least 1.4, and I'd prefer to do it through yum instead of hand compiling it. Is a there a yum repo with…
Daniel C. Sobral
  • 5,713
  • 6
  • 34
  • 48
1
vote
2 answers

Autossh error with upstart script: ssh exited prematurely with status 0

I have set up the following upstart script: # autossh description "autossh connections" start on started dbus stop on (runlevel [06] or stopped dbus) respawn respawn limit 5 60 # respawn max 5 times in 60 seconds script export…
Peleke
  • 131
  • 1
  • 4
1
vote
1 answer

Ubuntu Upstart Job to Persist tcp_slot_table_entries Before NFS Mount

NOTE: I'm aware of the question Persistent changes to /proc/sys/sunrpc/tcp_slot_table_entries and while this older question is quite similar, the selected and proposed answers do not work for us, nor do they speak specifically to Upstart. We need a…
bubba
  • 111
  • 2