Comment 44 for bug 94065

Revision history for this message
Clint Byrum (clint-fewbar) wrote : Re: [Bug 94065] Re: init: add non-destructive means to disable a job

Excerpts from pdf's message of Mon Apr 04 12:56:26 UTC 2011:
> Nominating for SRU:
>
> The moving of core system daemons (ie - mysql, libvirt-bin, etc) to
> Upstart without the means for non-destructive disabling impairs the
> ability to use those services on servers, particularly in clustered
> environments. This is a regression.
>
> The addition of the 'manual' stanza, and .override files in
> upstart-0.9.4-1ubuntu1 resolves this problem.
>
> A minimal patch will need to be extracted from the other changes
> introduced in 0.9.4-1ubuntu1, will extract upon approval from SRU team.
>
> TEST CASE: Attempt to disable service managed by upstart, whilst
> maintaining the ability to actually start the service manually. This is
> impossible. As a sample use case, without the ability to move clustered
> services under cluster control, concurrent service starting will destroy
> shared data on non-cluster-aware filesystems.
>
> The patch would add additional functionality with minimal impact, there
> should be no regression for existing users.

I'm not totally against this for SRU, but I would like to make sure we are
sure that it is entirely necessary before going forward.

First, I would like to refute the statement that it is "impossible".

This can be achieved on a script-specific level with just sed:

sed -i.bak -e 's/^start on/#start on/;s/^\s*and/# and/;' /etc/init/mysql.conf

This is not destructive, the original file is preserved, though it is
definitely a hack to get around the missing functionality in version
0.6.5 of upstart.

It is not 100% reliable, as users may have customized the start on
conditions, but that can also be detected and dealt with. Furthermore, the
format of the upstart job is stable enough that one could write a script
to parse the full start on and disable the lines that way.

Meanwhile, cherry picking features like this into such a critical piece
of system infrastructure like init should not be done lightly.

>
>
> Please let me know if I'm required to extract the patch and produce the candidate package.
>

I've added tasks for Maverick and Lucid. This does not mean it will be
accepted, but provides a means to specify what the state in those releases
is. In all liklihood we may decide not to fix it in lucid and/or maverick