[Bug 985755] Re: /lib/init/upstart-job does not handle lucid->precise upgrade scenario
James Hunt
985755 at bugs.launchpad.net
Tue Apr 24 15:53:57 UTC 2012
= Impact =
If this fix is not applied to Precise, users upgrading from lucid will
see errors relating to bug 984474 ("initctl crashed with SIGABRT in
nih_error_clear()") as the installer proceeds to upgrade packages
containing Upstart services. These services will not be restarted as
they should be once the new package version is installed. However, the
services will be restarted on reboot.
Users on Oneiric should not experience this issue (since 'initctl show-
config' is available on oneiric).
= Development Fix =
The bug has been addressed by modifying /lib/init/upstart-job to only
consider a service disabled if both of the following are true:
1) The version of Upstart currently running supports querying of a jobs
'start on' condition (via the 'initctl show-config' command).
2) Upstart reports that no 'start on' condition exists for the job.
Links to the script /lib/init/upstart-job are installed in /etc/init.d/
such that administrators are able to manipulate Upstart jobs as if they
were SystemV services (using for example "/etc/init.d/foo restart" or
even "service restart").
= Stable Fix =
A patch to /lib/init/upstart-job is attached.
Note that this patch also includes a fix to correct restart handling in
lucid: it now stops and then starts the Upstart job rather than just
calling "restart" which does *not* reload the job configuration.
= Test Case =
To observe the bug on a lucid system:
1) Check that your Upstart jobs are running (a good example is 'cron'):
('/etc/init.d/cron' status, or 'status cron')
2) Upgrade lucid to precise using update-manager(8) or do-release-upgrade(8).
3) Observe errors relating to the initctl(8) command either on-screen or in the installer logs under /var/log/installer/.
4) After the upgrade has completed, observe that your services are no longer running
('/etc/init.d/cron' status, or 'status cron').
To be convinced the bug is fixed on a lucid system, a new version of
/lib/init/upstart-job is required. Once installed:
1) Check that your Upstart jobs are running (a good example is 'cron'):
('/etc/init.d/cron' status, or 'status cron')
2) Upgrade lucid to precise using update-manager(8) or do-release-upgrade(8).
3) There should be no errors relating to the initctl(8) command either on-screen or in the installer logs under /var/log/installer/.
4) After the upgrade has completed, observe that your services are still running as expected
('/etc/init.d/cron' status, or 'status cron').
= Regression Potential =
No regression potential.
** Patch added: "patch to /lib/init/upstart-job for a lucid system to bring it up-to-date with the precise version."
https://bugs.launchpad.net/ubuntu/+source/upstart/+bug/985755/+attachment/3102092/+files/upstart-job.patch
--
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/985755
Title:
/lib/init/upstart-job does not handle lucid->precise upgrade scenario
Status in “upstart” package in Ubuntu:
In Progress
Bug description:
/lib/init/upstart-job was recently changed (bug 974147) such that it
now calls 'initctl show-config -e $JOB'. This works fine for precise
systems and for oneiric->precise upgrades, but does not work for
lucid->precise upgrades since 'show-config' is not a legitimate
initctl command on the version of init running on lucid at the time of
the precise upgrade (0.6.5-8) since the 'show-config' command was
added in Upstart 1.3.
/lib/init/upstart-job needs to be changed to handle the lucid upgrade
path scenario by either checking the running version of init or more
intelligently parsing the output of 'initctl show-config -e $JOB'
since currently, an upgrade from lucid to precise will cause all
upgraded packages containing upstart jobs to *not* restart the
services.
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/upstart/+bug/985755/+subscriptions
More information about the foundations-bugs
mailing list