On Tue, 2011-08-23 at 14:37 -0700, Adam Williamson wrote:
> On Tue, 2011-08-23 at 17:28 -0400, Tom Lane wrote:
> > Simo Sorce <s...@redhat.com> writes:
> > > ... If instead the socket is listening but not really accepting and
> > > processing requests, then yes, you can have a deadlock.
> > 
> > > So socket activation is not transparent by any means and needs to be
> > > handled very carefully in terms of circular dependencies as they may
> > > actually introduce deadlocks that weren't there before.
> > 
> > Yeah.  Another way in which socket activation is not transparent is that
> > code might try to determine whether the service is running by seeing
> > whether a connection attempt succeeds.  In such a case, having the
> > service autostart is absolutely *not* the desired outcome.  Both mysql
> 
> Why not?
> 
> If the service is enabled but the daemon not currently running, is it so
> terrible for a connection test to cause the daemon to start? Remember,
> in systemd logic 'service enabled with socket activation, daemon not
> currently running' is effectively an 'on' state, not an 'off' state. If
> you wanted the database to be 'off' you should have the service
> disabled, and in that case, the ping test wouldn't cause the daemon to
> start.

It generally is a bad idea to automatically restart a database based on
a random connection. There many reasons why you may have stopped the db
(or it may have stopped itself) and requires inspection before
attempting a new restart. Having to battle with socket activation while
in a critical situation is not a good idea.

Simo.

-- 
Simo Sorce * Red Hat, Inc * New York

-- 
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel

Reply via email to