Bug 36277 - apt-get update failes to update some Packages files
apt-get update failes to update some Packages files
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: Security updates
UCS 3.2
All Linux
: P3 normal (vote)
: UCS 3.2-3-errata
Assigned To: Philipp Hahn
Stefan Gohmann
:
Depends on: 35986 36329
Blocks: 36241
  Show dependency treegraph
 
Reported: 2014-10-22 18:49 CEST by Philipp Hahn
Modified: 2014-10-31 20:20 CET (History)
5 users (show)

See Also:
What kind of report is it?: ---
What type of bug is this?: ---
Who will be affected by this bug?: ---
How will those affected feel about the bug?: ---
User Pain:
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional): Troubleshooting
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Philipp Hahn univentionstaff 2014-10-22 18:49:58 CEST
+++ This bug was initially created as a clone of Bug #35986 +++
Since the update "apt-get update" fails some times to update a Packages file:
> W: Fehlschlag beim Holen von http://univention-repository.knut.univention.de/3.2/maintained/component/3.2-2-errata/all/Packages.gz  400  Bad Request
> W: Fehlschlag beim Holen von http://univention-repository.knut.univention.de/3.2/maintained/component/3.2-2-errata/i386/Packages.gz  400  Bad Request
> E: Einige Indexdateien konnten nicht heruntergeladen werden, sie wurden ignoriert oder alte an ihrer Stelle benutzt.

Downloading the same URL using wget works without a problem.
Manually deleting the downloaded file and re-running the command also 'fixes' it.

Looking at omar:/var/log/apache2/appcenter_access.log show that the request go to the wrong VirtualHost. Bug #30488 did not fix it.
Running the following command shows a strange HTTP request:

$ apt-get -o Acquire::http::Pipeline-Depth=1 -o Debug::Acquire::http=true update 2>&1 | less
...
GET /3.2/maintained/component/3.2-3-errata/all/Packages.gz HTTP/1.1
Host: univention-repository.knut.univention.de
Connection: keep-alive
Cache-Control: max-age=0
GET /3.2/maintained/component/3.2-3-errata/all/Packages.gz HTTP/1.1
Host: univention-repository.knut.univention.de
Connection: keep-alive
Cache-Control: max-age=0
Range: bytes=17401-
If-Range: Thu, 16 Oct 2014 09:08:54 GMT
User-Agent: UCS - 3.2-3 errata221 - fee3bb9b-869e-48f6-ba9b-6720be710086 - 8d95ed24-7edf-495e-8c31-33ccbda3ec3f - DH
,KV,S4,UV,XR


Wireshark also show this strange request to go out as this:

GET /3.2/maintained/component/3.2-3-errata/all/Packages.gz HTTP/1.1
Host: univention-repository.knut.univention.de
Connection: keep-alive
Cache-Control: max-age=0
GET /3.2/maintained/component/3.2-3-errata/all/Packages.gz HTTP/1.1
Host: univention-repository.knut.univention.de
Connection: keep-alive
Cache-Control: max-age=0
Range: bytes=17401-
If-Range: Thu, 16 Oct 2014 09:08:54 GMT
User-Agent: UCS - 3.2-3 errata221 - fee3bb9b-869e-48f6-ba9b-6720be710086 - 8d95ed24-7edf-495e-8c31-33ccbda3ec3f - DH,KV,S4,UV,XR

HTTP/1.1 400 Bad Request
Date: Wed, 22 Oct 2014 16:25:59 GMT
Server: Apache/2.2.16 (Univention) PHP/5.3.3-7.202.201408071002 with Suhosin-Patch mod_ssl/2.2.16 OpenSSL/0.9.8o
Content-Length: 535
Connection: close
Content-Type: text/html; charset=iso-8859-1

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>400 Bad Request</title>
</head><body>
<h1>Bad Request</h1>
<p>Your browser sent a request that this server could not understand.<br />
Request header field is missing ':' separator.<br />
<pre>
GET /3.2/maintained/component/3.2-3-errata/all/Packages.gz HTTP/1.1</pre>
</p>
<hr>
<address>Apache/2.2.16 (Univention) PHP/5.3.3-7.202.201408071002 with Suhosin-Patch mod_ssl/2.2.16 OpenSSL/0.9.8o Server at appcenter.knut.univention.de Port 80</address>
</body></html>
Comment 1 Moritz Muehlenhoff univentionstaff 2014-10-23 13:23:14 CEST
That's a regression in the recent apt security update:
https://lists.debian.org/debian-lts-announce/2014/10/msg00002.html
Comment 2 Philipp Hahn univentionstaff 2014-10-28 17:36:35 CET
$ repo_admin.py -U -d squeeze-lts -p apt -r 3.2-0-0 -s errata3.2-3

While <https://packages.debian.org/squeeze-lts/apt> only lists squeeze6, this already imports 0.8.10.3+squeeze7, which also fixes a 2nd regression <https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=710924>

Package: apt
Version: 0.8.10.3.68.201410281638
Branch: ucs_3.2-0
Scope: errata3.2-3

r55042 | Bug #36277 APT: Regression YAML
  2014-10-28-apt.yaml


For QA:
# apt-get install apt{,-utils}=0.8.10.3.63.201409241744
# timeout 2s apt-get -d {--re,}install linux-image-3.10.0-ucs81-amd64-dbg
# apt-get -d {--re,}install linux-image-3.10.0-ucs81-amd64-dbg
Err http://univention-repository.knut.univention.de/3.2/maintained/component/ 3.2-3-errata/amd64/ linux-image-3.10.0-ucs81-amd64-dbg 3.10.11-1.81.201409041448
  400  Bad Request
# apt-get install apt{,-utils}=0.8.10.3.68.201410281638
# apt-get -d {--re,}install linux-image-3.10.0-ucs81-amd64-dbg
Comment 3 Stefan Gohmann univentionstaff 2014-10-29 07:10:08 CET
ucs-test: OK

YAML: OK
@Janek, we released apt last time also for 3.2-1, -2 and -3. Thus I think it is OK to release it again for these versions. Feel free to change it to the maintained version only.

Code review: OK

UCS 4.0 merge: In UCS 4 we have already 0.9.7.9+deb7u6. I'm unable to reproduce the issue with this version.

Reproduction: OK

Test:
 - Installation: OK
 - Updates: OK
 - App Center installation: OK
Comment 4 Janek Walkenhorst univentionstaff 2014-10-30 14:14:12 CET
http://errata.univention.de/ucs/3.2/230.html