Scripts need to be migrated from /etc/event.d to /etc/init

Bug #402759 reported by noah
36
This bug affects 6 people
Affects Status Importance Assigned to Milestone
Release Notes for Ubuntu
Fix Released
Medium
Unassigned
upstart (Ubuntu)
Won't Fix
Medium
Scott James Remnant (Canonical)
Karmic
Won't Fix
Medium
Scott James Remnant (Canonical)

Bug Description

Binary package hint: upstart

I've got a system that was initially installed with Ubuntu Hardy.
During May or June it was upgraded to Ubuntu Karmic.

It's running with the console on ttyS0 which is a serial interface.
The kernel is booted with 'console=ttyS0,57600n8' on the command line and then I had a getty to start listening on /dev/ttyS0 by creating a /etc/event.d/ttyS0 file.

During an upgrade (apt-get dist-upgrade) somewhere in early July the getty is no longer started on /dev/ttyS0.

This is what things used to look like in /etc/event.d/
root@ubuntu:/etc/event.d# grep /getty tty*
tty1:exec /sbin/getty -8 38400 tty1
tty2:exec /sbin/getty -8 38400 tty2
tty3:exec /sbin/getty -8 38400 tty3
tty4:exec /sbin/getty -8 38400 tty4
tty5:exec /sbin/getty -8 38400 tty5
tty6:exec /sbin/getty -8 38400 tty6
ttyS0:exec /sbin/getty -L ttyS0 57600 vt102

Now, after the upgrade in early July it seems as if the file in /etc/event.d are no longer used.
The getty for ttyS0 is no longer started.

Instead the files responsible for launching gettys are located in /etc/init.

After "porting" the old /etc/event.d/ttyS0 file to the new format used by the upstart package and placing it in /etc/init as ttyS0.conf I got getty back on /dev/ttyS0.

I'm not entirely sure what happened but it seems as if my installation, after the dist-upgrade in early July, stopped using stuff from the package system-services and instead started using files from the package upstart.

Whatever happened in my case, when /etc/event.d stopped being used, should have been handled better.
Just imagine an upgrade on a co-located machine (which migt not be easily accessible) which will result in an administrators no longer being able to login on the serial console.

Here's output from dpkg that shows what package owns which files, using the launch file for tty1 as an example:
# dpkg -S /etc/event.d/tty1 /etc/init/tty1.conf
system-services: /etc/event.d/tty1
upstart: /etc/init/tty1.conf

For what it's worth:
# dpkg -l|egrep 'system-services|upstart|console'
ii console-setup 1.34ubuntu1 console font and keymap setup program
ii console-terminus 4.28-1 Fixed-width fonts for fast reading on the Li
ii consolekit 0.3.0-2ubuntu7 framework for defining and tracking users, s
ii kbd 1.15-1ubuntu1 Linux console font and keytable utilities
rc system-services 0.3.10-2 definitions of essential system services
ii upstart 0.6.1-1 event-based init daemon
rc upstart-compat-sysv 0.3.10-2 compatibility for System-V-like init
rc upstart-logd 0.3.10-2 boot logging daemon

# lsb_release -rd
Description: Ubuntu karmic (development branch)
Release: 9.10

description: updated
Revision history for this message
noah (noah1-deactivatedaccount) wrote :

If something regarding /etc/event.d has changed in Ubuntu Karmic I suppose the instructions for running Ubuntu with a serial console should be updated on https://help.ubuntu.com/community/SerialConsoleHowto to reflect the new behavior.

Revision history for this message
Scott James Remnant (Canonical) (canonical-scott) wrote : Re: [Bug 402759] [NEW] Karmic update broke serial console on ttyS0 (related to system-services vs upstart?)

 status triaged
 importance medium
 milestone alpha-4

On Tue, 2009-07-21 at 22:23 +0000, noah wrote:

> Whatever happened in my case, when /etc/event.d stopped being used,
> should have been handled better.
>
It will be.

Remember that you're running a development distribution and not a final
release yet.

The migration scripts to deal with moving things from /etc/event.d
to /etc/init haven't been written yet - this is why things
in /etc/event.d have deliberately not been deleted yet.

Scott
--
Scott James Remnant
<email address hidden>

summary: - Karmic update broke serial console on ttyS0 (related to system-services
- vs upstart?)
+ Scripts need to be migrated from /etc/event.d to /etc/init
Changed in upstart (Ubuntu):
assignee: nobody → Scott James Remnant (scott)
milestone: none → karmic-alpha-4
Changed in upstart (Ubuntu):
milestone: karmic-alpha-4 → ubuntu-9.10
Revision history for this message
Michael Lazarev (milaz) wrote :

Sorry, I'm not sure where to report this to, I'd also notice that consoles do not work with cleanly made live USB from Karmic Beta image. And being manually fixed, are broken again with partial upgrade.

