Uploaded image for project: 'RHEL'
  1. RHEL
  2. RHEL-56137

dnf needs-restarting needs filter for "not services"

    • No
    • None
    • rhel-sst-cs-software-management
    • ssg_core_services
    • None
    • False
    • Hide

      None

      Show
      None
    • None
    • Red Hat Enterprise Linux
    • None
    • None

      What were you trying to do that didn't work?

      RHEL 10 recently removed tracer, so I am looking for how to replace its functionality in Cockpit. We used tracer to determine what needs to happen after applying OS updates:

      1. Nothing, just continue
      2. Restart outdated systemd services
      3. Show outdated processes which are not managed by systemd, and offer to reboot
      4. Reboot due to a kernel (or low-level package like dbus) update
      5. Not reboot if a kernel update came via a kpatch

      1. and 2. are covered by dnf needs-restarting This is about 3., which the current version cannot do.

      Please provide the package NVR for which bug is seen:

      dnf-plugins-core-4.7.0-5.el10.noarch

      How reproducible: Always

      Steps to reproduce

      podman.service is an example where a package update does not restart the service in the RPM scripts (because reasons, that's ok). It times out on idle, so start it and keep it busy:

      systemctl start podman.socket
      while curl --unix-socket /run/podman/podman.sock http://nothing/v1.12/libpod/containers/json; do sleep 1; done
      

      Now you can follow

      journalctl -f -u podman.service

      to get the requests and see that it stays alive (but this isn't necessary for the reproducer)

      Now update podman:

      dnf update podman
      

      If the package is already up to date, you can also do

      dnf reinstall -y podman
      

      Now check

      dnf needs-restarting
      dnf needs-restarting --services
      dnf needs-restarting --useronly
      

      These are all the modes that exist, aside from --reboothint which works correctly.

      ‐‐services is correct, it outputs "podman.service". But the default mode and ‐‐useronly both show

      2489 : /usr/bin/podman --log-level=info system service
      

      But that is not useful – this is already covered by services. So we need a mode that filters the systemd-controlled processes from that list. I take it there was a reason to show all processes in that output, and by now it's established behaviour, so it may take a new mode/filter like --no-services?

              rh-ee-egoode Evan Goode
              rhn-engineering-mpitt Martin Pitt
              packaging-team-maint packaging-team-maint
              Eva Mrakova Eva Mrakova
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated: