FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian Development

 
 
LinkBack Thread Tools
 
Old 07-03-2008, 08:40 PM
Raphael Hertzog
 
Default Bug#426877: dpkg: Option "--oknodo" should be the default behaviour for "start-stop-daemon" (LSB specs)

(Cc -devel to seek input)

On Thu, 31 May 2007, I˝aki Baz Castillo wrote:
> Acording to the LSB specifications for init scripts [1]:
>
> "For all other init-script actions, the init script shall return an exit
> status of zero if the action was successful. Otherwise, the exit status
> shall be non-zero, as defined below. In addition to straightforward
> success, the following situations are also to be considered successful:
> - Restarting a service (instead of reloading it) with the force-reload
> argument
> - Running start on a service already running
> - Running stop on a service already stopped or not running
> - Running restart on a service already stopped or not running
> - Running try-restart on a service already stopped or not running"
>
> So if I start a service that is already running I should receive 0, but
> "start-stop-daemon" returns 1 (error).
>
> The option "--oknodo" changes the behaviour to the LSB recomendations but many
> services in Debian don't use this option and return 1 in the case I've
> quotted. This is very problematic for me when I try to use a Debian
> service init script with HeartBeat that expects to receive a 0.

I'm reluctant to change the default behaviour of start-stop-daemon at this
point. What do other people think of making --oknodo the default behaviour
and adding a new option to force the current default behaviour (exit with
failure if nothing had to be done)?

The alternative is to change policy and/or lintian to ensure that packages
are using --oknodo unless they have a good reason not to.

> [1] LSB specifications about init script actions:
> http://www.linux-foundation.org/spec/refspecs/LSB_3.0.0/LSB-Core-generic/LSB-Core-generic/iniscrptact.html

Cheers,
--
RaphaŰl Hertzog

Le best-seller franšais mis Ó jour pour Debian Etch :
http://www.ouaza.com/livre/admin-debian/


--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 07-04-2008, 08:32 AM
Steve Langasek
 
Default Bug#426877: dpkg: Option "--oknodo" should be the default behaviour for "start-stop-daemon" (LSB specs)

On Thu, Jul 03, 2008 at 10:40:53PM +0200, Raphael Hertzog wrote:
> > The option "--oknodo" changes the behaviour to the LSB recomendations but
> > many services in Debian don't use this option and return 1 in the case
> > I've quotted. This is very problematic for me when I try to use a Debian
> > service init script with HeartBeat that expects to receive a 0.

> I'm reluctant to change the default behaviour of start-stop-daemon at this
> point. What do other people think of making --oknodo the default behaviour
> and adding a new option to force the current default behaviour (exit with
> failure if nothing had to be done)?

I think this sounds like there's no real transition plan between the two
states; anything that actually relies on the current behavior of s-s-d
without --oknodo will suddenly be broken. Changing the semantics of core
tools in this way is a bad idea.

The right answer is that we should be fixing the wrong init scripts, not
trying to coerce all the init scripts with a change in s-s-d semantics. An
init script may have a legitimate reason to want to check for the
difference between exit statuses 0 and 1, without necessarily using this
information a way that breaks the init script's own exit status, and
changing s-s-d behavior will break these legitimate use cases.

> The alternative is to change policy and/or lintian to ensure that packages
> are using --oknodo unless they have a good reason not to.

This was already discussed on debian-devel in March of this year.

http://lists.debian.org/debian-devel/2008/03/msg00772.html

Feel free to propose an amendment to policy that clarifies that "sensible"
behavior is equivalent to --oknodo (without implying that init scripts are
required to use s-s-d!), and I will happily second it; as I already
commented in that thread, I think this is a mere clarification of what the
policy has always been, not a change to policy at all.

> > [1] LSB specifications about init script actions:
> > http://www.linux-foundation.org/spec/refspecs/LSB_3.0.0/LSB-Core-generic/LSB-Core-generic/iniscrptact.html

