atom feed59 messages in org.freebsd.freebsd-portsRe: Re-starting daemons across upgrades?
FromSent OnAttachments
Michal VargaSep 12, 2011 2:55 pm 
Olivier SmedtsSep 12, 2011 3:42 pm 
Gabor KovesdanSep 12, 2011 4:00 pm 
JerrySep 12, 2011 4:05 pm 
Chad PerrinSep 12, 2011 4:09 pm 
Stephen Montgomery-SmithSep 12, 2011 4:45 pm 
Doug BartonSep 12, 2011 5:31 pm 
Sahil TandonSep 12, 2011 6:13 pm 
Sergio de Almeida LenziSep 12, 2011 6:52 pm 
Michal VargaSep 13, 2011 2:10 am 
Tony McSep 13, 2011 4:12 am 
Stephen Montgomery-SmithSep 13, 2011 5:03 am 
Chad PerrinSep 13, 2011 6:29 am 
Oliver FrommeSep 13, 2011 7:11 am 
Matthias AndreeSep 13, 2011 9:52 am 
Michal VargaSep 13, 2011 12:26 pm 
Ruslan MahmatkhanovSep 13, 2011 12:46 pm 
Sam CassibaSep 13, 2011 1:04 pm 
Julien LaffayeSep 13, 2011 1:55 pm 
Stephen Montgomery-SmithSep 13, 2011 2:05 pm 
Matthias AndreeSep 13, 2011 3:19 pm 
per...@pluto.rain.comSep 14, 2011 12:52 am 
Baptiste DaroussinSep 14, 2011 12:55 am 
Christoph Moench-TegederSep 14, 2011 1:28 am 
Oliver FrommeSep 14, 2011 4:11 am 
Christopher J. RuweSep 14, 2011 9:15 am 
Tony McSep 14, 2011 11:28 am 
Chip CamdenSep 14, 2011 12:15 pm 
Łukasz WąsikowskiSep 15, 2011 10:00 am 
Chad PerrinSep 15, 2011 11:07 am 
Chad PerrinSep 15, 2011 11:36 am 
Łukasz WąsikowskiSep 15, 2011 11:45 am 
Łukasz WąsikowskiSep 15, 2011 12:35 pm 
Matthias AndreeSep 15, 2011 12:52 pm 
Chris ReesSep 15, 2011 1:08 pm 
Xin LISep 15, 2011 1:27 pm 
Chris ReesSep 15, 2011 2:00 pm 
Klaus T. AehligSep 15, 2011 11:24 pm 
Łukasz WąsikowskiSep 16, 2011 2:44 am 
Lev SerebryakovSep 16, 2011 2:51 am 
Klaus T. AehligSep 16, 2011 3:03 am 
Matthias AndreeSep 16, 2011 8:51 am 
EricSep 16, 2011 9:17 am 
Łukasz WąsikowskiSep 16, 2011 11:17 am 
Chris ReesSep 16, 2011 11:24 am 
Lev SerebryakovSep 16, 2011 11:33 am 
Łukasz WąsikowskiSep 16, 2011 12:37 pm 
Miroslav LachmanSep 16, 2011 12:41 pm 
Gabor KovesdanSep 16, 2011 1:00 pm 
Philip M. GollucciSep 16, 2011 1:20 pm 
Chris ReesSep 16, 2011 1:34 pm 
Matthias AndreeSep 17, 2011 2:08 am 
Peter PentchevSep 17, 2011 2:18 am 
Jos BackusSep 17, 2011 2:32 pm 
Łukasz WąsikowskiSep 18, 2011 1:41 pm 
Matthias AndreeSep 28, 2011 11:53 am 
Łukasz WąsikowskiSep 28, 2011 1:40 pm 
Matthias AndreeSep 28, 2011 2:11 pm 
Łukasz WąsikowskiSep 29, 2011 5:22 am 
Subject:Re: Re-starting daemons across upgrades?
From:Gabor Kovesdan (gab@FreeBSD.org)
Date:Sep 16, 2011 1:00:04 pm
List:org.freebsd.freebsd-ports

On 2011.09.16. 17:51, Matthias Andree wrote:

Am 16.09.2011 11:51, schrieb Lev Serebryakov:

Hello, Freebsd-ports. You wrote 16 сентября 2011 г., 0:28:07:

Really? I thought it was supposed to be standard behaviour- the @stopdaemon line in pkg-plist facilitates that.

While I totally understand why we do this, I have to say it's VERY VERY annoying behavior especially when one upgrading a remote system with multiple server daemon ports. One have to watch the whole process carefully and restart the daemon manually.

Yep, and even more annoyingly is that it is completely inconsistent: some daemons are stopped, some not, etc.

We do not currently have a standard procedure for that, nor do we record the necessary state -- perhaps we should just discuss, vote, and add a paragraph to the porter's handbook.

We also need to bring the authors (or volunteers) for the de-facto standard upgrade tools into the loop.

My thoughts:

- give the user a choice to configure whether to restart services

- optional: give the users a chance to configure this per-service

- discuss whether we want/need to support this (a) in the framework that we currently use, (b) only in pkgng, (c) in portmaster and portupgrade where necessary.

Or we could have a facility to check whether services are running. For example, I have some cron scripts, which are similar for all of the services that I'm watching. They run periodically and restart services if they are down. It does not matter if they are down because of an upgrade or a failure, so this solution is more general. Here's an example that I have for MySQL:

#!/bin/sh PID_FILE="/var/db/mysql/server.mypc.hu.pid" PID=`cat $PID_FILE` EXECUTABLE="/usr/local/etc/rc.d/mysql-server start"

if test -r $PID_FILE ; then # pidfile exist, is it correct? if kill -CHLD $PID >/dev/null 2>&1; then # ok, exit silently exit 0 fi rm -f $PID_FILE fi echo "" echo "Couldn't find the MySQL server running, retsarting.." echo "" $EXECUTABLE

Gabor