← Back to team overview

aims team mailing list archive

[Bug 1273462] [NEW] Users can mistakenly run init.d scripts and cause problems if an equivalent upstart job already exists

 

You have been subscribed to a public bug by Jan Groenewald (jan-aims):

[ impact ]

Previously, init.d scripts that were replaced by upstart jobs had
"upstart-job" symlink as a redirect in-place, which directed users at
using upstart commands. Despite the good intentions, that never actually
taught people about the correct interfaces. Now with the advent of co-
installability of multiple init systems, users may have systemd,
upstart, and sysv-init all installed on users system and have init.d
scripts / upstart jobs / systemd units all available. To avoid any
daubt, we should support executing /etc/init.d/ scripts which may call
into upstart, or into systemd, or actually execute the script in
question depending on whether there is native configuration for that
particular job and which init system we are running under.

[ test case ]

Invoking init.d script should invoke upstart commands, for example:

$ /etc/init.d/ssh status
ssh start/running, process 4620
$ /etc/init.d/ssh stop
stop: Rejected send message, 1 matched rules; type="method_call", sender=":1.2469694" (uid=1000 pid=3908 comm="stop ssh ") interface="com.ubuntu.Upstart0_6.Job" member="Stop" error name="(unset)" requested_reply="0" destination="com.ubuntu.Upstart" (uid=0 pid=1 comm="/sbin/init")
$ sudo /etc/init.d/ssh stop
ssh stop/waiting
$ sudo /etc/init.d/ssh start
ssh start/running, process 5373
$ sudo /etc/init.d/ssh restart
ssh stop/waiting
ssh start/running, process 5405


Description:    Ubuntu 13.10
Release:        13.10

mysql-server-5.5:
  Installed: 5.5.35-0ubuntu0.13.10.1
  Candidate: 5.5.35-0ubuntu0.13.10.1
  Version table:
 *** 5.5.35-0ubuntu0.13.10.1 0
        500 http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ saucy-updates/main amd64 Packages
        500 http://security.ubuntu.com/ubuntu/ saucy-security/main amd64 Packages
        100 /var/lib/dpkg/status
     5.5.32-0ubuntu7 0
        500 http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ saucy/main amd64 Packages

In Ubuntu 13.10, the Upstart job and the init.d script do not work
properly.  In previous versions, the init.d script was a symlink to the
wrapper script around upstart (/lib/init/upstart-job).  This conflict
means that if the server was started using the init.d script, upstart
does not recognize that the server is running and will attempt to start
a second instance of mysqld.

Also problematic is that if the upstart job is started using the service
or start commands, the init.d script's "stop" function runs a mysql
shutdown, but upstart simply restarts mysqld (because it's marked
respawn in the upstart config).

** Affects: lsb (Ubuntu)
     Importance: Undecided
         Status: Fix Released

** Affects: mysql-5.5 (Ubuntu)
     Importance: Medium
         Status: Invalid

** Affects: upstart (Ubuntu)
     Importance: Critical
     Assignee: Dimitri John Ledkov (xnox)
         Status: Fix Released

** Affects: lsb (Ubuntu Trusty)
     Importance: High
     Assignee: Dimitri John Ledkov (xnox)
         Status: Confirmed

** Affects: mysql-5.5 (Ubuntu Trusty)
     Importance: Undecided
         Status: Invalid

** Affects: upstart (Ubuntu Trusty)
     Importance: High
     Assignee: Dimitri John Ledkov (xnox)
         Status: Won't Fix

** Affects: lsb (Ubuntu Utopic)
     Importance: Undecided
         Status: Fix Released

** Affects: mysql-5.5 (Ubuntu Utopic)
     Importance: Medium
         Status: Invalid

** Affects: upstart (Ubuntu Utopic)
     Importance: Critical
     Assignee: Dimitri John Ledkov (xnox)
         Status: Fix Released

** Affects: upstart (Debian)
     Importance: Unknown
         Status: New


** Tags: init scripts upstart
-- 
Users can mistakenly run init.d scripts and cause problems if an equivalent upstart job already exists
https://bugs.launchpad.net/bugs/1273462
You received this bug notification because you are a member of AIMS, which is subscribed to the bug report.