Cache fails to save files correctly when using archive.ubuntu.com

Bug #1358883 reported by Da Xue
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
apt-cacher (Ubuntu)
New
Undecided
Unassigned

Bug Description

After priming the cache, turning on offline mode results in "503 Unable to download in offline mode" errors because the cached files do not match in size in the .head files.

Revision history for this message
Da Xue (daxue) wrote :

It's a problem due to archive.ubuntu.com instead of us.archive.ubuntu.com. It's simply not liking it.

To get around the issue, delete your existing cache, and set the us.archive.ubuntu.com for all references instead of just archive.ubuntu.com.

Da Xue (daxue)
summary: - Offline Mode fails due to Bad Cache
+ Cache fails to save files correctly when using archive.ubuntu.com
Revision history for this message
Rolf Leggewie (r0lf) wrote :

acng does not have an offline mode, I suspect you are referring to apt-cacher. Generally, your problem is not well-described and thus hard to reproduce.

affects: apt-cacher-ng (Ubuntu) → apt-cacher (Ubuntu)
Revision history for this message
Eduard Bloch (edi-gmx) wrote :

It does have offline mode (has been there almost from the start). What I don't understand is the exact action behind "priming the cache". The explanation also does not make sense - in offline mode, it wouldn't attempt to make an online connection so it would not know that the size differs.

If I find some spare time, I could test the repro steps from #1 in an Ubuntu chroot but don't expect much.

Revision history for this message
Da Xue (daxue) wrote :

I use it mainly for caching packages and doing offline installs from the repository. When I use archive.ubuntu.com, it only does partial saves of the files. I haven't had a chance to debug more thoroughly.

Steps to replicate:

Set archives to archive.ubuntu.com
Turn OFF offline-mode
Prime cache by installing few packages
Turn ON offline-mode
Try to install the same packages on a different instance

It's alleviated when you use us.archive.ubuntu.com so it's not a blocker.

Hope this helps.

Revision history for this message
Da Xue (da-t) wrote :

Rolf, please move this bug back to apt-cacher-ng. This is not an apt-cacher bug. There is indeed a bug where the the .head file provides the content size and the regular files don't get cached properly.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.