#676509 please add restart-services to debian-goodies

#676509#5
Date:
2012-06-07 13:15:10 UTC
From:
To:
Michal Fiala (Cc'ed), has created a restart-services script that takes
the output of checkrestart and restarts the indicated services.

Please include it in debian-goodies.

A forked debian-goodies that includes restart-services lives here:

http://github.com/tpo/debian-goodies

Thanks,
*t

#676509#10
Date:
2012-10-22 13:02:35 UTC
From:
To:
Hi Tomas,

Tomas Pospisek wrote:

Thanks for the addition. I'll have a closer look after the freeze.

		Regards, Axel

#676509#15
Date:
2012-10-23 05:07:43 UTC
From:
To:
Thanks. Also restart-services has been discussed here:

http://lists.debian.org/debian-devel/2012/06/msg00592.html

and has some interesting ideas.
*t

#676509#20
Date:
2012-10-23 08:24:00 UTC
From:
To:
Hi Thomas,

Tomas Pospisek wrote:

Thanks for this hint.

Indeed. I was thinking about some of them, too. However I came to the
conclusion that there are quite some cases where automatic restarts
are no good idea. The mentioned login managers and some GNOME stuff
for example.

So I'm fine with debian-goodies as its place, especially because it
fits to checkrestart.

But I'm also fine, if someone (possibly also later) will make its own
package out of it or incorporate it into some package of higher
priority.

		Regards, Axel

#676509#29
Date:
2014-04-14 06:34:53 UTC
From:
To:
Dear Alex,

in the light of last week's heartbleed-bug the inclusion of restart-services should be reconsidered. When doing automated updates with

apt-get update && apt-get -y upgrade

neither Apache, nor Nginx were restarted properly after updating OpenSSL. Thomas's script provides a tested solution. To address the problems with login managers or GNOME stuff there could be an optional setting to whitelist those.

Please consider the inclusion of this part of the script. With it, users could simply do

apt-get update && apt-get -y upgrade && restart-services

in the future and get updates quicker.

Thank you,

Manuel Riel

#676509#34
Date:
2014-04-14 09:05:21 UTC
From:
To:
Hi,

Manuel Riel wrote:

It though won't help for stable where this issue is mostly present.

Have a look at the package needrestart in testing. I currently
consider it the better solution as such functionality (running as APT
hook) should be packaged separately anyway.

		Regards, Axel

#676509#39
Date:
2014-04-14 09:27:24 UTC
From:
To:
(...)

Already users can use 'checkrestart' to determine which services to restart
after upgrading OpenSSL. I've used this succesfully in a few servers I had
to update due to last week's heartbleed bug.

Automatically restarting all services is dangerous (as mentioned by Axel in
this bug report) and should be done with care. Users using the
'restart-services' script might believe to be completely safe after a
security the case when that might not be true if checkrestart had a
false-positive.

I personally would prefer administrators to carefully review checkrestart
output and take action rather than blindly run a script.  I do see the
value of the script (for those managing many machines) howerver.


In any case, since 'needrestart' already exists, isn't it possible to join
both tools? As this approach (automatically restarting services) is prone
to bugs (just look at [1]) in the long run it would make more sense to have
1 tool than to duplicate the functionality and, consequently, the bugs that
might arise.

Regards

Javier


[1]
https://bugs.debian.org/cgi-bin/pkgreport.cgi?pkg=needrestart;dist=unstable

#676509#44
Date:
2014-04-14 10:17:59 UTC
From:
To:
Hi,

Javier Fernandez-Sanguino wrote:

I did that mostly with the "libs" test of the hobbit-plugins package.
We found a few issue while doing so, so that one isn't perfect either.
(Didn't really expect anything else. :-)

That's one of the reasons why I think that such functionality should
be in its own package, i.e. we should not deploy an APT hook for
restart-services.

needrestart by default shows a list of services via a debconf-like
TUI interface and you can decided which of the proposed services
should be really restarted.

I fear not. needrestart was written with the knowledge that
checkrestart exists, but works differently. From it's package
description:

  It is inspired by checkrestart from the debian-goodies package. It
  does not rely on lsof as checkrestart does.

Similarily, the hobbit-plugins test "libs" is written in Perl as it
relies on a Perl-written client library for the Hobbit/Xymon
monitoring system.

Needrestart is written in Perl, too, but using a common library is not
an option either, as the hobbit tests don't run as root and lsof is
called via sudo which needrestart doesn't use lsof and needs to be run
as root as far as I can see.

So to make the hobbit libs test be build on top of checkrestart, a
hobbit client library in Python needs to be written. (And I must
admit, I do prefer Perl over Python as programming language, so I
won't rewrite a Perl written tool which I maintain in Python.)
Alternatively checkrestart needs a clear API to be properly used by
other tools.

Agreed, but I currently don't see a chance for that unless there's a
documented and stable API.

		Regards, Axel

#676509#49
Date:
2015-03-15 11:18:38 UTC
From:
To:
Hello everybody,
was just looking at this today and wondered if it got any further.

Cheers,

Andrea

#676509#54
Date:
2015-03-15 11:47:09 UTC
From:
To:
Hi,

Andrea Villa wrote:

From my point of view, in the meanwhile there are already enough tools
in Debian which are specificly written for automatic restarts
(needrestart, whatmaps, etc.). So I don't think that debian-goodies --
which so far only provided commandline tools and no APT hooks --
should provide another implementation of that feature.

Please have a look at needrestart which works very well for me. (I
haven't looked or worked closer at whatmaps, so I can't give a
recommendation there. But that doesn't mean that it worse than
needrestart, so you may want to look at it, too.)

		Regards, Axel