I described the problem and the solution in my comment to bug 438678.

Revision history for this message
Jamie Kitson (jamie-kitson) wrote :

Scott James Remnant wrote on 2009-07-21:

> > Whatever happened in my case, when /etc/event.d stopped being used,
> > should have been handled better.
> >
> It will be.

Has that been done yet? I guess not. I ran into this problem too, my /etc/event.d/tty1 script was not migrated.

Revision history for this message
Steve Langasek (vorlon) wrote :

Too fiddly to do this without a safety net between RC and final, and not worth doing as an SRU; dropping the karmic target.

Changed in upstart (Ubuntu Karmic):
status: Triaged → Won't Fix
Revision history for this message
Scott James Remnant (Canonical) (canonical-scott) wrote :

It proves difficult to figure out what the user intended to change, so we're going to Release Note this issue with a migration guide wiki page that I'm currently writing

affects: upstart → ubuntu-release-notes
Changed in ubuntu-release-notes:
assignee: nobody → Scott James Remnant (scott)
Changed in upstart (Ubuntu):
status: Triaged → Won't Fix
Changed in ubuntu-release-notes:
status: New → In Progress
Revision history for this message
Michael Lazarev (milaz) wrote : Re: [Bug 402759] Re: Scripts need to be migrated from /etc/event.d to /etc/init

I checked 9.10 RC, consoles are back. So, the part of the problem I
was concerned with is resolved.

Revision history for this message
Steve Langasek (vorlon) wrote :

Hi Scott,

What's the status of the mgration guide wiki page you mentioned?

Also, is it intentional that this is marked "wontfix" for Ubuntu generally? An automigration script in lucid would still be useful for LTS->LTS upgrades.

Changed in ubuntu-release-notes:
importance: Undecided → Medium
Revision history for this message
Scott James Remnant (Canonical) (canonical-scott) wrote : Re: [Bug 402759] Re: Scripts need to be migrated from /etc/event.d to /etc/init

On Wed, 2009-10-28 at 13:12 +0000, Steve Langasek wrote:

> What's the status of the mgration guide wiki page you mentioned?
>
Pending, I may have time to write it tomorrow.

> Also, is it intentional that this is marked "wontfix" for Ubuntu
> generally? An automigration script in lucid would still be useful for
> LTS->LTS upgrades.
>
No, because I can't figure out how to do it - and it'll get "not done"
for lynx.

Scott
--
Scott James Remnant
<email address hidden>

Revision history for this message
Steve Langasek (vorlon) wrote :

Preliminary note included at <https://wiki.ubuntu.com/KarmicKoala/ReleaseNotes#/etc/event.d%20no%20longer%20used>:

The version of upstart included in Ubuntu 9.10 no longer uses the configuration files in the /etc/event.d directory, looking to /etc/init instead. No automatic migration of changes to /etc/event.d is possible. If you have modified any settings in this directory, you will need to reapply them to /etc/init in the new configuration format by hand. (402759)

Once a transition wiki page is available, we can link that here as well.

Revision history for this message
Dmitri (dmitri-internode) wrote :

It is nice to have that preliminary note - but it would be even better if it contained some reference to "the new configuration format ". So far my search gave me https://wiki.ubuntu.com/FoundationsTeam/Specs/KarmicUpstartPackagingPolicy as the closest to documentation (it even references some standard - but the link is dead). Anything else is outdated.
How exactly it was envisioned that users will upgrade their servers which stopped starting, I wonder :(

Changed in ubuntu-release-notes:
assignee: Scott James Remnant (scott) → nobody
Revision history for this message
Dooitze de Jong (dooitze) wrote :

Why don't you fix this?

Revision history for this message
Scott James Remnant (Canonical) (canonical-scott) wrote :

Answer is above; we couldn't figure out *how* to - so release noted it instead

Revision history for this message
Dooitze de Jong (dooitze) wrote :

With a commandline script

Revision history for this message
paul fox (pgf-launchpad) wrote :

echoing comment #11: where are the differences between the "new" and "old" formats documented?

Revision history for this message
Alberto (apedraza) wrote :

So, can I just copy my event.d scripts to the new init directory?

Revision history for this message
mb0 (mb0) wrote :

it seems all you need to do is to append a .conf file extension.
mv /etc/event.d/yourscript /etc/init/yourscript.conf

Revision history for this message
camden lindsay (camden-lindsay+launchpad) wrote :

I, too am looking for documentation on .conf file format. Particularly, i want a service to never start automatically... but to stay installed. What is the most appropriate way of doing this? Remove/comment all 'start on' lines?

Revision history for this message
Robbie Williamson (robbiew) wrote :

Release noted again for 10.10.

Changed in ubuntu-release-notes:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.