2015-01-20 12:17:21

Project Tracer: what you should restart after "dnf upgrade"

Every time you update your system, your currently running applications should be restarted otherwise you will be still running those old binaries before the update.

You have 3 options how to resolve it:

  1. You ignore it completely and you patiently wait until your system crash.
  2. Do Offline Updates.
  3. After restart you carefully restart only those applications and daemons, which needs to be restarted.

I really dislike Offline Updates as I see no reason for going offline for dozens of minutes. And there is only few scripts which helps you when you want to follow option 3. Most famous is needs-restarting from yum-utils. But the output is very ... ehm ... unfriendly. And it is very slow.

Therefore I initiated work on a project, which would provide feasible solution. Student Jakub Kadlčík from Palacký University created program Tracer.

This program is already in Fedora and provides plugin for DNF. You can try it by:

dnf install dnf-plugin-tracer

and read through User Guide.

EDIT: The package was renamed to python-dnf-plugins-extras-tracer

How it works

Tracer divides application into several groups:

  1. Applications which can not be restarted - e.g. dbus-daemon, systemd, at-spi-bus-launcher. You need to restart whole machine. There is no need bother you by printing those applications and Tracer just let you know that some of them have been updated and you should restart machine.
  2. Applications which are run by Windows Manager and can not be restared. To restart those applications you have to log off and log in again. E.g. plasma-desktop, X, kwalletd. Again - no need to list them. Tracer just suggest you to restart you WM session.
  3. Applications which can be easily restarted. Typically this is all daemons: sendmail, cups, libvirtd, ntpd etc. They can be easily restarted by service foo restart. But into this group belong e.g dropbox, which can be restarted by dropbox stop; dropbox start. Tracer will tell you how to restart those applications.
  4. Everything remaining. You are on your own how to restart those.

Tracer have database of application's classification.

Additionally Tracer is smart enough to not consider some applications as application. E.g. Although akonadi_agent_launcher is listed in ps as application it is always child of akonadi_control and should be restarted by restarting its parent process. Therefore restarting of akonadi_agent_launcher is basicaly transition to restarting of akonadi_control.

When you put all rules together, then the list of application to be restarted is usually very short (or result to "you should restart computer anyway"). And important part is that Tracer will tell you how to restart those application, because you likely do not know how to restart e.g. Akonadi from top of your head.

Please try it. Keep in mind that this is first public release and although we done our best, there may be some glitches. We would like to read you feedback on msuchy@redhat.com or frostyx@email.cz. And if you find some bug, you can report is on GitHub or in Fedora Bugzilla.

Posted by Miroslav Suchý | Permanent link
comments powered by Disqus