squid upgrade fails when user has custom cache_dir

Bug #1613914 reported by YanoT
46
This bug affects 8 people
Affects Status Importance Assigned to Milestone
squid3 (Ubuntu)
Triaged
High
Unassigned

Bug Description

execute do-release-upgrade to 16.04.1 LTS on 15.10

ProblemType: Package
DistroRelease: Ubuntu 16.04
Package: squid 3.5.12-1ubuntu7.2
ProcVersionSignature: Ubuntu 3.16.0-57.77~14.04.1-generic 3.16.7-ckt20
Uname: Linux 3.16.0-57-generic x86_64
ApportVersion: 2.19.1-0ubuntu5
Architecture: amd64
Date: Wed Aug 17 09:17:31 2016
DuplicateSignature: package:squid:3.5.12-1ubuntu7.2:サブプロセス インストール済みの post-installation スクリプト はエラー終了ステータス 1 を返しました
ErrorMessage: サブプロセス インストール済みの post-installation スクリプト はエラー終了ステータス 1 を返しました
InstallationDate: Installed on 2015-04-24 (480 days ago)
InstallationMedia: Ubuntu MATE 14.04.2 "Trusty Tahr" - LTS amd64 (20150323)
RelatedPackageVersions:
 dpkg 1.18.4ubuntu1.1
 apt 1.2.12~ubuntu16.04.1
SourcePackage: squid3
Title: package squid 3.5.12-1ubuntu7.2 failed to install/upgrade: サブプロセス インストール済みの post-installation スクリプト はエラー終了ステータス 1 を返しました
UpgradeStatus: Upgraded to xenial on 2016-08-17 (0 days ago)
mtime.conffile..etc.squid.squid.conf: 2016-03-03T11:07:24.100201

Revision history for this message
YanoT (ynote) wrote :
tags: removed: need-duplicate-check
Revision history for this message
YanoT (ynote) wrote :

/var/spool/squid3 not found,

then I make directory /var/spool/squid3
$ sudo mkdir /var/spool/squid3

and change directory permission,
$ sudo chown -R proxy:proxy /var/spool/squid3

then restart squid
$ sudo service squid restart

Works fine.

Joshua Powers (powersj)
summary: - package squid 3.5.12-1ubuntu7.2 failed to install/upgrade: サブプロセス
- インストール済みの post-installation スクリプト はエラー終了ステータス 1 を返しました
+ squid upgrade fails when user has custom cache_dir
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in squid3 (Ubuntu):
status: New → Confirmed
Revision history for this message
Amos Jeffries (yadi) wrote :

All these upgrade failures are because the Unbuntu package touches the cache_dir directory locations on upgrades. The upstream Debian package intentionally does not touch any existing cache_dir locations even if they contain the old 'squid3' folder names in order avoid this type of problem.

Can somebody please revert that part of the install/upgrade scripts?

Changed in squid3 (Ubuntu):
importance: Undecided → High
Changed in hundredpapercuts:
status: New → Confirmed
importance: Undecided → High
Revision history for this message
Robie Basak (racb) wrote :

<slangasek> rbasak: I don't agree that we shouldn't migrate the directory; but maybe we should do that migration in postinst instead of preinst, and skip that migration if there's a non-default cache_dir setting?

Changed in squid3 (Ubuntu):
status: Confirmed → Triaged
Revision history for this message
Amos Jeffries (yadi) wrote :

Having a cache_dir at all is non-default. Squid-3 default is to run with a memory-only cache. The /var/spool/squid path is used as default run-time working directory.

Which reminds me the proxies low-privilege user account is tied via home directory to the location the original machine install was done with. That probably has not been updated since before Trusty.

Symlinks and mount points, either on the cache_dir directory, or below it need to be accounted for.

As do SELinux policies, AppArmour policies - both the system ones and custom changes which do not show up in the squid.conf paths.

Then there is the issue of other custom tools interacting with the cache_dir data. Not common but when it does happen it's usually custom software outside the package tracking system, which we dont have a clue about whether it can cope with the move.

IMHO just leave it, the gain is cosmetic at best and surprisingly hard to do correctly without local knowledge only the admin has.

Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

Nothing happened anymore on this issue, and Amos outlined quite nicely why we might not want to do anything at all - so for now facing way higher prio bugs I'm unsubscribing ubuntu-server.

Paul White (paulw2u)
no longer affects: hundredpapercuts
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.