Bug 1343389

Summary: [RFE] needs-restarting should give a hint if reboot is required
Product: Red Hat Enterprise Linux 6 Reporter: Eva Mrakova <emrakova>
Component: yum-utilsAssignee: Valentina Mukhamedzhanova <vmukhame>
Status: CLOSED WONTFIX QA Contact: BaseOS QE Security Team <qe-baseos-security>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.8CC: aperotti, brubisch, mdomonko, packaging-team-maint, shetze
Target Milestone: rcKeywords: FutureFeature
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: 1192946 Environment:
Last Closed: 2016-07-25 14:21:34 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 Eva Mrakova 2016-06-07 09:05:20 UTC
Also happens for yum-utils-1.1.30-37.el6.noarch

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

Description of problem:
needs-restarting returns a list of PID's that have updated/deleted files open due to an previous package upgrade.

https://access.redhat.com/solutions/27943 gives recommendations when in such cases a reboot is mandatory.

needs-restarting should display information in such a way that enables users to decide upon this recommendation and even better give a hint if reboot is required.

Version-Release number of selected component (if applicable):
yum-utils-1.1.30-30.el6.noarch
yum-utils-1.1.31-25.el7_0.noarch

How reproducible:
call needs-restarting on a system with recently upgraded glibc, kernel, hald,...

Actual results:
needs-restarting 
623 : /usr/sbin/NetworkManager --no-daemon 
607 : /usr/sbin/rsyslogd -n 
606 : avahi-daemon: running [rhel7.local]
1083 : /sbin/rpc.statd 
626 : avahi-daemon: chroot helper
752 : /usr/bin/python /usr/bin/gunicorn --access-logfile - --debug --max-requests 100 --graceful-timeout 3600 -t 3600 -k gevent -b 0.0.0.0:5000 -w 8 docker_registry.wsgi:application 
748 : /usr/bin/python /usr/bin/gunicorn --access-logfile - --debug --max-requests 100 --graceful-timeout 3600 -t 3600 -k gevent -b 0.0.0.0:5000 -w 8 docker_registry.wsgi:application 
763 : /usr/bin/python /usr/bin/gunicorn --access-logfile - --debug --max-requests 100 --graceful-timeout 3600 -t 3600 -k gevent -b 0.0.0.0:5000 -w 8 docker_registry.wsgi:application 
454 : /usr/lib/systemd/systemd-journald 
576 : /sbin/auditd -n 
661 : /sbin/iprdump --daemon 
4263 : /usr/lib/systemd/systemd-udevd 
2091 : -bash 
656 : /usr/lib/polkit-1/polkitd --no-debug 
691 : /sbin/dhclient -d -sf /usr/libexec/nm-dhcp-helper -pf /var/run/dhclient-eth0.pid -lf /var/lib/NetworkManager/dhclient-23d97fc4-ee0d-47db-9ce5-e701835ab9ca-eth0.lease -cf /var/lib/NetworkManager/dhclient-eth0.conf eth0 
808 : /usr/bin/python /usr/bin/gunicorn --access-logfile - --debug --max-requests 100 --graceful-timeout 3600 -t 3600 -k gevent -b 0.0.0.0:5000 -w 8 docker_registry.wsgi:application 
1 : /usr/lib/systemd/systemd --system --deserialize 27 
732 : /usr/bin/python /usr/bin/gunicorn --access-logfile - --debug --max-requests 100 --graceful-timeout 3600 -t 3600 -k gevent -b 0.0.0.0:5000 -w 8 docker_registry.wsgi:application 
631 : /sbin/agetty --noclear tty1 
609 : /usr/sbin/irqbalance --foreground 
610 : /usr/bin/python /usr/bin/gunicorn --access-logfile - --debug --max-requests 100 --graceful-timeout 3600 -t 3600 -k gevent -b 0.0.0.0:5000 -w 8 docker_registry.wsgi:application 
461 : /usr/sbin/lvmetad -f 
614 : /bin/dbus-daemon --system --address=systemd: --nofork --nopidfile --systemd-activation 
608 : /usr/bin/python -Es /usr/sbin/tuned -l -P 
4232 : /usr/sbin/crond -n 
1516 : /usr/libexec/postfix/master -w 
783 : /usr/bin/python /usr/bin/gunicorn --access-logfile - --debug --max-requests 100 --graceful-timeout 3600 -t 3600 -k gevent -b 0.0.0.0:5000 -w 8 docker_registry.wsgi:application 
945 : /usr/sbin/sshd -D 
942 : /sbin/rpcbind -w  
2087 : sshd: root@pts/0     
725 : /usr/bin/python /usr/bin/gunicorn --access-logfile - --debug --max-requests 100 --graceful-timeout 3600 -t 3600 -k gevent -b 0.0.0.0:5000 -w 8 docker_registry.wsgi:application 
1519 : qmgr -l -t unix -u 
644 : /sbin/iprupdate --daemon 
646 : /sbin/iprinit --daemon 
801 : /usr/bin/python /usr/bin/gunicorn --access-logfile - --debug --max-requests 100 --graceful-timeout 3600 -t 3600 -k gevent -b 0.0.0.0:5000 -w 8 docker_registry.wsgi:application 
923 : /usr/bin/docker -d --selinux-enabled -H fd:// -H tcp://0.0.0.0:2375

