Re: Restarting daemons after portupgrade/portmanager
2009/7/25 Mel Flynn : > On Friday 24 July 2009 14:57:13 Axel wrote: > >> So far, so good. But what about the other daemons that still seem to run >> after upgrade (Apache, Courier IMAP etc)? Are the new version running >> fine after the upgrade, or should I set AFTERINSTALL to do a restart of >> these daemons, to make sure they run the upgraded version? > > I don't know about Courier, but Apache is generally not affected by on-disk > versions of libraries. The CGI programs however, are, since they're started up > and shutdown with each request (or in the case of FCGI in X requests) - the > Apache workers are spawned from the root process and use that process image. > > So there is no definite need to shut down Apache and disrupt service. If a > running webserver is important to you, I also would not do this automatically. > For example, jpeg could be upgraded before Apache and a module for Apache > needing it, yet this module is depending on Apache and therefore not > recompiled yet. As a result, this module tries to load a non-existing library > and Apache restart will fail. > -- > Mel If you want to restart Apache without killing existing sessions, just use amnesiac# apachectl graceful However, watch out for Mel's point about missing libraries But I would still do that; downtime after forcing a restart is better than downtime at some random point when it discovers the missing libraries Chris -- A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing? A: Top-posting. Q: What is the most annoying thing in a mailing list? ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: Restarting daemons after portupgrade/portmanager
On Friday 24 July 2009 14:57:13 Axel wrote: > So far, so good. But what about the other daemons that still seem to run > after upgrade (Apache, Courier IMAP etc)? Are the new version running > fine after the upgrade, or should I set AFTERINSTALL to do a restart of > these daemons, to make sure they run the upgraded version? I don't know about Courier, but Apache is generally not affected by on-disk versions of libraries. The CGI programs however, are, since they're started up and shutdown with each request (or in the case of FCGI in X requests) - the Apache workers are spawned from the root process and use that process image. So there is no definite need to shut down Apache and disrupt service. If a running webserver is important to you, I also would not do this automatically. For example, jpeg could be upgraded before Apache and a module for Apache needing it, yet this module is depending on Apache and therefore not recompiled yet. As a result, this module tries to load a non-existing library and Apache restart will fail. -- Mel ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: Restarting daemons after portupgrade/portmanager
Thanks for your reply! I want to make the upgrade process as easy as possible, so I guess that I'll set up automated restart of daemons (unless you think it's a bad idea). Is it okay to send a restart signal using AFTERINSTALL, or should the restart wait until after portmanager has updated all dependencies etc (= make a shell script)? Axel Matthew Seaman wrote: Axel wrote: Hello! I have a question concerning port upgrades. mysql51-server stops automatically during upgrade (using portupgrade or portmanager), and is properly started again based on a AFTERINSTALL setting in pktools.conf. So far, so good. But what about the other daemons that still seem to run after upgrade (Apache, Courier IMAP etc)? Are the new version running fine after the upgrade, or should I set AFTERINSTALL to do a restart of these daemons, to make sure they run the upgraded version? No -- the sample AFTERINSTALL stuff in pkgtools.conf will run any RC scripts the package installs to try and start those services. This will have no effect if: * The daemon is already running * There's no foo_enable="yes" setting in /etc/rc.conf or equivalent. So daemons like mysql or slapd that get shutdown during the process of updating the port will be restarted, but daemons like apache or snmpd that don't get shutdown will still be running the old version and you'll have to restart them manually, as you will have to configure and start anything newly installed. Cheers, Matthew ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: Restarting daemons after portupgrade/portmanager
Axel wrote: Hello! I have a question concerning port upgrades. mysql51-server stops automatically during upgrade (using portupgrade or portmanager), and is properly started again based on a AFTERINSTALL setting in pktools.conf. So far, so good. But what about the other daemons that still seem to run after upgrade (Apache, Courier IMAP etc)? Are the new version running fine after the upgrade, or should I set AFTERINSTALL to do a restart of these daemons, to make sure they run the upgraded version? No -- the sample AFTERINSTALL stuff in pkgtools.conf will run any RC scripts the package installs to try and start those services. This will have no effect if: * The daemon is already running * There's no foo_enable="yes" setting in /etc/rc.conf or equivalent. So daemons like mysql or slapd that get shutdown during the process of updating the port will be restarted, but daemons like apache or snmpd that don't get shutdown will still be running the old version and you'll have to restart them manually, as you will have to configure and start anything newly installed. Cheers, Matthew -- Dr Matthew J Seaman MA, D.Phil. 7 Priory Courtyard Flat 3 PGP: http://www.infracaninophile.co.uk/pgpkey Ramsgate Kent, CT11 9PW signature.asc Description: OpenPGP digital signature