Hide Forgot
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: +[Unit] +Description=Daily apt upgrade and clean activities +After=apt-daily.timer + +[Timer] +OnCalendar=*-*-* 6:00 +RandomizedDelaySec=60m +Persistent=true + +[Install] +WantedBy=timers.target 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? No 8. Does the customer have any specific timeline dependencies and which release would they like to target (i.e. RHEL5, RHEL6)? RHEL 8 9. Is the sales team involved in this request and do they have any additional input? No 10. List any affected packages or components. dnf-automatic 11. Would the customer be able to assist in testing this functionality if implemented? Yes
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: [Timer] OnCalendar=*-*-* 6:00 RandomizedDelaySec=60m Persistent=true PR: https://github.com/rpm-software-management/dnf/pull/1521
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.
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.
This has been resolved in CentOS 8 Stream. https://lists.centos.org/pipermail/centos-devel/2020-January/036500.html Please test this and provide feedback if you're able.
@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 [Unit] Description=dnf-automatic timer # See comment in dnf-makecache.service ConditionPathExists=!/run/ostree-booted Wants=network-online.target [Timer] OnCalendar=*-*-* 6:00 RandomizedDelaySec=60m Persistent=true [Install] WantedBy=multi-user.target
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). Cheers.
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. https://access.redhat.com/errata/RHBA-2020:1823