needrestart 3.0

needrestart checks which daemons need to be restarted after library upgrades. It is inspired by checkrestart from the debian-goodies package.

needrestart supports but does not require systemd. If systemd is not available or does not return a service name needrestart uses hooks to identify the corresponding System V init script. If a process inside a container (LXC, docker) it suggests to restart the entire container. needrestart contains a heuristic for different interpreter languages: it tries to detect if outdated script code/modules are in use (Java, Perl, Python, Ruby).

Changes in 3.0

  • Features:
  • [Core] Possible to suspend needrestart in apt-get hook using the NEEDRESTART_SUSPEND environment variable. (github issue #71 by Ludovic Gasc @GMLudo et. al.)
  • [Core] Possible to override the configured restart mode using the NEEDRESTART_MODE environment variable. (Debian Bug#866105 by Marc Haber mh+debian-bugs@zugschlus.de)
  • [uCode] Check for pending Intel microcode updates. (Debian Bug#886445 by Paul Wise pabs@debian.org)
  • Changes:
  • [Core] Do not try to restart service units with RefuseManualStop=yes. (github issue #75 by Marc Dequènes @duck-rh)
  • [Kernel] Try to adopt RPM’s version sorting to get most recent kernel. (github issue #73 by Maximilian Gaß @mxey)
  • [Core] Tune blacklist_mappings default setting to match on deleted maps.
  • [UI] Respect verbosity in UI::stdio, just like UI::Debconf. (github pull request #88 by @guillaume-uH57J9)
  • [Core] Improve output formating. (github issue #84 by Stavros Ntentos @stdedos)
  • [Core] Improve container detection to skip kernel and microcode checks.
  • Fixes:
  • [Core] Makefile: Fix installation of restart.d/ scripts. (Debian Bug#851866 by Sven Hartge sven@svenhartge.de)
  • [Core] Fix warning in Perl 5.20.x, not triggered in 5.24.x in needrestart.conf (Oil Runtime Compiler’s JIT files). (patch by Patrick Matthäi (Debian))
  • [Core] Do not restart oneshot services. (Debian Bug#862840 by Alan Jenkins alan.christopher.jenkins@gmail.com)
  • [Core] Ignore rc-local.service. (Debian Bug#852864 by Paul Wise pabs@debian.org)
  • [Core] Do not restart libvirt by default. (github issue #69 by Craig Andrews @candrews)
  • [Interp/Perl] Add missing cwd restore before a return. (github issues #55 and #70 Craig Andrews @candrews and Stefan Bühler @stbuehler)
  • [Core] README.md: Fix spelling. (github issue #74 by Edward Betts @EdwardBetts)
  • [Core] Add bird to override. (github issue #78 by Björn Lässig @Farom)
  • [Interp/(Perl|Python)] Use absolute paths used to search the package of a script file. (github issue #79 by Christopher Odenbach @odenbach)
  • [Hook] Use rpm -q —filesbypkg rather than rpmquery. (github issue #81 by Sven Hartge @shartge)
  • [CONT] Detect docker container ns running not on systemd.
  • [CONT] Ignore processes running inside docker containers. (github issue #80 by Christopher Odenbach @odenbach)
  • [Core] Ignore special filename mappings used by recent versions of KDE plasmashell. (github issue #65 by @GoTeamAnt) (Debian Bug#879091 by Paul Wise pabs@debian.org)
  • [Core] Fix handling of library mappings if target does not exist. (github issue #58 by @pigen) (Debian Bug#878700 by Richard Hector richard@walnut.gen.nz)
  • [Hook] Fix handling of multiarch packages. (github issue #56 by @mayasd)
  • [Interp] Ignore interpreter processes with unreachable root fs (i.e. in different mnt ns). (github issue #72 by Stefan Bühler @stbuehler)
  • [Core] Add missing unnamed device major numbers (fix for OpenVZ). (Debian Bug#876452 by Piotr Pańczyk piotr.panczyk@assecobs.pl)
  • [UI] Do not call GetTerminalSize() if STDOUT is not a TTY. (Debian Bug#859387 by by Paul Wise pabs@debian.org) (github issues #85 and #86 by @guillaume-uH57J9)
  • [UI] Fix switch from interactive to list mode if debconf is run noninteractive. (Debian Bug#876459 by Piotr Pańczyk piotr.panczyk@assecobs.pl)
  • [man] Add documentation on restart mode if run non-interactive. (Debian Bug#842512 by Antoine Beaupré anarcat@debian.org)
  • [Core] Ignore some Java false positives (JNA, JFFI). (github pull request #89 by Maximilian Gaß @mxey) (github issue #60 by @ge-fa)
  • [Core] Output NRPE message “root needed” on stdout. (github pull request #91 by @nirgal)
  • [Core] Use override_cont when querying containers. (github pull request #94 by Nigel Kukard @nkukard)
  • [Core] Do not restart docker by default.
  • [Core] Fix typo in man page. (Debian Bug#885448 by Paul Wise pabs@debian.org)
  • [Interp] Fix perl warning if cwd is unreachable. (github issue #99 by @glitsj16)
  • [Hook] Replace remaining calls of rpmquery by rpm. (github issue #100 by Matthias Hörmann @taladar)
  • [Core] Fix additional unit detection in dbus restart handler. (github issue #104 by Alexander Barton @alexbarton)

See also


Comments !