That one's starting to get up there right next to "our priorities are our
users and free software" on my list of Facile Arguments That Demonstrate The
Poster Has No Clue. :P

--
Steve Langasek Give me a lever long enough and a Free OS
Debian Developer to set it on, and I can move the world.
Ubuntu Developer http://www.debian.org/
slangasek@ubuntu.com vorlon@debian.org


--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 07-04-2008, 08:47 AM
Steve Langasek
 
Default Bug#426877: dpkg: Option "--oknodo" should be the default behaviour for "start-stop-daemon" (LSB specs)

Right, expanding on my previous comments:

On Thu, Jul 03, 2008 at 11:02:13PM +0200, I˝aki Baz Castillo wrote:
> > The alternative is to change policy and/or lintian to ensure that packages
> > are using --oknodo unless they have a good reason not to.

> > > [1] LSB specifications about init script actions:
> > > http://www.linux-foundation.org/spec/refspecs/LSB_3.0.0/LSB-Core-generic/
> > >LSB-Core-generic/iniscrptact.html

> I think being LSB compliant is good for Debian.

The LSB init script specification *is a specification for the init scripts
of LSB packages*. It has NOTHING to do with LSB compliance of LSB
implementations. Debian is an LSB *implementation*, NOT a collection of LSB
applications. Conforming with the LSB init script specification would NOT
make Debian packages conformant LSB applications!

The LSB init script spec is a reasonable and internally consistent set of
guidelines for init scripts. It's not a bad policy; in fact, 90% of it is
word-for-word identical with the Debian init script policy. But the LSB
init script spec is *not* the Debian init script policy, and we should not
blindly seek conformance to an LSB *application* spec for its own sake.

I happen to be in favor of seeing Debian adopt at least one feature of the
LSB init script spec that we miss, which is the mandatory 'status' argument.
But this needs to be adopted as part of Debian policy itself, through our
normal procedures for such changes. Otherwise, we end up with maintainers
blindly believing that everything in the LSB init script spec is a good
idea, including things like this gem from 20.8:

Conforming scripts shall not specify the "exit on error" option (i.e. set
-e) when sourcing this file, or calling any of the commands thus made
available.

Blech.

--
Steve Langasek Give me a lever long enough and a Free OS
Debian Developer to set it on, and I can move the world.
Ubuntu Developer http://www.debian.org/
slangasek@ubuntu.com vorlon@debian.org


--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 07-04-2008, 04:50 PM
Wouter Verhelst
 
Default Bug#426877: dpkg: Option "--oknodo" should be the default behaviour for "start-stop-daemon" (LSB specs)

On Thu, Jul 03, 2008 at 11:02:13PM +0200, I˝aki Baz Castillo wrote:
> I think being LSB compliant is good for Debian.

That may be so; but changing a long-standing interface with no migration
is /not/ good for Debian.

--
<Lo-lan-do> Home is where you have to wash the dishes.
-- #debian-devel, Freenode, 2004-09-22


--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 07-04-2008, 07:12 PM
Guillem Jover
 
Default Bug#426877: dpkg: Option "--oknodo" should be the default behaviour for "start-stop-daemon" (LSB specs)

Hi,

On Fri, 2008-07-04 at 01:47:39 -0700, Steve Langasek wrote:
> > I think being LSB compliant is good for Debian.
>
> The LSB init script specification *is a specification for the init scripts
> of LSB packages*. It has NOTHING to do with LSB compliance of LSB
> implementations. Debian is an LSB *implementation*, NOT a collection of LSB
> applications. Conforming with the LSB init script specification would NOT
> make Debian packages conformant LSB applications!
>
> The LSB init script spec is a reasonable and internally consistent set of
> guidelines for init scripts. It's not a bad policy; in fact, 90% of it is
> word-for-word identical with the Debian init script policy. But the LSB
> init script spec is *not* the Debian init script policy, and we should not
> blindly seek conformance to an LSB *application* spec for its own sake.

