Bug 509113 - upstart should require files in /etc/event.d/ to have a .event extension
Summary: upstart should require files in /etc/event.d/ to have a .event extension
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Fedora
Classification: Fedora
Component: upstart
Version: 11
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Casey Dahlin
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-07-01 12:52 UTC by Jón Fairbairn
Modified: 2014-06-18 08:46 UTC (History)
4 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2009-07-01 13:56:43 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Jón Fairbairn 2009-07-01 12:52:02 UTC
Description of problem:

If someone patches a file in /etc/event.d/ (say foo), a backup file
(foo.orig) is created in the event.d directory. This causes
undesirable and confusing behaviour.

Version-Release number of selected component (if applicable):
upstart-0.3.9-24.fc11.x86_64

How reproducible:
Completely

Steps to Reproduce:
1. patch a file $f in /etc/event.d
2. reboot
3. initctl list | egrep $f
  
Actual results:
 shows two versions of the event, one called $f.orig

Expected results:
 should only show $f

Additional info:

What happened to me was that I wanted to make the same change to the
serial event, as I had on previous versions of Fedora. I keep such
things under version control, so I generated a patch from the old
system and applied it to the new.

The result was multiple agettys running on /dev/ttyS0, which made the
console unusable. Having detected that there was a problem (though not
knowing what it was) I edited /etc/event.d/serial to try something,
which also left serial~ in the directory. I'm not sure whether that
also produced an agetty (after a reboot there were three running. The
reboot was needed because I triggered the serial console available
event to test the change and this resulted in a daemon storm).

Question: what happens if someone edits an event.d file (taking care
to remove any backup copy) and later updates the rpm that owns the
file? If rpm renames the old to $f.rpmsave or renames the new to
$f.rpmnew, wouldn't that cause problems?

While one might argue that system administrators should be careful
about leaving backup files in /etc/event.d, it would seem preferable
to use the convention followed by various other subsystems and have
upstart only read /etc/event.d/*.event

Comment 1 Casey Dahlin 2009-07-01 13:38:44 UTC
1.0 plans on adding a .conf extension to job files, but til then upstream isn't going to take this, and the configuration conventions are unstable enough already in Upstart as a project without us carrying our own quirks.

Most common tempfile names (such as .rpmsave) are ignored already. If I can be convinced that running patch in /etc is a good idea I can probably be convinced that ignoring .orig files is too.

Comment 2 Casey Dahlin 2009-07-01 13:56:43 UTC
Closing as upstream for now.

Comment 3 Jón Fairbairn 2009-07-01 16:59:04 UTC
1.0 adding .conf is encouraging. Any idea of timescale (I had a quick look at <http://upstart.ubuntu.com/> but didn't find anything)?

I'm not sure what would be a convincing argument for ignoring .orig -- I ran patch because it seemed like a reasonable way of making the change I wanted, and there wasn't anything saying "Danger: mines".

Comment 4 Petr Lautrbach 2009-07-22 11:10:55 UTC
Upstream released upstart-0.6.0 version with jobs located in /etc/init and named with .conf suffix.

We're in the process of proposing this as a feature for F12 - https://fedoraproject.org/wiki/Features/Upstart0.6.0


Note You need to log in before you can comment on or make changes to this bug.