Bug 2124793

Summary: automatic reboot in dnf-automatic in RHEL 9
Product: Red Hat Enterprise Linux 9 Reporter: Anand <niramali>
Component: dnfAssignee: Evan Goode <egoode>
Status: VERIFIED --- QA Contact: swm-qe
Severity: unspecified Docs Contact: Mariya Pershina <mpershin>
Priority: medium    
Version: 9.0CC: chhuang, egoode, james.antill, jcastran, jwright, klaas, mbanas, mpershin, nsella, peacepenguin, web
Target Milestone: rcKeywords: FutureFeature, Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: dnf-4.14.0-6.el9 Doc Type: Enhancement
Doc Text:
Add ability in DNF Automatic to automatically trigger a reboot after an upgrade. Users of DNF Automatic can now set their system to automatically reboot to apply upgrades. The `reboot` option supports three settings: ``never`` does not reboot the system (current behavior). ``when-changed`` triggers a reboot after any upgrade. ``when-needed`` triggers a reboot only when rebooting is necessary to apply changes, such as when systemd or the kernel is upgraded. The `reboot_command` option allows customizing the command used to reboot (default is `shutdown -r`).
Story Points: ---
Clone Of: Environment:
Last Closed: 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 Anand 2022-09-07 06:38:08 UTC
Description of problem:

Customer is asking for an enhanced feature in RHEL 9 / RHEL 8 with following options,

1) reboot on any changes occurred 
2) reboot when dnf needs-restarting suggests to reboot
3) do not reboot (current behavior)

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

dnf

Comment 1 Anand 2022-09-07 06:44:13 UTC
Sale force case # 03303685

Customer has requested for enhanced feature 

currently dnf-automatic does not support an automatic reboot after applying upgrades. Please implement this.
There is a BZ for this already that is against fedora https://bugzilla.redhat.com/show_bug.cgi?id=1491190 please open one against rhel 8/9 and make a note of customer interest in this.

options I would like to have:
1) reboot on any changes
2) reboot when dnf needs-restarting suggests to reboot
3) do not reboot (current behaviour)

Comment 2 Evan Goode 2023-01-17 20:04:01 UTC
I've started work on this feature here: https://github.com/rpm-software-management/dnf/pull/1879.

Comment 3 Evan Goode 2023-01-26 14:40:32 UTC
https://github.com/rpm-software-management/dnf/pull/1879 has been merged! See the docs for the `reboot` and `reboot_command` options in https://github.com/rpm-software-management/dnf/blob/master/doc/automatic.rst.

Comment 5 peacepenguin 2023-02-24 19:30:12 UTC
Looks like the needed feature has been merged to the repo, and docs too. Can we update this bug with an expected target version of arrival in RHEL, maybe/hopefully 9.2?