ports/162049: The Ports tree lacks a framework to restart services

Matthew Seaman m.seaman at infracaninophile.co.uk
Mon Oct 31 11:54:19 UTC 2011


On 31/10/2011 10:41, Dominic Fandrey wrote:
> I just wanted to hint that such a function is already in place and I don't
> think it would be difficult to add the possibility to start a service.

Restarting a single service is no big deal.  Trouble is there are a lot
of cases where that just isn't the right thing to do.  Suppose you have
a very common situation: a web application written in PHP and using a RDBMS.

   * Upgrades to the RDBMS often require more than just a restart of the
     DB.  Eg. changes to internal schemas require running some external
     script.  (pg_upgrade, mysql_after_upgrade, etc.)

   * Upgrades to PHP -- given that PHP is modularized, then the sane
     way of restarting is to take the web app down at the point
     lang/php5 gets reinstalled, but not bring it up again until all
     the various php5 modules have been reinstalled.  At minimum.  If
     you use, say, eAccelerator, then you almost certainly need to
     rebuild that before restarting the php web-app.

   * Of course, how to restart a PHP based web-app is highly context
     dependent.  Generally it means bouncing some other daemon:
     frequently a web server like apache, or is it lighttpd?  Or some
     sort of FCGI daemon?

   * Certainly no one would ever write a DB based web-app that wouldn't
     cope gracefully with the temporary disappearance of its back-end
     DB.  Why, such a thing would be clearly beyond the bounds of
     possibility, and it would be vanishingly improbable that
     anyone should ever need to worry about needing to restart a
     web-app as a consequence of restarting a DB.

Basically, I think I can summarize by saying that as soon as you go
beyond the simplest and most basic system configurations, there are so
many different possibilities that it requires some sort of intelligent
agent to manage the upgrade and restart process.  Failing the widespread
availability of practicable AI, this is where your sysadmins are going
to earn their princely salaries.

	Cheers,

	Matthew


-- 
Dr Matthew J Seaman MA, D.Phil.                   7 Priory Courtyard
                                                  Flat 3
PGP: http://www.infracaninophile.co.uk/pgpkey     Ramsgate
JID: matthew at infracaninophile.co.uk               Kent, CT11 9PW

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 267 bytes
Desc: OpenPGP digital signature
Url : http://lists.freebsd.org/pipermail/freebsd-ports/attachments/20111031/3c97a8e9/signature.pgp


More information about the freebsd-ports mailing list