[Bug 834769] Re: upstart doesn't run "pre-start script"
Steve Langasek
steve.langasek at canonical.com
Thu Sep 29 18:47:58 UTC 2011
> the "pre-start script" is not running at all. The file will never be
created.
On the contrary, the pre-start script will run. But 'mounted' is an
event that is emitted once for *each* filesystem that is mounted, and
the root filesystem is *not* the first filesystem to trigger this event
- the virtual filesystems are mounted first, then fsck is run for the
rootfs, then the rootfs is remounted read-write.
So the job you show here will trigger, immediately try to write to /etc,
and fail - which is probably long enough on your system for the rest of
the filesystems to come up, so no further jobs will be started because
there's already one instance of the job in progress.
See the mounted(7), upstart-events(7) manpages for more information
about the mounted event. You probably need to change your job to use
either 'start on mounted MOUNTPOINT=/' or 'start on filesystem'.
Closing this bug as invalid; since the pre-start scripts in Ubuntu are
all working reliably, and your job has a definite race condition in it,
there's no evidence of an upstart bug here.
** Changed in: upstart (Ubuntu)
Status: New => Invalid
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to upstart in Ubuntu.
https://bugs.launchpad.net/bugs/834769
Title:
upstart doesn't run "pre-start script"
Status in “upstart” package in Ubuntu:
Invalid
Bug description:
Upstart does not run "pre-start script" under some circumstances.
Assume following startup script:
# Create a new file if it doesn't exist.
description "Create new, empty file if it does not exist"
start on mounted
pre-start script
/usr/bin/touch /etc/empty.file
end script
exec /bin/sleep 1
the "pre-start script" is not running at all. The file will never be
created.
ProblemType: Bug
DistroRelease: Ubuntu 11.04
Package: upstart 0.9.7-1
Uname: Linux 3.0.3 x86_64
Architecture: amd64
Date: Fri Aug 26 16:30:17 2011
ProcEnviron:
LANGUAGE=de_DE:en
PATH=(custom, user)
LANG=de_DE.UTF-8
SHELL=/bin/bash
SourcePackage: upstart
UpgradeStatus: Upgraded to natty on 2011-08-02 (24 days ago)
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/upstart/+bug/834769/+subscriptions
More information about the foundations-bugs
mailing list