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 User

 
 
LinkBack Thread Tools
 
Old 12-27-2010, 09:45 PM
Mike Bird
 
Default insserv + apache2 + bind9 = pain

If the Apache configuration needs DNS to start, Apache silently
and without logging anything fails to start in Squeeze. This
used to work correctly under the old startup mechanism in Lenny.


In order to make Apache startup under insserv in cases where
the Apache config needs DNS information I eventually created
/etc/insserv/overrides/apache2 containing only:

#!/bin/sh
### BEGIN INIT INFO
# Provides: apache2
# Required-Start: $local_fs $remote_fs $network $syslog $named
# Required-Stop: $local_fs $remote_fs $network $syslog $named
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# X-Interactive: true
# Short-Description: Start/stop apache2 web server
### END INIT INFO

... and then ran "insserv" and rebooted.


Is there a simpler solution?


--Mike Bird


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 201012271445.16799.mgb-debian@yosemite.net">http://lists.debian.org/201012271445.16799.mgb-debian@yosemite.net
 
Old 12-28-2010, 06:55 AM
Arthur Machlas
 
Default insserv + apache2 + bind9 = pain

On Mon, Dec 27, 2010 at 4:45 PM, Mike Bird <mgb-debian@yosemite.net> wrote:
> If the Apache configuration needs DNS to start, Apache silently
> and without logging anything fails to start in Squeeze. *This
> used to work correctly under the old startup mechanism in Lenny.

Create a new group in /etc/insserv.conf, and name the scripts that are
required to start. Then list that group as a required start.


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: AANLkTi=_6xe9BfWnX47DU3R6QQO2mLF_QnCBBcf0Ri_=@mail .gmail.com">http://lists.debian.org/AANLkTi=_6xe9BfWnX47DU3R6QQO2mLF_QnCBBcf0Ri_=@mail .gmail.com
 
Old 12-28-2010, 07:10 AM
Mike Bird
 
Default insserv + apache2 + bind9 = pain

On Mon December 27 2010 23:55:00 Arthur Machlas wrote:
> On Mon, Dec 27, 2010 at 4:45 PM, Mike Bird <mgb-debian@yosemite.net> wrote:
> > If the Apache configuration needs DNS to start, Apache silently
> > and without logging anything fails to start in Squeeze. *This
> > used to work correctly under the old startup mechanism in Lenny.
>
> Create a new group in /etc/insserv.conf, and name the scripts that are
> required to start. Then list that group as a required start.

Thanks Arthur.

It's still the case then that one has to either edit
/etc/init.d/apache2 (which impedes future upgrades) or
else create a ten line /etc/insserv/overrides/apache2
and then manually keep it in step with future changes
to /etc/init.d/apache2?

This seems a lot more work and a lot more error prone
than the old sysv-rc system. We've already found some
servers with apache2-bind9 dependencies, and others with
apache2-mysql dependencies.

Is it possible to go back to the old system? All this
upgrade downtime is not worth the half second saved on
a server reboot which may only occur once a year.

--Mike Bird


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 201012280010.23664.mgb-debian@yosemite.net">http://lists.debian.org/201012280010.23664.mgb-debian@yosemite.net
 
Old 12-28-2010, 08:31 AM
Camaleón
 
Default insserv + apache2 + bind9 = pain

On Tue, 28 Dec 2010 00:10:23 -0800, Mike Bird wrote:

> On Mon December 27 2010 23:55:00 Arthur Machlas wrote:
>> On Mon, Dec 27, 2010 at 4:45 PM, Mike Bird wrote:
>> > If the Apache configuration needs DNS to start, Apache silently and
>> > without logging anything fails to start in Squeeze. *This used to
>> > work correctly under the old startup mechanism in Lenny.

Dependency of apache2 to bind9 is virtual, I mean, is not required "per
se" (you don't need to run a dns server to launch a web server) so if
under some scenarios this is a requirement, you should ensure your dns
server (bind9) is up and running before apache.

OTOH, any service that is not started at booting should log the error
somewhere (maybe "/var/log/boot" or "/var/log/syslog"?) :-?