Agreed.

> I happen to be in favor of seeing Debian adopt at least one feature of the
> LSB init script spec that we miss, which is the mandatory 'status' argument.
> But this needs to be adopted as part of Debian policy itself, through our
> normal procedures for such changes.

Yeah, this is something I've on my TODO list, most of the needed code
is already on s-s-d. Will try to get something working this weekend.

regards,
guillem


--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 07-04-2008, 08:02 PM
Vincent Danjean
 
Default Bug#426877: dpkg: Option "--oknodo" should be the default behaviour for "start-stop-daemon" (LSB specs)

Steve Langasek wrote:
>> I'm reluctant to change the default behaviour of start-stop-daemon at this
>> point. What do other people think of making --oknodo the default behaviour
>> and adding a new option to force the current default behaviour (exit with
>> failure if nothing had to be done)?
>
> I think this sounds like there's no real transition plan between the two
> states; anything that actually relies on the current behavior of s-s-d
> without --oknodo will suddenly be broken. Changing the semantics of core
> tools in this way is a bad idea.

Here a proposal for a transition plan:

Before lenny, start-stop-daemon can gain a new option that:
- conflict with --oknodo (the new option can be called --no-oknodo for example)
- enforce the current behavior with start-stop-daemon

In sid, after lenny, start-stop-daemon can be changed to emit a warning if
invoked without --oknodo or --no-oknodo. Maintainers must update their scripts.

In lenny+1, (ie just before the release of lenny+1) start-stop-daemon revert
the previous patch (ie does not show warnings) so that upgrade from lenny
(maintainer script without --no-oknodo) to lenny+1 (maintainer scripts with
--no-oknodo or --oknodo) does not trigger lots of warnings.

In sid, after lenny+1, start-stop-daemon can fail if no option are given
(or change its behavior).


Another one is:
Before lenny, start-stop-daemon can gain a new option that:
- conflict with --oknodo (the new option can be called --no-oknodo for example)
- enforce the current behavior with start-stop-daemon

In sid, after lenny, lintian checks and warns if none of the two options
is given.


In both case, the goal is to ensure that the maintainer really choose the
behavior he wants for start-stop-daemon

> The right answer is that we should be fixing the wrong init scripts, not
> trying to coerce all the init scripts with a change in s-s-d semantics. An
> init script may have a legitimate reason to want to check for the
> difference between exit statuses 0 and 1, without necessarily using this
> information a way that breaks the init script's own exit status, and
> changing s-s-d behavior will break these legitimate use cases.
>
>> The alternative is to change policy and/or lintian to ensure that packages
>> are using --oknodo unless they have a good reason not to.
>
> This was already discussed on debian-devel in March of this year.
>
> http://lists.debian.org/debian-devel/2008/03/msg00772.html
>
> Feel free to propose an amendment to policy that clarifies that "sensible"
> behavior is equivalent to --oknodo (without implying that init scripts are
> required to use s-s-d!), and I will happily second it; as I already
> commented in that thread, I think this is a mere clarification of what the
> policy has always been, not a change to policy at all.
>
>>> [1] LSB specifications about init script actions:
>>> http://www.linux-foundation.org/spec/refspecs/LSB_3.0.0/LSB-Core-generic/LSB-Core-generic/iniscrptact.html
>
> That one's starting to get up there right next to "our priorities are our
> users and free software" on my list of Facile Arguments That Demonstrate The
> Poster Has No Clue. :P
>


--
Vincent Danjean GPG key ID 0x9D025E87 vdanjean@debian.org
GPG key fingerprint: FC95 08A6 854D DB48 4B9A 8A94 0BF7 7867 9D02 5E87
Unofficial pacakges: http://www-id.imag.fr/~danjean/deb.html#package
APT repo: deb http://perso.debian.org/~vdanjean/debian unstable main


--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 07-05-2008, 08:58 AM
Raphael Hertzog
 
