Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 11 Sep 2010 17:21:56 -0700
From:      Jeremy Chadwick <freebsd@jdc.parodius.com>
To:        Wesley Shields <wxs@FreeBSD.org>
Cc:        jpaetzel@FreeBSD.org, ports@FreeBSD.org, Ion-Mihai Tetcu <itetcu@FreeBSD.org>, Norikatsu Shigemura <nork@FreeBSD.org>
Subject:   Re: [ports/net/isc-dhcp*] Don't stop DHCP related daemons
Message-ID:  <20100912002156.GA995@icarus.home.lan>
In-Reply-To: <20100912000928.GA9073@atarininja.org>
References:  <20100911222902.bb57444a.nork@FreeBSD.org> <20100911173359.68d71af6@it.buh.tecnik93.com> <20100912000928.GA9073@atarininja.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, Sep 11, 2010 at 08:09:28PM -0400, Wesley Shields wrote:
> On Sat, Sep 11, 2010 at 05:33:59PM +0300, Ion-Mihai Tetcu wrote:
> > On Sat, 11 Sep 2010 22:29:02 +0900
> > Norikatsu Shigemura <nork@FreeBSD.org> wrote:
> > 
> > > Hi wxs and jpaetzel.
> > > 
> > > 	I noticed that dhcpd server stoped after portupgrade,
> > > sometimes. It's a painful accident on my network.  Because I didn't
> > > notice some troubles:-(.
> > > 
> > > 	Why do you stop the daemons? Is it really absolutely necessary
> > > 	to stop a service before it's files go away?
> > > 
> > > 	SEE ALSO:
> > > 	http://www.freebsd.org/doc/en_US.ISO8859-1/books/porters-handbook/rc-scripts.html#AEN5402
> > > 
> > > $ grep forcestop isc-dhcp*/pkg-plist
> > > isc-dhcp31-relay/pkg-plist:@unexec %D/etc/rc.d/isc-dhcrelay.sh
> > > forcestop 2>/dev/null || true isc-dhcp31-relay/pkg-plist:@unexec
> > > %D/etc/rc.d/isc-dhcrelay forcestop 2>/dev/null || true
> > > isc-dhcp31-server/pkg-plist:@unexec %D/etc/rc.d/isc-dhcpd.sh
> > > forcestop 2>/dev/null || true isc-dhcp31-server/pkg-plist:@unexec
> > > %D/etc/rc.d/isc-dhcpd forcestop 2>/dev/null || true
> > > isc-dhcp41-relay/pkg-plist:@unexec %D/etc/rc.d/isc-dhcrelay.sh
> > > forcestop 2>/dev/null || true isc-dhcp41-relay/pkg-plist:@unexec
> > > %D/etc/rc.d/isc-dhcrelay forcestop 2>/dev/null || true
> > > isc-dhcp41-server/pkg-plist:@unexec %D/etc/rc.d/isc-dhcpd forcestop
> > > 2>/dev/null || true
> > > 
> > > 	I want to remove these lines in pkg-plist.
> > 
> > This 'stop the service before we install' seems to be a new fashion,
> > usually unneeded/disruptive.
> > IMO this should only happen when it's really needed, and with some big
> > warning printed.
> 
> This is there because that is how the old ISC ports were done. I'm not a
> fan of this at all. If it doesn't break upgrades I'm going to remove it.
> 
> Ports/packages should keep their grubby little hands off my services. ;)

This "problem" affects more than just ISC-related ports.  It's scattered
all over many, and probably for a good reason.

Has anyone taken the time to actually study how the daemon behaves in
all possible circumstances if you pull certain files out from underneath
it?  Meaning, pkg_delete might delete/clean up something that the daemon
relies upon.  For example, with regards to isc-dhcp, has anyone checked
the implications of removing the files it does with the daemon still
running?  Have they tested such with all configuration (e.g. LDAP in
use)?  For example, I know that with postfix if you let the daemon
remain running when pkg_delete'ing the software, it starts freaking out
whenever any mail I/O happens.  And what about ports like
mysqlXX-server?  You get my point.

I'm actually in favour of having ports ***not*** touch services at all,
but I want to be absolutely sure people aren't jumping the gun claiming
"oh it's totally safe" when there's a good chance it might not be.

But to play devil's advocate once again: this discussion started because
the OP uninstalled or upgraded a port which made use of a daemon, which
was (possibly rightfully so) shut down during pkg_delete, and he forgot
to restart the daemon.  No offence intended, but what administrator
upgrades software (a service nonetheless) and then walks away from his
computer?  Please think about that for a while too, and ask yourself if
catering to this mentality through software (ports framework) is a good
idea.

-- 
| Jeremy Chadwick                                   jdc@parodius.com |
| Parodius Networking                       http://www.parodius.com/ |
| UNIX Systems Administrator                  Mountain View, CA, USA |
| Making life hard for others since 1977.              PGP: 4BD6C0CB |




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20100912002156.GA995>