Merge lp:~smoser/maas/packaging-lp1474417 into lp:~maas-maintainers/maas/packaging

Proposed by Scott Moser
Status: Merged
Approved by: Scott Moser
Approved revision: 418
Merged at revision: 417
Proposed branch: lp:~smoser/maas/packaging-lp1474417
Merge into: lp:~maas-maintainers/maas/packaging
Diff against target: 30 lines (+8/-1)
2 files modified
debian/changelog (+4/-0)
debian/extras/maas-proxy.conf (+4/-1)
To merge this branch: bzr merge lp:~smoser/maas/packaging-lp1474417
Reviewer Review Type Date Requested Status
Andres Rodriguez (community) Approve
Lee Trager (community) Approve
David Lawson (community) Approve
Michael Vogt Pending
Review via email: mp+264875@code.launchpad.net

Commit message

maas-proxy: sync apt specific squid config with squid-deb-proxy

This improves maas-proxy for handling apt specific files. And
generally syncs it up with squid-deb-proxy's config files.

Description of the change

maas-proxy: sync apt specific squid config with squid-deb-proxy

bug 1474417 raised the issue that Translation files in apt need to be
handled as Packages/Sources files. This lead me to just compare the
settings between squid-deb-proxy and maas-proxy for apt specific files.

The changes are (ordered generally by immediate importance):
 a.) consider Translation files
     upstream ubuntu mirrors started including Translation files in the
     Release file, which meant that apt started failing on hash sum
     mismatches of Translation-* files.
     That archive-mirror-side change to launchpad (bug 1313576)
     was one reason that people started seeing increased hash sum
     mismatches on 'apt-get update' on Translation-* files.
 b.) change parameters, and use 'refresh-ims'
     The use/lack-of-use of refresh-ims might have been by design in
     the maas proxy config. It seems like adding refresh-ims would
     definitely increase the number of connections that squid does
     to upstream mirrors.
     See http://www.squid-cache.org/Doc/config/refresh_pattern/
     for more info.
 c.) consider Release.gpg
     Release and Release.gpg have to be kept in sync, so Release.gpg
     should have the same rules applied to it as Release.
 d.) consider InRelease (inline signed release file, currently used by
     debian, hopefully to eventually be used by ubuntu and thus remove
     the race condition between Release and Release.gpg
 e.) consider Sources
     this would better handle sources files which would result in
     has sum mismatches on deb-src lines.
 f.) consider compression of bz2 or xz
     This change would affect debian or explicitly configured ubuntu
     systems more.
 g.) anchor the matches to a '/' reducing false positives

To post a comment you must log in.
Revision history for this message
Scott Moser (smoser) wrote :

Apparently the existing config came as recommendation from IS, so I've requested that IS review this change to it.

Revision history for this message
Michael Vogt (mvo) wrote :

I don't know much about MAAS but fwiw these are the proxy setings that squid-deb-proxy is also using.

Revision history for this message
David Lawson (deej) wrote :

+1

review: Approve
Revision history for this message
David Lawson (deej) wrote :

This looks completely reasonable, as smoser pointed out, translations have been handled inconsistently and you generally want to prefer IMS for static content like this whenever possible. I'm all in favor of these changes.

Revision history for this message
Lee Trager (ltrager) wrote :

LGTM!

review: Approve
Revision history for this message
Andres Rodriguez (andreserl) wrote :

Approved.

Scott, please create a backport branch to: lp:~maas-maintainers/maas/packaging-1.8

Thanks.

review: Approve
Revision history for this message
Christian Reis (kiko) wrote :

This looks low-risk enough for 1.7 even

Revision history for this message
Scott Moser (smoser) wrote :

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/changelog'
2--- debian/changelog 2015-07-13 18:13:33 +0000
3+++ debian/changelog 2015-07-15 16:26:24 +0000
4@@ -2,6 +2,10 @@
5
6 * UNRELEASED
7
8+ [ Scott Moser ]
9+ * maas-proxy: sync apt specific squid config with squid-deb-proxy
10+ (LP: #1474417)
11+
12 [ Raphaël Badin ]
13 * Enable proxy_wstunnel module.
14 * Drop dependency on python-iscpy: the code has been integrated into
15
16=== modified file 'debian/extras/maas-proxy.conf'
17--- debian/extras/maas-proxy.conf 2015-06-17 16:36:09 +0000
18+++ debian/extras/maas-proxy.conf 2015-07-15 16:26:24 +0000
19@@ -22,7 +22,10 @@
20 coredump_dir /var/spool/maas-proxy
21 refresh_pattern ^ftp: 1440 20% 10080
22 refresh_pattern -i (/cgi-bin/|\?) 0 0% 0
23-refresh_pattern (Release|Packages(.gz)*)$ 0 20% 2880
24+refresh_pattern \/Release(|\.gpg)$ 0 0% 0 refresh-ims
25+refresh_pattern \/InRelease$ 0 0% 0 refresh-ims
26+refresh_pattern \/(Packages|Sources)(|\.bz2|\.gz|\.xz)$ 0 0% 0 refresh-ims
27+refresh_pattern \/(Translation-.*)(|\.bz2|\.gz|\.xz)$ 0 0% 0 refresh-ims
28 refresh_pattern . 0 20% 4320
29 forwarded_for delete
30 visible_hostname maas.proxy # TODO: This should be autogenerated by a template.

Subscribers

People subscribed via source and target branches