RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1754609 - Modify default dnf-automatic unit timers
Summary: Modify default dnf-automatic unit timers
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: dnf
Version: 8.0
Hardware: All
OS: Linux
Target Milestone: rc
: 8.0
Assignee: Lukáš Hrázký
QA Contact: Luca Berton
Katerina Nemcova
Depends On:
TreeView+ depends on / blocked
Reported: 2019-09-23 17:21 UTC by Marion Levine
Modified: 2023-02-12 22:48 UTC (History)
9 users (show)

Fixed In Version: dnf-4.2.17-1.el8
Doc Type: Enhancement
Doc Text:
.All `dnf-automatic.timer` timer units now use the real-time clock by default Previously, the `dnf-automatic.timer` timer units used the monotonic clock, which resulted in unpredictable activation time after the system boot. With this update, the timer units run between 6 a.m. and 7 a.m. If the system is off during that time, the timer units are activated within one hour after the system boot.
Clone Of:
Last Closed: 2020-04-28 16:48:13 UTC
Type: Bug
Target Upstream Version:

Attachments (Terms of Use)

System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker RHELPLAN-30217 0 None None None 2023-02-12 22:48:43 UTC
Red Hat Product Errata RHBA-2020:1823 0 None None None 2020-04-28 16:48:54 UTC

Description Marion Levine 2019-09-23 17:21:56 UTC
1. Proposed title of this feature request

Modify default dnf-automatic unit timers

3. What is the nature and description of the request?

Define a consistent and easy to calculate timing for updates.

Customer is looking for an explicit time for the dnf action to be executed rather than a time that drifts.  See below example from ubuntu:

+Description=Daily apt upgrade and clean activities
+OnCalendar=*-*-* 6:00

4. Why does the customer need this? (List the business requirements here)

- Avoid update disruption during business hours
- Have a consistent time window for updates

5. How would the customer like to achieve this? (List the functional requirements here)

- Provide a Realtime systemd unit timers
- Take into consideration what other distributions are doing
  - Ubuntu initial issue: https://bugs.launchpad.net/ubuntu/+source/apt/+bug/1615482
  - This one superseded  the initial bug report: https://bugs.launchpad.net/ubuntu/+source/apt/+bug/1686470
  - Ubuntu: https://git.launchpad.net/ubuntu/+source/apt/diff/debian/apt-daily-upgrade.timer?id=3d836b543ba7ac236d999ff7b0b4dcf5d87b71cf
  - Debian: https://salsa.debian.org/apt-team/apt/commit/b4f32b13055287d2ac46a08255db475af195b5f7

6. For each functional requirement listed, specify how Red Hat and the customer can test to confirm the requirement is successfully implemented.

- Check system timer is within the expected time window on the next execution.

7. Is there already an existing RFE upstream or in Red Hat Bugzilla?


8. Does the customer have any specific timeline dependencies and which release would they like to target (i.e. RHEL5, RHEL6)?


9. Is the sales team involved in this request and do they have any additional input?


10. List any affected packages or components.


11. Would the customer be able to assist in testing this functionality if implemented?


Comment 2 Lukáš Hrázký 2019-11-05 15:26:56 UTC
FTR I'll say that any single timer configuration is unlikely to suit everyone and a customer can configure the timers to fit their needs.

That said, having deterministic timing is certainly better than nondeterministic. With regards to the time to use as the default, I don't have a better guidance than what was posted in the description and as that is used in Debian/Ubuntu as well, I've used the exact same configuration:

OnCalendar=*-*-* 6:00

PR: https://github.com/rpm-software-management/dnf/pull/1521

Comment 5 Lukáš Hrázký 2019-11-26 14:45:53 UTC
Eva, I see no reason to have different timing on the various timers we provide. The timers differ in what operation they perform, providing the user with a choice of the operation they want to perform on the timed event. Regardless of whether the user wants to notify only, download or install, the timing should be consistent between the timers, IMO.

As I've stated, it is well possible the change will be disruptive to someone. Our approach should be to provide the best default and let users change it in case they really need to. I've evaluated the requested change to be better enough than what we had before to change the default, but this is obviously subjective... :)

FWIW there's also this bug against monotonic timers: https://bugzilla.redhat.com/show_bug.cgi?id=1648785 I think realtime timers are better in general.

Comment 10 Lukáš Hrázký 2020-01-07 15:30:38 UTC
Katerina, I'd just mention the time is _random_ between 6 and 7 am, just to be more explicit about it. If you think it's redundant it's fine by me. Otherwise it's good.

Comment 12 Carl George 🤠 2020-01-23 22:42:48 UTC
This has been resolved in CentOS 8 Stream.


Please test this and provide feedback if you're able.

Comment 13 troy.engel 2020-01-24 15:09:47 UTC
@Carl I'm unable to do a full, proper test right now (nothing handy is running Stream yet to get all the other dnf upgrades required) but I manually pulled down the RPM, expanded it and at least confirm the timer in the new RPM matches the content in this ticket as expected. +1

# wget https://mirrors.edge.kernel.org/centos/8-stream/BaseOS/x86_64/os/Packages/dnf-automatic-4.2.17-3.el8.noarch.rpm
# rpm2cpio dnf-automatic-4.2.17-3.el8.noarch.rpm | cpio -idmv
# cat ./usr/lib/systemd/system/dnf-automatic.timer
Description=dnf-automatic timer
# See comment in dnf-makecache.service

OnCalendar=*-*-* 6:00


Comment 15 Lukáš Hrázký 2020-02-21 13:07:31 UTC
Luca, I'm not entirely sure what you're asking for and also the versions of dnf-automatic for the apssing and failing tests confuse me, the old one is failing and the new one is passing.

If you're asking for how to fix the test, the test is obviously testing for the contents of the timer files, so you can just update the test with the new contents of the file (for whatever is such a test good for).


Comment 20 errata-xmlrpc 2020-04-28 16:48:13 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.


Note You need to log in before you can comment on or make changes to this bug.