Bug 1121409

Summary: Offline update failed
Product: [Fedora] Fedora Reporter: Giovanni Campagna <scampa.giovanni>
Component: PackageKitAssignee: Richard Hughes <rhughes>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 21CC: awilliam, bugzilla, jonathan, kalevlember, mcatanzaro+wrong-account-do-not-cc, rdieter, rhughes, robatino, satellitgo, scampa.giovanni, smparrish
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-10-08 16:14:32 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1043124    
Attachments:
Description Flags
f21-Alpha TC6 Workstation PackageKit fails none

Description Giovanni Campagna 2014-07-20 14:11:38 UTC
Description of problem:
Offline updates fail if a the PackageKit database is refreshed after downloading updates, because the downloaded packages are cleaned.

Version-Release number of selected component (if applicable):
PackageKit-0.9.3-1.fc21.x86_64

How reproducible:
Always

Steps to Reproduce:
1. pkcon update --only-download
2. Verify that /var/cache/PackageKit/metadata/fedora/packages is not empty
3. pkcon refresh
4. pkcon offline-trigger
5. reboot
6. Wait until offline updates fail
7. Observe that /var/cache/PackageKit/metadata/fedora/packages is empty

Actual results:
/var/lib/PackageKit/offline-update-competed contains
[PackageKit Offline Update Results]
Success=false
ErrorDetails=cannot download Packages/k/kernel-3.16.0-0.rc5.git1.1.fc21.x86_64.rpm to /var/cache/PackageKit/metadata/fedora/packages/: Curl error: Couldn't resolve host name for https://mirrors.fedoraproject.org/metalink?repo=fedora-21&arch=x86_64
ErrorCode=internal-error

Expected results:
System updates fine without requiring network access, all packages are used from the previous (online) download.

Additional info:

Proposing as a beta blocker under the criterion:

The installed system must be able to download and install updates with the default graphical package manager in all release-blocking desktops.

Comment 1 Giovanni Campagna 2014-07-20 14:13:26 UTC
Forgot to mention, the backend is hif, with libhif-0.1.1-1.fc21.x86_64 and librepo-1.7.5-1.fc21.x86_64

Comment 2 Fedora Blocker Bugs Application 2014-07-20 14:15:57 UTC
Proposed as a Blocker for 21-beta by Fedora user gcampax using the blocker tracking app because:

 Violates criterion:

The installed system must be able to download and install updates with the default graphical package manager in all release-blocking desktops.

Comment 3 Richard Hughes 2014-07-28 17:15:08 UTC
Refreshing will clear the "ready to go" status of the offline updates. Manually doing the low-level "pkcon offline-trigger" will just set the file telling systemd to do into a special mode at startup, it won't actually prepare the offline update again. What did you expect to happen?

Comment 4 Giovanni Campagna 2014-07-29 12:36:01 UTC
Well, the bug was first reproduced with gnome-software (I prepared the updated, clicked reboot & install updates, and it did not actually update because there were no rpms in the cache).
What I gave in the summary is a small cmdline reproducer that takes gnome-shell/gnome-software out of the equation.
FWIW pkcon refresh does not remove the /var/lib/PacakegeKit/prepared-update file that gnome-shell checks to trigger updates, which is why it tries to update (as shown in the error file) rather than just ignoring the system-update target and rebooting.

Comment 5 Chris Murphy 2014-08-18 22:58:37 UTC
Is bug 1127510 a dup of this one? I can't tell if offline updates fail due to a PK or systemd bug. But both methods to initiate fail:
- Software > Updates > Restart & Install
- Gnome desktop click on upper right corner triangle, click on power button > check Install pending software updates > click restart

Comment 6 satellitgo 2014-09-06 16:08:31 UTC
Created attachment 935038 [details]
f21-Alpha TC6 Workstation PackageKit fails

Comment 7 satellitgo 2014-09-06 16:15:10 UTC
#yum update works on same files. But All Settings/Details [Check for Updates] still shows "Restart & Install". After restart still shows all files needing update.

Comment 8 satellitgo 2014-09-06 16:18:42 UTC
(In reply to satellit from comment #7)
> #yum update works on same files. But All Settings/Details [Check for
> Updates] still shows "Restart & Install". After restart still shows all
> files needing update.

ABRT System: caribou-0.4.14-1.fc21 killed by SIGABRT
report: retrace server is unable to process package caribou-0.4.14-1.fc21.x86_64

Comment 9 Adam Williamson 2014-10-03 17:06:51 UTC
Discussed at 2014-10-03 blocker review meeting: http://meetbot.fedoraproject.org/fedora-blocker-review/2014-10-03/f21-blocker-review.2014-10-03-15.58.log.txt . We're inclined to accept this as a blocker, but we weren't clear on just how common it is. Is it likely to happen on all/most update attempts or just occasionally?

Comment 10 Kalev Lember 2014-10-03 21:32:38 UTC
(In reply to Giovanni Campagna from comment #4)
> FWIW pkcon refresh does not remove the /var/lib/PacakegeKit/prepared-update
> file that gnome-shell checks to trigger updates, which is why it tries to
> update (as shown in the error file) rather than just ignoring the
> system-update target and rebooting.

This works correctly with PackageKit 1.0.0 that's in F21 -- 'pkcon refresh' now definitely removes the /var/lib/PacakegeKit/prepared-update file.

Also, we've redone the offline updates triggering mechanism and gnome-shell 3.14 no longer checks for the prepared-update file, but instead uses a new packagekit dbus api for offline updates. This should make the whole process much more robust.

I don't think the scenario described in comment #0 can happen any more.

Comment 11 Adam Williamson 2014-10-08 16:14:32 UTC
Discussed at 2014-10-08 blocker review meeting: http://meetbot.fedoraproject.org/fedora-blocker-review/2014-10-08/f21-blocker-review.2014-10-08-15.58.log.txt . We checked with Kalev and he confirmed that c#10 means that he believes the issue is addressed and the bug can be closed. He asks that anyone still running into problems with offline updates in F21 file a new bug.