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 08-05-2012, 10:35 PM
Salvo Tomaselli
 
Default RFC: terminate init script when service is ready

Hello,

since services might depend on other services at boot, they must be sorted.

But after doing a "service foo start", and waiting for its termination, we
don't know if the service has started or not, maybe the process was just
created and is kept waiting by the sheduler, so when the next service is
started the service might not really be there.

systemd offers a solution but it is a complete rewrite of init, it's not
mature nor compatible, and requires services to be patched and to provide
special configuration files.

Would it help to have the knowledge that, when the init script terminates, the
service is running and ready instead of just running?

It would be fairly simple to implement, start-stop-daemon could set an env var
with it's own pid and the service could send a signal after listening to the
socket and before the accept(), that way before running the next service we
would be sure that the service is ready, and the services depending on that
can safely be started.

Just an idea...

bye
--
Salvo Tomaselli
 
Old 08-05-2012, 11:30 PM
Ulrich Dangel
 
Default RFC: terminate init script when service is ready

On 08/06/12 00:35, Salvo Tomaselli wrote:

> systemd offers a solution but it is a complete rewrite of init, it's not
> mature nor compatible,

systemd supports init scripts which means it is compatible. It is IMHO also mature
as Distributions like OpenSuse or Fedora ship systemd per default.

> and requires services to be patched and to provide
> special configuration files.

Services don't need to be patched and what do you mean with special configuration
file? If you mean the .service file they are just the equivalent of the init
scripts and are no configuration for the daemon.

> It would be fairly simple to implement, start-stop-daemon could set an env var
> with it's own pid and the service could send a signal after listening to the
> socket and before the accept(), that way before running the next service we
> would be sure that the service is ready, and the services depending on that
> can safely be started.

This means patch upstream software to interface with start-stop-daemon? How is
this any different than adding socket activation to an upstream project? What is
the benefit?


--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 501F0216.2090906@spamt.net">http://lists.debian.org/501F0216.2090906@spamt.net
 
Old 08-05-2012, 11:35 PM
Steve Langasek
 
Default RFC: terminate init script when service is ready

On Mon, Aug 06, 2012 at 12:35:09AM +0200, Salvo Tomaselli wrote:

> since services might depend on other services at boot, they must be sorted.

> But after doing a "service foo start", and waiting for its termination, we
> don't know if the service has started or not, maybe the process was just
> created and is kept waiting by the sheduler, so when the next service is
> started the service might not really be there.

> Would it help to have the knowledge that, when the init script terminates, the
> service is running and ready instead of just running?

This is already what's expected from init scripts. Any that don't already
fulfill this requirement - by exiting before the service is ready - are
buggy.

> It would be fairly simple to implement, start-stop-daemon could set an env
> var with it's own pid and the service could send a signal after listening
> to the socket and before the accept(),

Or the service could be written as a proper Unix service, and not detach
from the foreground until it's listening on the socket.

--
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
 
Old 08-06-2012, 07:05 AM
Bernd Zeimetz
 
Default RFC: terminate init script when service is ready

On 08/06/2012 01:30 AM, Ulrich Dangel wrote:
> On 08/06/12 00:35, Salvo Tomaselli wrote:
>
>> systemd offers a solution but it is a complete rewrite of init, it's not
>> mature nor compatible,
>
> systemd supports init scripts which means it is compatible. It is IMHO also mature
> as Distributions like OpenSuse or Fedora ship systemd per default.

I would not consider stuff Fedora ships as mature. Fedora is a nice
testbed for stuff that will get into RedHat some years later, and a nice
distro for those who like the latest shiniest buggiest software.


--
Bernd Zeimetz Debian GNU/Linux Developer
http://bzed.de http://www.debian.org
GPG Fingerprint: ECA1 E3F2 8E11 2432 D485 DD95 EB36 171A 6FF9 435F


--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 501F6CC0.8080303@bzed.de">http://lists.debian.org/501F6CC0.8080303@bzed.de
 
Old 08-06-2012, 09:35 AM
Philipp Kern
 
Default RFC: terminate init script when service is ready

Bernd,

am Mon, Aug 06, 2012 at 09:05:36AM +0200 hast du folgendes geschrieben:
> On 08/06/2012 01:30 AM, Ulrich Dangel wrote:
> > On 08/06/12 00:35, Salvo Tomaselli wrote:
> >> systemd offers a solution but it is a complete rewrite of init, it's not
> >> mature nor compatible,
> > systemd supports init scripts which means it is compatible. It is IMHO also mature
> > as Distributions like OpenSuse or Fedora ship systemd per default.
> I would not consider stuff Fedora ships as mature. Fedora is a nice
> testbed for stuff that will get into RedHat some years later, and a nice
> distro for those who like the latest shiniest buggiest software.

please stop the FUD, thanks. There are things in Fedora that are more mature
there than in Debian and there are things that are the other way 'round.
Following some upstreams closely does not necessarily mean getting broken
stuff.

What you can say, for instance, is that Fedora is not aimed to be a solid
server platform. As far as I understand this is true. But to dismiss everything
other people in our nice Free Software world do as "they are shipping buggy
stuff" is insulting to those fine developers over there. Even if they might
have another focus than us.

