Bug 1431058

Summary: [RFE] needs-restarting script should provide more verbose output
Product: Red Hat Enterprise Linux 7 Reporter: Karel Srot <ksrot>
Component: yum-utilsAssignee: Packaging Maintenance Team <packaging-team-maint>
Status: CLOSED WONTFIX QA Contact: BaseOS QE Security Team <qe-baseos-security>
Severity: low Docs Contact:
Priority: medium    
Version: 7.4CC: dmach, packaging-team-maint, vmukhame
Target Milestone: rcKeywords: FutureFeature
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: 1262688 Environment:
Last Closed: 2018-09-24 12:45:32 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Karel Srot 2017-03-10 09:26:48 UTC
Cloning for RHEL-7

+++ This bug was initially created as a clone of Bug #1262688 +++

Description of problem:

The needs-restarting script output only lists processes that should be restarted but doesn't provide any information about dependencies that actually caused that the restart is needed. 

E.g.:
  4674 : ./testprog

Please introduce a more verbose output (-v option) that would provide information about the dependencies. ATM I am using similar change for debugging purposes on various places of the code:

                if float(pkg.installtime) > float(pid_start):
                    needing_restart.add(pid)
                    found_match = True
+                   print "debug: %s needs restart due to usage of %s from %s" % (pid, just_fn, pkg.name)
                    continue
                if just_fn in pkg.ghostlist:
                    bogon = True

but a more user friendly option would be better. E.g. to have an output as:

  4674 : ./testprog  due to /path/to/library/consumed from libtestpkg-1.0-1

or more compact

  4674 : ./testprog (/path/to/library/consumed from libtestpkg-1.0-1)

or just (as it is easy to find an appropriate package later)

  4674 : ./testprog (/path/to/library/consumed)

Comment 1 Daniel Mach 2018-09-24 12:45:28 UTC
devel_ack- as there's no customer case attached.

Comment 2 Red Hat Bugzilla Rules Engine 2018-09-24 12:45:32 UTC
Development Management has reviewed and declined this request. You may appeal this decision by reopening this request.