Bug 1213985 - [rfe] add equivalent of "random_sleep" to dnf-automatic
[rfe] add equivalent of "random_sleep" to dnf-automatic
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: dnf (Show other bugs)
22
Unspecified Unspecified
low Severity unspecified
: ---
: ---
Assigned To: packaging-team-maint
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-04-21 13:13 EDT by Gerd v. Egidy
Modified: 2015-06-20 20:16 EDT (History)
7 users (show)

See Also:
Fixed In Version: dnf-1.0.1-2.fc22
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-06-20 20:16:19 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
FreeDesktop.org 82084 None None None Never

  None (edit)
Description Gerd v. Egidy 2015-04-21 13:13:31 EDT
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

OnBootSec=1h
OnUnitInactiveSec=1d

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 06:59:22 EDT
Thanks for the report. Valid use case.
Comment 2 Gerd v. Egidy 2015-06-07 16:42:48 EDT
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 05:05:38 EDT
dnf-1.0.1-2.fc22 has been submitted as an update for Fedora 22.
https://admin.fedoraproject.org/updates/dnf-1.0.1-2.fc22
Comment 4 Fedora Update System 2015-06-14 13:33:36 EDT
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:
https://admin.fedoraproject.org/updates/FEDORA-2015-10004/dnf-1.0.1-2.fc22
then log in and leave karma (feedback).
Comment 5 Gerd v. Egidy 2015-06-15 15:57:58 EDT
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-20 20:16:19 EDT
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.