Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 27 Jun 2018 11:58:17 +0200
From:      Mathieu Arnold <mat@FreeBSD.org>
To:        Miroslav Lachman <000.fbsd@quip.cz>
Cc:        freebsd-ports@freebsd.org
Subject:   Re: Should a package restart on upgrade itself
Message-ID:  <20180627095817.uvr3xgid4vflbmba@ogg.in.absolight.net>
In-Reply-To: <77549bbc-50b1-7635-2ca4-1ae229098506@quip.cz>
References:  <b71469f3-dd9d-6680-f85e-a7acfcf9d944@fechner.net> <595296BF.3040906@quip.cz> <77549bbc-50b1-7635-2ca4-1ae229098506@quip.cz>

next in thread | previous in thread | raw e-mail | index | archive | help

--exo422stywl27yxo
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Tue, Jun 26, 2018 at 01:27:49PM +0200, Miroslav Lachman wrote:
> Miroslav Lachman wrote on 2017/06/27 19:32:
> > Matthias Fechner wrote on 2017/06/27 18:29:
> > > Dear all,
> > >=20
> > > it is always a pain if pkg upgrade a lot of packages to restart all
> > > services to make sure update/security fixes are applied to all running
> > > services.
> > >=20
> > > Is there an option in pkg that it restart services automatically or is
> > > it OK if I would add a post-install script to the packages (I maintai=
n)
> > > that will include a "service foo restart"?
> > >=20
> > > What is best practice here?
> >=20
> > Please don't do this.
> > Some ports did this in the past and this was really a pain during larger
> > upgrades. It sometimes leave services stopped (hi MySQL).
> >=20
> > The same bad practice is disabling / enabling Apache modules on upgrade.
> >=20
> > pkg upgrade should just do it's work - upgrade packages on disk. But
> > manipulating config files and restart of services is up to me - the
> > Administrator (or my tools).
> >=20
> > It would be nice to have some kind of "hooks" in pkg, which can be used
> > to notify deployment tools that some services should be (re)started, or
> > do restart in some simpler environment if user allows this (setup hooks
> > for service restart).
> > But is must not be done automatically for individual ports / packages
> > even if maintainer thinks it is Good Idea (tm)
>=20
> Again and again and again...
>=20
> Can we have some written (or do we have?) policy to not stop/start/restart
> services from some @preunexec / @postexec targets?
> I really don't like that some packages are still shutting down or trying =
to
> restart in the middle of the pkg upgrade process.

There is a policy, it MUST NOT be done.

Services are stopped and started with the rc file they install, and pkg
does it when its configuration variable HANDLE_RC_SCRIPTS is set to
true.

Please point out to ports doing this so that they can be fixed.

--=20
Mathieu Arnold

--exo422stywl27yxo
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQJ8BAABCgBmBQJbM1+4XxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w
ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXQzQUI2OTc4OUQyRUQxMjEwNjQ0MEJBNUIz
QTQ1MTZGMzUxODNDRTQ4AAoJEDpFFvNRg85I3YIP/12col87XeUX9aMstKQgu+ck
Zu6dZFTjzX6jSwfctLK16VjD+G45y0MZV1WuTJi1le9I+pqL0b62v6/60KqMXjIL
gP4NoU6HPY2oD/VXQePdPk8N03dTS8t5t6v/pSwejHURZUsNXyvkV3q1TGmL23Xj
LMosls/hohZq8PX+7zwJ0ZV/cQUkhZ7O3bUy0O7cH0IWVTl94DbYwjUeMztTRDr1
KzwuR+PgveWcPtgIMKPQKTD+8wur3PsolnFLVsC85UNfLaIx8p4dsKUtB1qFbvsr
jWJ35DzculThZ4iPFMdFov8DbCDaivrqV8kMzMDyVMKcY0LKX+jpDMGlHx5EaYAl
UB9OZg2U5iZqpIhyGi9IVFasJsWdF8bWOVQPS07B/h19D8g+5+ws7BcPrzmYDhu8
kNwzE4Xuu1Hm8XylvyblKDH4ZQq6Ln0DgfJ1+Y89L4dIHjJBWfdIM5bhvUsZTILi
UIgboNIK7dRajaFsNEO67+PbhQGsXVAFQm5LpRQB7U3Q1WS8WcD04OSQ5rzsuvU4
eiy5kCfrpNwRkqQ1w1UYQyz2ba9x4L2c2dc/WstdAYZ395bD5jD1Yve21j/sTFgZ
JcmDqK7brkCGdOu+2TUZhSHDX9x/7w+1A/MqrEZfGt3ivxOt3drwnsRitG08iYPf
hcAS3eOTGOybFyjCmkO/
=xxWU
-----END PGP SIGNATURE-----

--exo422stywl27yxo--



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