upstart problems with S20squid script

Bug #908905 reported by Brandt B
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
squid (Ubuntu)
Expired
Low
Unassigned

Bug Description

After performing a dist-upgrade of my lucid installation, I got the following upstart error in my boot.log:

Rather than invoking init scripts through /etc/init.d, use the service(8)
utility, e.g. service S20squid start

Since the script you are attempting to invoke has been converted to an
Upstart job, you may also use the start(8) utility, e.g. start S20squid
start: Unknown job: S20squid

One can reproduce this bug, by simply issuing "sudo /etc/rc(2-5).d/S20squid start". Since S20squid is simply a symlink to /etc/init.d/squid this affects all runlevels. However it seems to be non critical since squid is started anyway (I have no idea why). The issue can be fixed by inserting

if [ "$JOB" = "S20squid" ]; then
    JOB="squid"
fi

into /etc/init.d/squid, see attached patch. However there are two issues here, if I am not mistaken. First the redundancy since squid is started by two different scripts(?) and secondly the wrong line in /etc/init.d/squid.

I am running Ubuntu 10.04.3 LTS
My squid version is 2.7.STABLE7
The system is up-to-date (aside from the grub package which is held back)

If you need any more information I am happy to provide it.

Thanks for your efforts

B. Brandt

Tags: patch
Revision history for this message
Brandt B (benedikt-benbra) wrote :
description: updated
Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "inserting case discrimation in /etc/init.d/squid" of this bug report has been identified as being a patch. The ubuntu-reviewers team has been subscribed to the bug report so that they can review the patch. In the event that this is in fact not a patch you can resolve this situation by removing the tag 'patch' from the bug report and editing the attachment so that it is not flagged as a patch. Additionally, if you are member of the ubuntu-reviewers team please also unsubscribe the team from this bug report.

[This is an automated message performed by a Launchpad user owned by Brian Murray. Please contact him regarding any issues with the action taken in this bug report.]

tags: added: patch
Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

Thanks for submitting this bug.

Actually the core of the problem seems to be the existence of the /etc/rc*.d/ links to /etc/init.d/squid. Since at boot those jobs will now be started and stopped by upstart using the /etc/init/squid.conf job, those links should not exist.

Could you show the result of:

   dpkg -L squid

?

Assuming those files do not show up in that output, that likely means something went wrong during an upgrade, and you can safely remove them using

   sudo rm /etc/rc*.d/*squid

Changed in squid (Ubuntu):
importance: Undecided → Low
status: New → Incomplete
Revision history for this message
Brandt B (benedikt-benbra) wrote :

Thanks for your answer. The output is

sudo dpkg -L squid
/.
/usr
/usr/share
/usr/share/lintian
/usr/share/lintian/overrides
/usr/share/lintian/overrides/squid
/usr/share/doc
/usr/share/doc/squid
/usr/share/doc/squid/examples
/usr/share/doc/squid/examples/default.squid
/usr/share/doc/squid/examples/squid.conf
/usr/share/doc/squid/README.Debian.gz
/usr/share/doc/squid/copyright
/usr/share/doc/squid/NEWS.Debian.gz
/usr/share/doc/squid/changelog.Debian.gz
/usr/share/doc/squid/changelog.gz
/usr/share/man
/usr/share/man/man8
/usr/share/man/man8/squid_ldap_group.8.gz
/usr/share/man/man8/squid_unix_group.8.gz
/usr/share/man/man8/squid_session.8.gz
/usr/share/man/man8/squid.8.gz
/usr/lib
/usr/lib/squid
/usr/lib/squid/yp_auth
/usr/lib/squid/ldap_auth
/usr/lib/squid/msnt_auth
/usr/lib/squid/squid_ldap_group
/usr/lib/squid/pam_auth
/usr/lib/squid/diskd-daemon
/usr/lib/squid/logfile-daemon
/usr/lib/squid/unlinkd
/usr/lib/squid/ntlm_auth
/usr/lib/squid/smb_auth
/usr/lib/squid/ip_user_check
/usr/lib/squid/squid_kerb_auth
/usr/lib/squid/wbinfo_group.pl
/usr/lib/squid/digest_pw_auth
/usr/lib/squid/ncsa_auth
/usr/lib/squid/squid_unix_group
/usr/lib/squid/getpwnam_auth
/usr/lib/squid/smb_auth.sh
/usr/lib/squid/squid_session
/usr/sbin
/usr/sbin/squid
/var
/var/log
/var/log/squid
/var/spool
/var/spool/squid
/etc
/etc/resolvconf
/etc/resolvconf/update-libc.d
/etc/resolvconf/update-libc.d/squid
/etc/squid
/etc/init.d
/etc/init
/etc/init/squid.conf
/etc/logrotate.d
/etc/logrotate.d/squid
/etc/init.d/squid

As you already suspected the files are not present and I have therefore deleted them, as you suggested. Squid is booting up fine.

Revision history for this message
Clint Byrum (clint-fewbar) wrote :

b1, what version of Ubuntu did you dist-upgrade from? I think this may be a problem when upgrading from a version where upstart does not control squid (likely 8.04 (hardy) or 9.10 (karmic)). The packaging needs to remove these symlinks before installing the new upstart-compatibility symlink in /etc/init.d.

Revision history for this message
Brandt B (benedikt-benbra) wrote :

I dist-upgraded from an ubuntu 10.04.2 LTS. But this problem also occurs with a "normal" upgrade.

sudo lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 10.04.2 LTS
Release: 10.04
Codename: lucid

I have a VM-Snapshot of the system before the update and the failure is always reproducable. Since there is now private Data on that Machine (its a testing environment), I could upload the Snapshot, if you like.

Thanks for your efforts.

Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for squid (Ubuntu) because there has been no activity for 60 days.]

Changed in squid (Ubuntu):
status: Incomplete → Expired
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.