Default Bug#426877: dpkg: Option "--oknodo" should be the default behaviour for "start-stop-daemon" (LSB specs)

On Fri, 04 Jul 2008, Vincent Danjean wrote:
> Steve Langasek wrote:
> >> I'm reluctant to change the default behaviour of start-stop-daemon at this
> >> point. What do other people think of making --oknodo the default behaviour
> >> and adding a new option to force the current default behaviour (exit with
> >> failure if nothing had to be done)?
> >
> > I think this sounds like there's no real transition plan between the two
> > states; anything that actually relies on the current behavior of s-s-d
> > without --oknodo will suddenly be broken. Changing the semantics of core
> > tools in this way is a bad idea.
>
> Here a proposal for a transition plan:

THanks, I could come up with a transition plan myself if needed. But
compare your suggestions with: "someone goes over all init scripts, file
bugs and in lenny+1 we're done". (No this is not something I intend to
pursue, but anyone that cares could do and would probably be granted a
release goal for this)

The transition would be hugely complicated for little gains since most
script already do what's needed.

Cheers,
--
RaphaŰl Hertzog

Le best-seller franšais mis Ó jour pour Debian Etch :
http://www.ouaza.com/livre/admin-debian/


--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 07-05-2008, 10:13 AM
Raphael Hertzog
 
Default Bug#426877: dpkg: Option "--oknodo" should be the default behaviour for "start-stop-daemon" (LSB specs)

On Sat, 05 Jul 2008, Marc Haber wrote:
> On Sat, Jul 05, 2008 at 10:58:35AM +0200, Raphael Hertzog wrote:
> > THanks, I could come up with a transition plan myself if needed. But
> > compare your suggestions with: "someone goes over all init scripts, file
> > bugs and in lenny+1 we're done".
>
> That'll cause tremendous pain for backporters. I'm opposed.

You're opposed to what? Fixing non-policy compliant init script?

I think you misunderstood. I don't want to change the default behaviour
of start-stop-daemon and as such, there's no need for any transition.

Cheers,
--
RaphaŰl Hertzog

Le best-seller franšais mis Ó jour pour Debian Etch :
http://www.ouaza.com/livre/admin-debian/


--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 07-05-2008, 05:39 PM
Steve Langasek
 
Default Bug#426877: dpkg: Option "--oknodo" should be the default behaviour for "start-stop-daemon" (LSB specs)

On Sat, Jul 05, 2008 at 11:58:17AM +0100, Roger Leigh wrote:
> Raphael Hertzog <hertzog@debian.org> writes:

> > On Sat, 05 Jul 2008, Marc Haber wrote:
> >> On Sat, Jul 05, 2008 at 10:58:35AM +0200, Raphael Hertzog wrote:
> >> > THanks, I could come up with a transition plan myself if needed. But
> >> > compare your suggestions with: "someone goes over all init scripts, file
> >> > bugs and in lenny+1 we're done".

> >> That'll cause tremendous pain for backporters. I'm opposed.

> > You're opposed to what? Fixing non-policy compliant init script?

> > I think you misunderstood. I don't want to change the default behaviour
> > of start-stop-daemon and as such, there's no need for any transition.

> Couldn't the default be changed once all init scripts have been fixed
> up?

No, because "fixed up" does not imply "switched to use --oknodo". It only
means *checking* the return value of s-s-d and handling it in a
policy-compliant manner; this is done for you if you use --oknodo, but you
don't have to use --oknodo and it's not appropriate for dpkg to break
scripts that don't use --oknodo but are policy compliant.

--
Steve Langasek Give me a lever long enough and a Free OS
Debian Developer to set it on, and I can move the world.
Ubuntu Developer http://www.debian.org/
slangasek@ubuntu.com vorlon@debian.org


--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 

Thread Tools




All times are GMT. The time now is 05:16 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ę2007 - 2008, www.linux-archive.org