Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.

Bug 1901921

Summary: no possibility to configure needs-restarting
Product: [Fedora] Fedora Reporter: ocs
Component: dnf-plugins-coreAssignee: nsella
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 34CC: dmach, jmracek, mblaha, nsella, packaging-team-maint, pkratoch, praiskup, rpm-software-management, vmukhame
Target Milestone: ---Keywords: Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: dnf-plugins-core-4.0.22-1.fc35 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-06-15 07:21:11 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 ocs 2020-11-26 12:33:47 UTC
Description of problem:

no possibility to configure needs-restarting

I found this problem in CentOS 8

this:
https://github.com/rpm-software-management/yum-utils/issues/36
is still an issue

Version-Release number of selected component (if applicable):


How reproducible: and execute:
needs-restarting


Steps to Reproduce:
1. install any non baseOS kernel (eg: elrepo kernel-ml)
2. execute needs-restarting
3.

Actual results:
No core libraries or services have been updated since boot-up.
Reboot should not be necessary.

Expected results:
Some message saying that a reboot is necessary


Additional info:
https://github.com/rpm-software-management/yum-utils/issues/36

Comment 1 nsella 2020-12-07 11:30:59 UTC
Hello, I think the issue can be addressed by, this[1] already released.
I added the missing documentation.[2] You can add packages that need to be restarted in configuration

Example: echo "packagename" > /etc/dnf/plugins/needs-restarting.d/packagename.conf

[1] https://github.com/rpm-software-management/dnf-plugins-core/pull/391
[2] https://github.com/rpm-software-management/dnf-plugins-core/pull/417/

Comment 2 Ben Cotton 2021-02-09 16:17:33 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 34 development cycle.
Changing version to 34.

Comment 3 nsella 2021-06-02 07:47:27 UTC
Hello, is there any update on the solution I proposed from #comment 1? Does it work for you?
Thank you

Comment 4 ocs 2021-06-09 09:56:16 UTC
Yes! Sorry for not providing feedback
This works like charm:
]# cat /etc/dnf/plugins/needs-restarting.d/kernel-ml.conf
kernel-ml

thank you very much

This is not related to the bug, but it is to the topic:
I also have modified the following file to prevent default kernel updates to modify grup boot priorities. (so kernel-ml is always the default boot)

]# cat /etc/sysconfig/kernel
# UPDATEDEFAULT specifies if kernel-install should make
# new kernels the default
UPDATEDEFAULT=yes

# DEFAULTKERNEL specifies the default kernel package type
#DEFAULTKERNEL=kernel-core
DEFAULTKERNEL=kernel-ml

Comment 5 Fedora Update System 2021-06-15 07:21:11 UTC
FEDORA-2021-78c5f8c03d has been pushed to the Fedora 35 stable repository.
If problem still persists, please make note of it in this bug report.