apt-cacher continues to download index files even if disk is full, wasting bandwidth
Bug #291748 reported by
Peter Matulis
This bug affects 2 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
apt-cacher (Debian) |
Fix Released
|
Unknown
|
|||
apt-cacher (Ubuntu) |
Fix Released
|
Medium
|
Unassigned |
Bug Description
Binary package hint: apt-cacher
The problem:
When a client machine attempts an update (typically automatically) apt-cacher continues to download index files ('Release' and 'Packages') even if the disk/partition is full, thus wasting bandwidth. Given that apt-cacher is usually implemented to save bandwidth this behaviour should be changed.
Expected behaviour:
When deprived of space apt-cacher should cease to download files and display an appropriate message to the client.
Version affected (at least):
apt-cacher 1.5.5
Changed in apt-cacher: | |
status: | Unknown → New |
Changed in apt-cacher (Ubuntu): | |
importance: | Undecided → Medium |
status: | New → Triaged |
Changed in apt-cacher (Debian): | |
status: | New → Fix Released |
To post a comment you must log in.
Tested on Jaunty with apt-cacher version 1.6.7ubuntu2, and the behavior is more or less the same.
Basically, when a client request an index file, apt-cacher will start to download it, and pass it through to the client as it trickle in. Eventually, it will fail to write to disk and close the connection to the client abruptly. apt on the client will retry the download indefinitely.
The problem is really two-fold.
On one hand, apt-cacher should indeed handle running out of disk space gracefully. That would require non-trivial code change to apt-cacher. It could, for example, refuse to download a file if there is less than a certain amount of space left on the file system its cache is stored on, and return HTTP 500 Internal Error.
On the other hand, the problem is exacerbated by apt on the client retrying the download forever. There is no way to change this behavior (see Debian bug #119544, and LP #310262). If apt could be configured to limit the number of time it retries fetching an index file, the problem would at least be mitigated.