Hide Forgot
Description of problem: dnf-automatic.timer is supposed to automatically update the system. When I resume from suspend after the scheduled update time, dnf-automatic.timer expectedly runs. However, because NetworkManager is still busy to connect to the wifi, the service/timer fails: ● dnf-automatic.service - dnf automatic Loaded: loaded (/usr/lib/systemd/system/dnf-automatic.service; static; vendor preset: disabled) Active: failed (Result: exit-code) since Mon 2020-03-23 18:52:26 GMT; 6min ago Process: 519426 ExecStart=/usr/bin/dnf-automatic /etc/dnf/automatic.conf --timer (code=exited, status=1/FAILURE) Main PID: 519426 (code=exited, status=1/FAILURE) CPU: 1.744s Mar 23 18:52:24 carmenbianca-thinkpad systemd[1]: Starting dnf automatic... Mar 23 18:52:26 carmenbianca-thinkpad dnf-automatic[519426]: Errors during downloading metadata for repository 'updates-modular': Mar 23 18:52:26 carmenbianca-thinkpad dnf-automatic[519426]: - Curl error (6): Couldn't resolve host name for https://mirrors.fedoraproject.org/metal> Mar 23 18:52:26 carmenbianca-thinkpad dnf-automatic[519426]: Eraro: Failed to download metadata for repo 'updates-modular': Cannot prepare internal mir> Mar 23 18:52:26 carmenbianca-thinkpad systemd[1]: dnf-automatic.service: Main process exited, code=exited, status=1/FAILURE Mar 23 18:52:26 carmenbianca-thinkpad systemd[1]: dnf-automatic.service: Failed with result 'exit-code'. Mar 23 18:52:26 carmenbianca-thinkpad systemd[1]: Failed to start dnf automatic. Mar 23 18:52:26 carmenbianca-thinkpad systemd[1]: dnf-automatic.service: Consumed 1.744s CPU time. Version-Release number of selected component (if applicable): dnf-4.2.18-1.fc31.rpm How reproducible: Steps to Reproduce: 1. systemctl enable --now dnf-automatic.timer 2. suspend the system until after the scheduled update 3. resume from suspend 4. systemctl status dnf-automatic.service Actual results: The update failed because of a lack of internet connectivity. Expected results: The timer waits for internet connectivity to become available. Additional info:
Hi, dnf-automatic waits until system reach network-online.target. This should assure that network connection is available and dnf can proceed with downloading updates. For some reason it looks like in your case this target is reached before the network connectivity is available. If you are able to reproduce the bug please can you check / post here system journal with unsuccessful dnf-automatic run? Do you have some special network configuration?
There is no special network configuration. Just Fedora Workstation 31 running on a laptop with wifi connectivity. The only "special" thing is that I have told NetworkManager to automatically connect to a VPN. But on my work laptop, of which I don't think I can share the logs, the same thing happens, and there is no VPN. Attaching logs of a boot with an unsuccessful run.
Created attachment 1675973 [details] System journal of session with failed dnf-automatic.service
It turned out that dnf-automatic should not rely on network-online.target as reaching it does not guarantee network availability (it's more like the network configuration is finished). I'm working on the fix, but meanwhile you can try workaround - there is an option 'random_sleep' in /etc/dnf/automatic.conf. If you change it to some reasonable value (like 600 for 10 minutes), dnf-automatic will pause for random time in interval <0, random_sleep). This could give the NetworkManager some time to resume network connection. Sorry for inconvenience.
PR https://github.com/rpm-software-management/dnf/pull/1616 introduces waiting for functional internet connection before dnf-automatic starts to download repositories and updates.
FEDORA-2020-b40fc174b5 has been submitted as an update to Fedora 33. https://bodhi.fedoraproject.org/updates/FEDORA-2020-b40fc174b5
FEDORA-2020-5d9f0ce2b3 has been submitted as an update to Fedora 32. https://bodhi.fedoraproject.org/updates/FEDORA-2020-5d9f0ce2b3
FEDORA-2020-b40fc174b5 has been pushed to the Fedora 33 testing repository. In short time you'll be able to install the update with the following command: `sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2020-b40fc174b5` You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-b40fc174b5 See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.
FEDORA-2020-5d9f0ce2b3 has been pushed to the Fedora 32 testing repository. In short time you'll be able to install the update with the following command: `sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2020-5d9f0ce2b3` You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-5d9f0ce2b3 See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.
FEDORA-2020-5d9f0ce2b3 has been pushed to the Fedora 32 stable repository. If problem still persists, please make note of it in this bug report.
FEDORA-2020-b40fc174b5 has been pushed to the Fedora 33 stable repository. If problem still persists, please make note of it in this bug report.