>> Create a new group in /etc/insserv.conf, and name the scripts that are
>> required to start. Then list that group as a required start.
>
> Thanks Arthur.
>
> It's still the case then that one has to either edit /etc/init.d/apache2
> (which impedes future upgrades) or else create a ten line
> /etc/insserv/overrides/apache2 and then manually keep it in step with
> future changes to /etc/init.d/apache2?
>
> This seems a lot more work and a lot more error prone than the old
> sysv-rc system. We've already found some servers with apache2-bind9
> dependencies, and others with apache2-mysql dependencies.

AFAIK (this was discussed in previous threads) manually edititing "/etc/
init.d/*" scripts headers is a valid option, and in the event you upgrade
the package, any change you have done on the file has to be preserved, so
editing your "/etc/init.d/apache2" and put there:

# Required-Start: $local_fs $remote_fs $network $syslog $named
# Required-Stop: $local_fs $remote_fs $network $syslog $named

Or

# Required-Start: $local_fs $remote_fs $network $syslog $mysql
# Required-Stop: $local_fs $remote_fs $network $syslog $mysql

Should be just fine (if I understood it correctly), just remember that
"named" and "mysql" boot script dependencies have also to be met.

> Is it possible to go back to the old system? All this upgrade downtime
> is not worth the half second saved on a server reboot which may only
> occur once a year.

If you mean "how to disable dependency booting" yes, you can disable it
to get the old behaviour, but you will still have to ensure bind9 is
started before apache2:

http://www.debian.org/releases/squeeze/i386/release-notes/ch-whats-new.en.html#dependency-boot

Greetings,

--
Camaleón


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: pan.2010.12.28.09.31.47@gmail.com">http://lists.debian.org/pan.2010.12.28.09.31.47@gmail.com
 
Old 12-28-2010, 05:06 PM
Mike Bird
 
Default insserv + apache2 + bind9 = pain

On Tue December 28 2010 01:31:50 Camaleón wrote:
> On Tue, 28 Dec 2010 00:10:23 -0800, Mike Bird wrote:
> > Is it possible to go back to the old system?
>
> If you mean "how to disable dependency booting" yes, you can disable it
> to get the old behaviour, but you will still have to ensure bind9 is
> started before apache2:
>
> http://www.debian.org/releases/squeeze/i386/release-notes/ch-whats-new.en.h
>tml#dependency-boot

Thank you Camaleón.

CONCURRENCY=none may help some people with different problems, but
it does not solve the problem of unexpressed dependencies.

Is there a way to use the old-style reliable init system based on
the Snn and Knn values in rcn.d? Real servers have dependencies
among numerous server processes. A few of these dependencies relate
to Debian packaging but far more relate to configuration, scripting,
plugins, and even custom programming.

It is simply not worth the effort to spend hours trying to discover
and express all the dependencies on a bunch of servers in order to
save half a second of boot time once per year. It took me four hours
to discover what was wrong in a very simple case. This was not
helped by failures to log errors, bootchart2 missing from Squeeze,
a near complete lack of documentation, and insserv silently ignoring
errors in my early attempts to express missing dependencies.

I've read the very thin /usr/share/doc and man documentation and
googled extensively. The new system may be great for script kiddies
rebooting their Ubuntu laptops twice a day but it is an appalling
idea for Debian servers. It not only scales terribly (on the order
of N squared dependencies instead of N priorities) but is also very
poorly documented.

--Mike Bird


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 201012281006.58377.mgb-debian@yosemite.net">http://lists.debian.org/201012281006.58377.mgb-debian@yosemite.net
 
Old 12-28-2010, 05:56 PM
Camaleón
 
Default insserv + apache2 + bind9 = pain

On Tue, 28 Dec 2010 10:06:58 -0800, Mike Bird wrote:

> On Tue December 28 2010 01:31:50 Camaleón wrote:
>> On Tue, 28 Dec 2010 00:10:23 -0800, Mike Bird wrote:
>> > Is it possible to go back to the old system?
>>
>> If you mean "how to disable dependency booting" yes, you can disable it
>> to get the old behaviour, but you will still have to ensure bind9 is
>> started before apache2:
>>
>> http://www.debian.org/releases/squeeze/i386/release-notes/ch-whats-
new.en.h
>>tml#dependency-boot
>
> Thank you Camaleón.
>
> CONCURRENCY=none may help some people with different problems, but it
> does not solve the problem of unexpressed dependencies.

Old booting style neither, you also have to "juggle" things to get the
desired order ;-)

JFYI:

apache2: fails to start with dependency based boot if DNS is required by
configuration
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=606334

> Is there a way to use the old-style reliable init system based on the
> Snn and Knn values in rcn.d? Real servers have dependencies among
> numerous server processes. A few of these dependencies relate to Debian
> packaging but far more relate to configuration, scripting, plugins, and
> even custom programming.

Old booting style has nothing reliable, so before ditching dependency
booting at all I would recommend you to first find out what is failing at
your side and why.

> It is simply not worth the effort to spend hours trying to discover and
> express all the dependencies on a bunch of servers in order to save half
> a second of boot time once per year. It took me four hours to discover
> what was wrong in a very simple case. This was not helped by failures
> to log errors, bootchart2 missing from Squeeze, a near complete lack of
> documentation, and insserv silently ignoring errors in my early attempts
> to express missing dependencies.

It is somehow documented (man insserv).

> I've read the very thin /usr/share/doc and man documentation and googled
> extensively. The new system may be great for script kiddies rebooting
> their Ubuntu laptops twice a day but it is an appalling idea for Debian
> servers. It not only scales terribly (on the order of N squared
> dependencies instead of N priorities) but is also very poorly
> documented.

I've been using insserv (dependecy based booting) with openSUSE since
years and this method really works quite well, so no, not intended just
for kiddies :-)

OTOH, I suppose (although not tested and not sure if disabling at all is
nowadays even possible :-?) that by reconfiguring "insserv" package you
could restore the old sysinit booting style... but think it twice before
going back to the cavern :-P

Greetings,

--
Camaleón


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: pan.2010.12.28.18.56.48@gmail.com">http://lists.debian.org/pan.2010.12.28.18.56.48@gmail.com
 
Old 12-28-2010, 07:07 PM
Mike Bird
 
Default insserv + apache2 + bind9 = pain

On Tue December 28 2010 10:56:48 Camaleón wrote:
> JFYI:
>
> apache2: fails to start with dependency based boot if DNS is required by
> configuration
> http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=606334

Thank you for the link but the bug is not in Apache. The
bug is the poorly thought out and poorly documented startup
mechanism which is being pushed onto previously stable and
reliable Debian servers.

People have also encountered problems with MySQL, Request
Tracker, Apache, and Bind. We haven't even started testing
LDAP, Samba, Postfix, ClamSMTP, ClamAV, Quagga, YP/NIS,
WordPress etc in the various combinations and with the
various configurations and various plugins employed on
different servers.

If anyone doubts it's a nightmare, take a look at the sysv-rc
changelog and see how many special case hacks and weeks of
effort went into getting insserv to work with just a virgin
Linux system with no significant services running.

Remember that configuring the priorities of N services is O(N),
while configuring all their dependencies is O(N*N). It just
doesn't scale on real world servers. You're breaking stable
Debian servers and pushing all the repair work on Debian users
and sysadmins. FOR NO GOOD REASON.

What's worse is that the startup sequence is not repeatable.
A service required may just happen to be ready in time on most
reboots but start up a little slower sometimes and thus cause
intermittent failures. Analyzing every piece of code and
configuration on a system - some of it written more than ten
years ago - is a nightmare.

It's the Microsoft way to use a separate box for each service
but prior to Squeeze it has always been a big selling point for
Debian that you could always add another service to a box and
it would just work. In the past Debian has worked REALLY WELL
for small businesses and schools.

There's no VALID reason for FORCING insserv on Debian servers
other than someone's desire to see his/her software being used.

So I will repeat the key question, and with increased desperation:

How do we run the old reliable Snn/Knn style startup mechanism
in Squeeze?

--Mike Bird


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 201012281207.30589.mgb-debian@yosemite.net">http://lists.debian.org/201012281207.30589.mgb-debian@yosemite.net
 
Old 12-29-2010, 06:54 AM
Tom H
 
Default insserv + apache2 + bind9 = pain

On Tue, Dec 28, 2010 at 3:10 AM, Mike Bird <mgb-debian@yosemite.net> wrote:
> On Mon December 27 2010 23:55:00 Arthur Machlas wrote:
>> On Mon, Dec 27, 2010 at 4:45 PM, Mike Bird <mgb-debian@yosemite.net> wrote:
>>>
>> > If the Apache configuration needs DNS to start, Apache silently
>> > and without logging anything fails to start in Squeeze. This
>> > used to work correctly under the old startup mechanism in Lenny.
>>
>> Create a new group in /etc/insserv.conf, and name the scripts that are
>> required to start. Then list that group as a required start.
>
> It's still the case then that one has to either edit
> /etc/init.d/apache2 (which impedes future upgrades) or
> else create a ten line /etc/insserv/overrides/apache2
> and then manually keep it in step with future changes
> to /etc/init.d/apache2?
>
> This seems a lot more work and a lot more error prone
> than the old sysv-rc system. We've already found some
> servers with apache2-bind9 dependencies, and others with
> apache2-mysql dependencies.
>
> Is it possible to go back to the old system? All this
> upgrade downtime is not worth the half second saved on
> a server reboot which may only occur once a year.

Since there already is a $named insserv "group", there's no need to
create another. Your solution of creating an override seems like the
best (to me). I presume that since there are more (probably far more,
at least from my experience) apache servers without a named dependency
than with it, apache2's init script was set up not to depend on named.
Why don't you file a bug report to have $named added to apache2's
Should-Start section?

Since sysv-rc depends on insserv, going back to the previous system
isn't possible.


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: AANLkTikxprMhqh5DFTDOg1FrAt5euJA11-hbdcfpf9rT@mail.gmail.com">http://lists.debian.org/AANLkTikxprMhqh5DFTDOg1FrAt5euJA11-hbdcfpf9rT@mail.gmail.com
 
Old 12-29-2010, 07:13 AM
Camaleón
 
Default insserv + apache2 + bind9 = pain

On Tue, 28 Dec 2010 12:07:30 -0800, Mike Bird wrote:

> On Tue December 28 2010 10:56:48 Camaleón wrote:
>> JFYI:
>>
>> apache2: fails to start with dependency based boot if DNS is required
>> by configuration
>> http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=606334
>
> Thank you for the link but the bug is not in Apache.

Nobody said that.

I pointed you to the bug because you are experiencing the same situation.
You still don't know (or did not tell) why your apache fails to boot at
start up. You can add your comments to the report to help fixing the
problem.

> The bug is the poorly thought out and poorly documented startup
> mechanism which is being pushed onto previously stable and reliable
> Debian servers.

AFAIK, booting scripts have been rewrited to play with dependency booting
and provided this is new for Squeeze, I would expect some glitches, but
nothing that cannot be solved.

> People have also encountered problems with MySQL, Request Tracker,
> Apache, and Bind. We haven't even started testing LDAP, Samba, Postfix,
> ClamSMTP, ClamAV, Quagga, YP/NIS, WordPress etc in the various
> combinations and with the various configurations and various plugins
> employed on different servers.

Then you better report them in BTS. There is no chance to get them fixed
is nobody is aware of the problem.

> If anyone doubts it's a nightmare, take a look at the sysv-rc changelog
> and see how many special case hacks and weeks of effort went into
> getting insserv to work with just a virgin Linux system with no
> significant services running.

Again, I've been using for years this booting system (yes, in my racked
servers) and nothing terribly happened.

> Remember that configuring the priorities of N services is O(N), while
> configuring all their dependencies is O(N*N). It just doesn't scale on
> real world servers. You're breaking stable Debian servers and pushing
> all the repair work on Debian users and sysadmins. FOR NO GOOD REASON.

"Reasons" were stated time ago:

http://lists.debian.org/debian-devel-announce/2009/09/msg00003.html

More here:

http://wiki.debian.org/LSBInitScripts/DependencyBasedBoot

In fact, I guess dependency boot system will be soon replaced by newer
methods, like systemd or upstart. Dependency booting can be new in Debian
but not in the linux world.

> What's worse is that the startup sequence is not repeatable. A service
> required may just happen to be ready in time on most reboots but start
> up a little slower sometimes and thus cause intermittent failures.
> Analyzing every piece of code and configuration on a system - some of it
> written more than ten years ago - is a nightmare.

Disable parallel booting and see if you get any gain.

> It's the Microsoft way to use a separate box for each service but prior
> to Squeeze it has always been a big selling point for Debian that you
> could always add another service to a box and it would just work. In
> the past Debian has worked REALLY WELL for small businesses and schools.

Things change, but again, this is not new is only that you are not used
to it.

> There's no VALID reason for FORCING insserv on Debian servers other than
> someone's desire to see his/her software being used.

Open a wishlist report (to express your thoughts and concerns on this
matter) or a documentation report (so the new boot method gets well
documented) or write an e-mail to Debian devel mailing list. You can
complain about the things you don't like and you can also help to get
them fixed. Choose your poison... you can even choose both paths:
complain and help to fix errors >:-)

> So I will repeat the key question, and with increased desperation:
>
> How do we run the old reliable Snn/Knn style startup mechanism in
> Squeeze?

It is still there (sysv-rc and insserv play "together") and I already
answered to that question. In fact, I remember that months ago I was
asked by the installer if I wanted to migrate to the new dependency boot
and I choose "yes".

What have you already tested for getting rid of insserv? Did you try to
remove the package (insserv)? Did you try by reconfiguring it? (don't do
these things on production servers but in testing machines). If it does
not work, please, tell what is exactly failing so anyone can help you
with this.

Greetings,

--
Camaleón


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: pan.2010.12.29.08.13.04@gmail.com">http://lists.debian.org/pan.2010.12.29.08.13.04@gmail.com
 
Old 12-29-2010, 07:23 AM
Tom H
 
Default insserv + apache2 + bind9 = pain

On Tue, Dec 28, 2010 at 1:06 PM, Mike Bird <mgb-debian@yosemite.net> wrote:
> On Tue December 28 2010 01:31:50 Camaleón wrote:
>> On Tue, 28 Dec 2010 00:10:23 -0800, Mike Bird wrote:
>>>
>> > Is it possible to go back to the old system?
>>
>> If you mean "how to disable dependency booting" yes, you can disable it
>> to get the old behaviour, but you will still have to ensure bind9 is
>> started before apache2:
>>
>> http://www.debian.org/releases/squeeze/i386/release-notes/ch-whats-new.en.h
>> tml#dependency-boot
>
> Thank you Camaleón.
>
> CONCURRENCY=none may help some people with different problems, but
> it does not solve the problem of unexpressed dependencies.
>
> Is there a way to use the old-style reliable init system based on
> the Snn and Knn values in rcn.d? Real servers have dependencies
> among numerous server processes. A few of these dependencies relate
> to Debian packaging but far more relate to configuration, scripting,
> plugins, and even custom programming.
>
> It is simply not worth the effort to spend hours trying to discover
> and express all the dependencies on a bunch of servers in order to
> save half a second of boot time once per year. It took me four hours
> to discover what was wrong in a very simple case. This was not
> helped by failures to log errors, bootchart2 missing from Squeeze,
> a near complete lack of documentation, and insserv silently ignoring
> errors in my early attempts to express missing dependencies.
>
> I've read the very thin /usr/share/doc and man documentation and
> googled extensively. The new system may be great for script kiddies
> rebooting their Ubuntu laptops twice a day but it is an appalling
> idea for Debian servers. It not only scales terribly (on the order
> of N squared dependencies instead of N priorities) but is also very
> poorly documented.

I also found the insserv documentation frustrating when I first tried
squeeze about a year ago. It took me a few tries to figure out the
correct way of using overrides...

When I was googling insserv last year, I landed on a d-devel thread
where some posters were arguing that the current init system ought to
be kept as an option for those who didn't want to use dependency-based
boot. But the decision to make dependency-based boot inescapable seems
to have been taken and, like grub2, we're stuck with it - until, it
seems, squeeze+1/squeeze+2, when we'll have the immense pleasure of
changing yet again to upstart or systemd. (By the way, Ubuntu laptops
use upstart to allow script kiddies to boot faster, not insserv.)


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: AANLkTimcQkt_ZXag0r5D=N7brwd6Ck-Bz_eJyC-3ZCiv@mail.gmail.com">http://lists.debian.org/AANLkTimcQkt_ZXag0r5D=N7brwd6Ck-Bz_eJyC-3ZCiv@mail.gmail.com
 

Thread Tools




All times are GMT. The time now is 06:14 AM.

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