runsvdir does not use upstart

Bug #74135 reported by Andrew Burrow
140
This bug affects 1 person
Affects Status Importance Assigned to Milestone
git-core (Ubuntu)
Invalid
Undecided
Unassigned
runit (Ubuntu)
Fix Released
Medium
Luca Falavigna

Bug Description

runsvdir does not use upstart. This causes the following two issues:
Doesn't start after being installed:
After installing 'runit' and 'socklog' in order to use 'bincimap', my system fails to run 'runsvdir' at boot-up. This is despite the fact that '/etc/inittab' has been rewritten to contain the stanza:

#-- runit begin
SV:123456:respawn:/usr/sbin/runsvdir-start
#-- runit end

Searching for messages in the system logs turns up nothing

ferrix:~# find /var/log -type f -exec grep -l -e 'runit\|runsvdir' {} \;
/var/log/auth.log
/var/log/dpkg.log.1
/var/log/popularity-contest.0
/var/log/popularity-contest
/var/log/auth.log.0

Searching for the process

ferrix:~# ps ax | grep runsvdir

also reveals nothing

However, executing 'runsvdir-start' by hand brings the subsystem up without error

Cannot be installed:
cp: cannot stat `/etc/inittab': No such file or directory
dpkg: error processing runit (--configure):
 subprocess post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of ebox:
 ebox depends on runit; however:
  Package runit is not configured yet.
dpkg: error processing ebox (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 runit
 ebox
E: Sub-process /usr/bin/dpkg returned an error code (1)

Related branches

Revision history for this message
Matthew Gregan (kinetik) wrote :

I'm seeing this too. Presumably this is because the runit package doesn't handle being installed alongside upstart yet.

For now, I've just added the following to /etc/event.d/runsvdir:

start on startup
stop on shutdown

respawn /usr/sbin/runsvdir-start

Revision history for this message
Corey Burger (corey.burger) wrote :

Doesn't install in Feisty unless you run:
sudo touch /etc/inittab

description: updated
Changed in runit:
status: Unconfirmed → Confirmed
Changed in runit:
importance: Undecided → Medium
Revision history for this message
PaulSchulz (paulschulz) wrote :

This is a problem when trying to install 'git-daemon-run' which depends on the 'runit' package.

'sudo touch /etc/inittab' allows 'git-daemon-run' to be installed.

Revision history for this message
Adam Jacob (adamhjk) wrote :

On newer versions of Ubuntu (fiesty and gutsy) you need a slightly different /etc/event.d/runsvdir:

start on runlevel 2
start on runlevel 3
start on runlevel 4
start on runlevel 5
stop on shutdown
respawn
exec /usr/sbin/runsvdir-start

Revision history for this message
Chris Moore (dooglus) wrote :

I can't install runit, and can't uninstall it either:

After unpacking 487kB of additional disk space will be used.
Selecting previously deselected package runit.
(Reading database ... 215100 files and directories currently installed.)
Unpacking runit (from .../runit_1.6.0-1_i386.deb) ...
Setting up runit (1.6.0-1) ...
grep: /etc/inittab: No such file or directory
grep: /etc/inittab: No such file or directory
Adding SV inittab entry...
cp: cannot stat `/etc/inittab': No such file or directory
dpkg: error processing runit (--configure):
 subprocess post-installation script returned error exit status 1
Errors were encountered while processing:
 runit
E: Sub-process /usr/bin/dpkg returned an error code (1)

chris@trpaslik:~$ sudo apt-get remove runit
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
  runit
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
1 not fully installed or removed.
Need to get 0B of archives.
After unpacking 487kB disk space will be freed.
Do you want to continue [Y/n]? y
(Reading database ... 215155 files and directories currently installed.)
Removing runit ...
grep: /etc/inittab: No such file or directory
chris@trpaslik:~$

Revision history for this message
Sven Herzberg (herzi) wrote :

So, this bug is:
* now officially more than one year old
* still appears in gutsy
* makes git-daemon-run still useless in default installations
* has a proper solution described in the report
* and is still not fixed

guys, please provide packages with the proper /etc/events.d/runit file as described by Adam Jakob in https://bugs.launchpad.net/ubuntu/+source/runit/+bug/74135/comments/4

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package runit - 1.8.0-1ubuntu1

---------------
runit (1.8.0-1ubuntu1) hardy; urgency=low

  * We no longer have /etc/inittab, so do not execute anything if it is
    not available on the system (LP: #74135).
  * Provide runsvdir.upstart to execute runit successfully with upstart,
    thanks to Adam Jacob for the suggestion.
  * Update Maintainer field as per spec

 -- Luca Falavigna <email address hidden> Sat, 22 Dec 2007 14:44:41 +0100

Changed in runit:
status: Confirmed → Fix Released
Revision history for this message
Hendy Irawan (ceefour) wrote :

Confirmed, installing git-daemon-run on Ubuntu JeOS Gutsy failed.

The 'touch' technique works.

Can the fix be applied to Gutsy too, Luca? Please?

Thank you.

Revision history for this message
Luca Falavigna (dktrkranz) wrote :

Since runit is uninstallable in previous versions, it could be possible to prepare an update for them. I need to discuss this issue with motu-sru. In the meantime, if someone could test Hardy package and provide a positive feedback, it will be of great help.

Changed in runit:
assignee: nobody → dktrkranz
Revision history for this message
ward (ward-pong) wrote :

I hope you have also removed /etc/init.d/runit? Otherwise runsvdir is going to be started twice upon reboot...

Revision history for this message
Lucian Adrian Grijincu (lucian.grijincu) wrote :

this is still present in hardy.

Revision history for this message
Gabriel de Perthuis (g2p) wrote :

Here is a patch to the debian package that starts the runit supervisor after install.

All these packages install stuff in /etc/event.d, maybe some like ebox have similar needs:
upstart system-services ume-config-samsung-q1-ultra runit upstart-compat-sysv ume-config-crown-beach upstart-logd ebox-ntp ebox-samba ebox-dhcp ebox-squid ebox-printers ebox-dns ebox

Revision history for this message
Gabriel de Perthuis (g2p) wrote :

Re-opening since part of the problem was not solved. There is a patch though.

Changed in runit:
status: Fix Released → In Progress
Changed in git-core:
status: New → Invalid
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package runit - 2.0.0-1ubuntu1

---------------
runit (2.0.0-1ubuntu1) intrepid; urgency=low

  * Merge from Debian unstable (LP: #241656). Remaining Ubuntu changes:
    - debian/rules: provide runsvdir.upstart
    - debian/rules: don't compile against dietlibc on sparc and powerpc to
      avoid FTBFS
    - debian/rules: do not strip if architecture is amd64, fix FTBFS
    - don't execute anything if /etc/inittab is not available on the system
  * Start the runit supervisor after install (LP: #74135), thanks to Gabriel de
    Perthuis for the patch.
  * runit.prerm: stop the runit supervisor.

runit (2.0.0-1) unstable; urgency=low

  * new upstream release.
  * debian/control: Standards-Version: 3.8.0.1.
  * debian/update-service: symlink to service-directory might end with
    a slash (closes: #475512).

 -- Devid Filoni <email address hidden> Wed, 18 Jun 2008 23:33:13 +0200

Changed in runit:
status: In Progress → Fix Released
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.