Kind regards
Philipp Kern
 
Old 08-18-2012, 03:34 PM
Marc Haber
 
Default RFC: terminate init script when service is ready

On Sun, 5 Aug 2012 16:35:38 -0700, Steve Langasek <vorlon@debian.org>
wrote:
>On Mon, Aug 06, 2012 at 12:35:09AM +0200, Salvo Tomaselli wrote:
>> Would it help to have the knowledge that, when the init script terminates, the
>> service is running and ready instead of just running?
>
>This is already what's expected from init scripts. Any that don't already
>fulfill this requirement - by exiting before the service is ready - are
>buggy.

This is not always easy. For example, IPv6 isn't ready when ifup
exited. We might still be learning prefixes and default routes after
ifup returned control for us. To my knowledge, there is no way to
detedmine whether there is still DAD running for one IPv6 address or
not.

Greetings
Marc
--
-------------------------------------- !! No courtesy copies, please !! -----
Marc Haber | " Questions are the | Mailadresse im Header
Mannheim, Germany | Beginning of Wisdom " | http://www.zugschlus.de/
Nordisch by Nature | Lt. Worf, TNG "Rightful Heir" | Fon: *49 621 72739834


--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: E1T2l2n-0001nl-I6@swivel.zugschlus.de">http://lists.debian.org/E1T2l2n-0001nl-I6@swivel.zugschlus.de
 
Old 08-18-2012, 04:10 PM
Henrique de Moraes Holschuh
 
Default RFC: terminate init script when service is ready

On Sat, 18 Aug 2012, Marc Haber wrote:
> This is not always easy. For example, IPv6 isn't ready when ifup

It is ready enough: it is activated on all interfaces where it should be
activated.

Anything that uses IPv6 and cannot deal with dynamic changes on the host
addresses is critically broken.

--
"One disk to rule them all, One disk to find them. One disk to bring
them all and in the darkness grind them. In the Land of Redmond
where the shadows lie." -- The Silicon Valley Tarot
Henrique Holschuh


--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 20120818161034.GA10338@khazad-dum.debian.net">http://lists.debian.org/20120818161034.GA10338@khazad-dum.debian.net
 
Old 08-18-2012, 04:31 PM
Marc Haber
 
Default RFC: terminate init script when service is ready

On Sat, 18 Aug 2012 13:10:34 -0300, Henrique de Moraes Holschuh
<hmh@debian.org> wrote:
>On Sat, 18 Aug 2012, Marc Haber wrote:
>> This is not always easy. For example, IPv6 isn't ready when ifup
>
>It is ready enough: it is activated on all interfaces where it should be
>activated.
>
>Anything that uses IPv6 and cannot deal with dynamic changes on the host
>addresses is critically broken.

That includes bind, radvd and apache, and, IIRC, sshd.

Greetings
Marc
--
-------------------------------------- !! No courtesy copies, please !! -----
Marc Haber | " Questions are the | Mailadresse im Header
Mannheim, Germany | Beginning of Wisdom " | http://www.zugschlus.de/
Nordisch by Nature | Lt. Worf, TNG "Rightful Heir" | Fon: *49 621 72739834


--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: E1T2lvY-0003f0-K3@swivel.zugschlus.de">http://lists.debian.org/E1T2lvY-0003f0-K3@swivel.zugschlus.de
 
Old 08-18-2012, 04:44 PM
Bastian Blank
 
Default RFC: terminate init script when service is ready

On Sat, Aug 18, 2012 at 06:31:08PM +0200, Marc Haber wrote:
> On Sat, 18 Aug 2012 13:10:34 -0300, Henrique de Moraes Holschuh
> >Anything that uses IPv6 and cannot deal with dynamic changes on the host
> >addresses is critically broken.
> That includes bind, radvd and apache, and, IIRC, sshd.

bind does not listen on ::?

Not sure about radvd, but it needs more than existing interfaces?

apache and sshd can listen on ::.

Bastian

--
You! What PLANET is this!
-- McCoy, "The City on the Edge of Forever", stardate 3134.0


--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 20120818164410.GA22692@wavehammer.waldi.eu.org">ht tp://lists.debian.org/20120818164410.GA22692@wavehammer.waldi.eu.org
 
Old 08-18-2012, 08:43 PM
 
Default RFC: terminate init script when service is ready

On Aug 18, Marc Haber <mh+debian-devel@zugschlus.de> wrote:

> >Anything that uses IPv6 and cannot deal with dynamic changes on the host
> >addresses is critically broken.
> That includes bind, radvd and apache, and, IIRC, sshd.
BIND definitely looks for new IP addresses:

options {
interface-interval N;
}

I think that radvd works as expected as it does.

Non-static addresses on a web server are not a major use case.

But still, I agree that we should have a better way to signal to user
space when an interface is ready. Not just for IPv6, but also more
generally for interfaces which are subject to the STP delays.

--
ciao,
Marco
 

Thread Tools




All times are GMT. The time now is 02:31 AM.

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