Bug 1213985 - [rfe] add equivalent of "random_sleep" to dnf-automatic
Summary: [rfe] add equivalent of "random_sleep" to dnf-automatic
Alias: None
Product: Fedora
Classification: Fedora
Component: dnf
Version: 22
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
Assignee: Packaging Maintenance Team
QA Contact: Fedora Extras Quality Assurance
Depends On:
TreeView+ depends on / blocked
Reported: 2015-04-21 17:13 UTC by Gerd v. Egidy
Modified: 2015-06-21 00:16 UTC (History)
7 users (show)

Fixed In Version: dnf-1.0.1-2.fc22
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2015-06-21 00:16:19 UTC
Type: Bug

Attachments (Terms of Use)

System ID Private Priority Status Summary Last Updated
FreeDesktop.org 82084 0 'medium' 'RESOLVED' 'RFE: Allow for random startup delay (or even spread) in timer units' 2019-11-18 15:34:14 UTC

Description Gerd v. Egidy 2015-04-21 17:13:31 UTC
Currently I use yum-cron to let a bunch of servers automatically update themselves from a local mirror of the repositories. 

I have set the timing a bit more on the aggressive side: I want all servers to be up to date within one hour after updating the repository. But I do not want all servers to update at the same minute, because the repository mirror would be overloaded, and in case of VM guests, the VM host hosting the guests too.

So currently I schedule yum-cron every hour (01 * * * *) and have the option "random_sleep = 60" set in the yum-cron config. Also I have set "metadata_expire=10m" in my repository configuration to make sure no old data is used there.

The "random_sleep"-option distributes the start times of the updates randomly over the hour. This works well in practice and I used a similar technique with yum-updatesd before that was retired.

dnf-automatic.timer uses


That makes the start time dependent on boot time. This is not the same as true randomness, because in case of a vm, all guests are autostarted when the host is up. Also after a power outage or scheduled power maintenance, all servers in the whole server room are started within a few minutes. So boot time is not distributed randomly enough.

So please add an equivalent of random_sleep to dnf-automatic.

Comment 1 Honza Silhan 2015-04-29 10:59:22 UTC
Thanks for the report. Valid use case.

Comment 2 Gerd v. Egidy 2015-06-07 20:42:48 UTC
Maybe it would make more sense to implement this at the systemd.timers level as other programs would also profit from this functionality then.

Relevant Systemd RFE: https://bugs.freedesktop.org/show_bug.cgi?id=82084

Comment 3 Fedora Update System 2015-06-12 09:05:38 UTC
dnf-1.0.1-2.fc22 has been submitted as an update for Fedora 22.

Comment 4 Fedora Update System 2015-06-14 17:33:36 UTC
Package dnf-1.0.1-2.fc22:
* should fix your issue,
* was pushed to the Fedora 22 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing dnf-1.0.1-2.fc22'
as soon as you are able to.
Please go to the following url:
then log in and leave karma (feedback).

Comment 5 Gerd v. Egidy 2015-06-15 19:57:58 UTC
Thank you for implementing this. I have tried dnf-1.0.1-2 and it works like expected.

Comment 6 Fedora Update System 2015-06-21 00:16:19 UTC
dnf-1.0.1-2.fc22 has been pushed to the Fedora 22 stable repository.  If problems still persist, please make note of it in this bug report.

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