Expected results:
needs-restarting -r
1 : glibc /usr/lib64/libnss_files-2.17.so -- /usr/lib/systemd/systemd --system --deserialize 27 
454 : glibc /usr/lib64/libpthread-2.17.so -- /usr/lib/systemd/systemd-journald 
461 : glibc /usr/lib64/librt-2.17.so -- /usr/sbin/lvmetad -f 
576 : glibc /usr/lib64/libnss_files-2.17.so -- /sbin/auditd -n 
606 : glibc /usr/lib64/libnss_files-2.17.so -- avahi-daemon: running [rhel7.local]
607 : glibc /usr/lib64/libc-2.17.so -- /usr/sbin/rsyslogd -n 
608 : systemd-libs /usr/lib64/libudev.so.1.4.0 -- /usr/bin/python -Es /usr/sbin/tuned -l -P 
609 : glibc /usr/lib64/libpthread-2.17.so -- /usr/sbin/irqbalance --foreground 
610 : glibc /usr/lib64/libresolv-2.17.so -- /usr/bin/python /usr/bin/gunicorn --access-logfile - --debug --max-requests 100 --graceful-timeout 3600 -t 3600 -k gevent -b 0.0.0.0:5000 -w 8 docker_registry.wsgi:application 
614 : glibc /usr/lib64/libnss_files-2.17.so -- /bin/dbus-daemon --system --address=systemd: --nofork --nopidfile --systemd-activation 
623 : NetworkManager /usr/lib64/NetworkManager/libnm-wwan.so -- /usr/sbin/NetworkManager --no-daemon 
626 : glibc /usr/lib64/libnss_files-2.17.so -- avahi-daemon: chroot helper
631 : glibc-common /usr/lib/locale/locale-archive -- /sbin/agetty --noclear tty1 
644 : glibc /usr/lib64/libc-2.17.so -- /sbin/iprupdate --daemon 
646 : glibc /usr/lib64/libc-2.17.so -- /sbin/iprinit --daemon 
656 : glibc /usr/lib64/libnss_files-2.17.so -- /usr/lib/polkit-1/polkitd --no-debug 
661 : glibc /usr/lib64/libc-2.17.so -- /sbin/iprdump --daemon 
691 : glibc /usr/lib64/libnss_files-2.17.so -- /sbin/dhclient -d -sf /usr/libexec/nm-dhcp-helper -pf /var/run/dhclient-eth0.pid -lf /var/lib/NetworkManager/dhclient-23d97fc4-ee0d-47db-9ce5-e701835ab9ca-eth0.lease -cf /var/lib/NetworkManager/dhclient-eth0.conf eth0 
725 : libyaml /usr/lib64/libyaml-0.so.2.0.4 -- /usr/bin/python /usr/bin/gunicorn --access-logfile - --debug --max-requests 100 --graceful-timeout 3600 -t 3600 -k gevent -b 0.0.0.0:5000 -w 8 docker_registry.wsgi:application 
732 : libyaml /usr/lib64/libyaml-0.so.2.0.4 -- /usr/bin/python /usr/bin/gunicorn --access-logfile - --debug --max-requests 100 --graceful-timeout 3600 -t 3600 -k gevent -b 0.0.0.0:5000 -w 8 docker_registry.wsgi:application 
748 : libyaml /usr/lib64/libyaml-0.so.2.0.4 -- /usr/bin/python /usr/bin/gunicorn --access-logfile - --debug --max-requests 100 --graceful-timeout 3600 -t 3600 -k gevent -b 0.0.0.0:5000 -w 8 docker_registry.wsgi:application 
752 : libyaml /usr/lib64/libyaml-0.so.2.0.4 -- /usr/bin/python /usr/bin/gunicorn --access-logfile - --debug --max-requests 100 --graceful-timeout 3600 -t 3600 -k gevent -b 0.0.0.0:5000 -w 8 docker_registry.wsgi:application 
763 : libyaml /usr/lib64/libyaml-0.so.2.0.4 -- /usr/bin/python /usr/bin/gunicorn --access-logfile - --debug --max-requests 100 --graceful-timeout 3600 -t 3600 -k gevent -b 0.0.0.0:5000 -w 8 docker_registry.wsgi:application 
783 : libyaml /usr/lib64/libyaml-0.so.2.0.4 -- /usr/bin/python /usr/bin/gunicorn --access-logfile - --debug --max-requests 100 --graceful-timeout 3600 -t 3600 -k gevent -b 0.0.0.0:5000 -w 8 docker_registry.wsgi:application 
801 : libyaml /usr/lib64/libyaml-0.so.2.0.4 -- /usr/bin/python /usr/bin/gunicorn --access-logfile - --debug --max-requests 100 --graceful-timeout 3600 -t 3600 -k gevent -b 0.0.0.0:5000 -w 8 docker_registry.wsgi:application 
808 : libyaml /usr/lib64/libyaml-0.so.2.0.4 -- /usr/bin/python /usr/bin/gunicorn --access-logfile - --debug --max-requests 100 --graceful-timeout 3600 -t 3600 -k gevent -b 0.0.0.0:5000 -w 8 docker_registry.wsgi:application 
923 : glibc /usr/lib64/librt-2.17.so -- /usr/bin/docker -d --selinux-enabled -H fd:// -H tcp://0.0.0.0:2375 
942 : glibc /usr/lib64/libnss_files-2.17.so -- /sbin/rpcbind -w  
945 : glibc /usr/lib64/libnss_files-2.17.so -- /usr/sbin/sshd -D 
1083 : glibc /usr/lib64/libnss_files-2.17.so -- /sbin/rpc.statd 
1516 : glibc /usr/lib64/libnss_files-2.17.so -- /usr/libexec/postfix/master -w 
1519 : glibc /usr/lib64/libnss_files-2.17.so -- qmgr -l -t unix -u 
2087 : systemd-libs /usr/lib64/security/pam_systemd.so -- sshd: root@pts/0     
2091 : glibc /usr/lib64/libnss_files-2.17.so -- -bash 
4232 : glibc-common /usr/lib/locale/locale-archive -- /usr/sbin/crond -n 
4263 : selinux-policy-targeted /etc/selinux/targeted/contexts/files/file_contexts.bin -- /usr/lib/systemd/systemd-udevd 

  Caution!
  Kernel or core library packages have been updated!
  Reboot required!
  See https://access.redhat.com/solutions/27943 for details.


Additional info:
added a new option -r (--reboothint) to needs-restarting.py that adds the desired output.
Patches for RHEL6 and RHEL7 are attached.

Comment 1 Valentina Mukhamedzhanova 2016-07-25 14:21:34 UTC
Red Hat Enterprise Linux version X is entering the Production 2 phase of its lifetime and this bug doesn't meet the criteria for it, i.e. only high severity issues will be fixed. Please see https://access.redhat.com/support/policy/updates/errata/ for further information.