Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.

Bug 1514877

Summary: updating to fedora 27 tries refresh packages
Product: [Fedora] Fedora Reporter: Aleksandar Kostadinov <akostadi>
Component: dnf-plugins-extrasAssignee: rpm-software-management
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 27CC: dmach, extras-orphan, ignatenko, jkadlcik, jmracek, mblaha, misc, neil, rpm-software-management, vmukhame
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-11-30 09:56:41 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Description Aleksandar Kostadinov 2017-11-19 06:38:50 UTC
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

Comment 1 Michael S. 2017-11-24 19:13:11 UTC
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 ?

Comment 2 neil 2017-11-30 00:36:41 UTC
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.

Comment 3 Marek Blaha 2017-11-30 09:56:41 UTC

*** This bug has been marked as a duplicate of bug 1492036 ***