← Back to team overview

orchestra team mailing list archive

[Bug 927750] [NEW] orchestra squid config should not deny apt packages

 

Public bug reported:

current orchestra squid configuration has:
 | acl PACKAGES url_regex \/Packages(|\.bz2|\.gz)$
 | cache deny PACKAGES
 | acl SOURCES url_regex \/Sources(|\.bz2|\.gz)$
 | cache deny SOURCES
 | acl RELEASE url_regex \/Release(|\.gpg)$
 | cache deny RELEASE

That means that those files are *never* cached, meaning each client
request guarantees a non-local network operation.

Currently, amd64 'apt-get update' would report:
  Fetched 22.2 MB in 35s (618 kB/s)                                                                                                                             
So, thats 22MB that will never be cached.

The suggested fix is to use 'refresh_pattern' instead of deny, with a
basic diff then looking something like:

--- squid.conf.old      2012-02-06 17:27:15.630780844 +0000
+++ squid.conf  2012-02-06 17:27:23.990783380 +0000
@@ -38,16 +38,12 @@
 icp_port 0
 hierarchy_stoplist cgi-bin ?
 access_log /var/log/squid3/access.log squid
+refresh_pattern \/(Packages|Sources)(|\.bz2|\.gz)$ 0 0% 0
+refresh_pattern \/Release(|\.gpg)$ 0 0% 0
 refresh_pattern ^ftp:          1440    20%     10080
 refresh_pattern ^gopher:       1440    0%      1440
 refresh_pattern -i (/cgi-bin/|\?) 0    0%      0
 refresh_pattern .              0       20%     4320
-acl PACKAGES url_regex \/Packages(|\.bz2|\.gz)$
-cache deny PACKAGES
-acl SOURCES url_regex \/Sources(|\.bz2|\.gz)$
-cache deny SOURCES
-acl RELEASE url_regex \/Release(|\.gpg)$
-cache deny RELEASE
 hosts_file /etc/hosts
 coredump_dir /var/spool/squid3
 maximum_object_size 750 MB

for reference, conversation on this topic was in IRC at
http://irclogs.ubuntu.com/2012/02/06/%23ubuntu-server.html#t16:57

** Affects: orchestra (Ubuntu)
     Importance: Undecided
         Status: Confirmed

-- 
You received this bug notification because you are a member of
orchestra, which is subscribed to orchestra in Ubuntu.
https://bugs.launchpad.net/bugs/927750

Title:
  orchestra squid config should not deny apt packages

Status in “orchestra” package in Ubuntu:
  Confirmed

Bug description:
  current orchestra squid configuration has:
   | acl PACKAGES url_regex \/Packages(|\.bz2|\.gz)$
   | cache deny PACKAGES
   | acl SOURCES url_regex \/Sources(|\.bz2|\.gz)$
   | cache deny SOURCES
   | acl RELEASE url_regex \/Release(|\.gpg)$
   | cache deny RELEASE

  That means that those files are *never* cached, meaning each client
  request guarantees a non-local network operation.

  Currently, amd64 'apt-get update' would report:
    Fetched 22.2 MB in 35s (618 kB/s)                                                                                                                             
  So, thats 22MB that will never be cached.

  The suggested fix is to use 'refresh_pattern' instead of deny, with a
  basic diff then looking something like:

  --- squid.conf.old      2012-02-06 17:27:15.630780844 +0000
  +++ squid.conf  2012-02-06 17:27:23.990783380 +0000
  @@ -38,16 +38,12 @@
   icp_port 0
   hierarchy_stoplist cgi-bin ?
   access_log /var/log/squid3/access.log squid
  +refresh_pattern \/(Packages|Sources)(|\.bz2|\.gz)$ 0 0% 0
  +refresh_pattern \/Release(|\.gpg)$ 0 0% 0
   refresh_pattern ^ftp:          1440    20%     10080
   refresh_pattern ^gopher:       1440    0%      1440
   refresh_pattern -i (/cgi-bin/|\?) 0    0%      0
   refresh_pattern .              0       20%     4320
  -acl PACKAGES url_regex \/Packages(|\.bz2|\.gz)$
  -cache deny PACKAGES
  -acl SOURCES url_regex \/Sources(|\.bz2|\.gz)$
  -cache deny SOURCES
  -acl RELEASE url_regex \/Release(|\.gpg)$
  -cache deny RELEASE
   hosts_file /etc/hosts
   coredump_dir /var/spool/squid3
   maximum_object_size 750 MB

  for reference, conversation on this topic was in IRC at
  http://irclogs.ubuntu.com/2012/02/06/%23ubuntu-server.html#t16:57

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/orchestra/+bug/927750/+subscriptions


Follow ups

References