Description of problem: If you don't immediately upgrade reboot after package download, then dnf will try to refresh packages after reboot. What I did on a fedora 26 was > sudo dnf system-upgrade download --refresh --releasever=27 > # shutdown machines during the night > sudo dnf system-upgrade reboot Then dnf crashed with > Nov 19 07:27:15 koTak systemd[1]: Starting System Upgrade using DNF... > Nov 19 07:27:20 koTak dnf[1049]: Error: Failed to synchronize cache for repo 'updates' > Nov 19 07:27:20 koTak systemd[1]: dnf-system-upgrade.service: Main process exited, code=exited, status=1/FAILURE > Nov 19 07:27:20 koTak systemd[1]: Failed to start System Upgrade using DNF. > Nov 19 07:27:20 koTak systemd[1]: dnf-system-upgrade.service: Unit entered failed state. > Nov 19 07:27:20 koTak systemd[1]: dnf-system-upgrade.service: Failed with result 'exit-code'. How reproducible: Reproduces on the two machines I updated. Version: dnf-2.7.5-1.fc26.noarch Steps to Reproduce: 1. sudo dnf system-upgrade download --refresh --releasever=27 2. sudo dnf system-upgrade reboot # but shutdown machine for several hours 3. power on machine Actual results: dnf tries to refresh repo data and packages (failed for me at this point in boot process) Expected results: dnf upgrades packages offline without doing network connections
So I do have the same problem, but I do reboot immediatly. While searching for this error, I also stumbled on a few others report: https://bugzilla.redhat.com/show_bug.cgi?id=1514754 https://bugzilla.redhat.com/show_bug.cgi?id=1514633 https://bugzilla.redhat.com/show_bug.cgi?id=1513111 My investigation did lead me to disabling this: https://github.com/rpm-software-management/dnf-plugin-system-upgrade/blob/master/system_upgrade.py#L484 In turn, this mark the repo as lazy: https://github.com/rpm-software-management/dnf/blob/master/dnf/cli/cli.py#L744 and so they do not expire in this method (Repo.load): https://github.com/rpm-software-management/dnf/blob/master/dnf/repo.py#L883 In the end, i wonder if that's not related to check_config_file_age, and some weird interaction between the age of the repo file and the age of the cache. Can you try to disable check_config_file_age and upgrade ?
I had the same problem today. Saw from dnf.log that the system-upgrade was trying to get online and failing. After running 'dnf system-upgrade download --refresh --releasever=27' again, then 'sudo dnf system-upgrade reboot' immediately, the upgrade proceeded without failure.
*** This bug has been marked as a duplicate of bug 1492036 ***