On Sun, 2011-02-27 at 20:47 +0000, Steve Langasek wrote: 
> Well, that's because the postinst isn't using the init script policy
> layer.
> 
> if status squid | grep "start/running" > /dev/null; then
>         restart squid
> fi
> 
> if [ "$FIXLINES" = "false" ]; then
>   echo "squid.conf contains 2.2.5 syntax - cache_dir directive - not starting 
> "
>   echo "Run 'dpkg-reconfigure -plow squid' to fix this automatically," 
>   echo "or fix the 'cache_dir'-entry in your squid.conf manually." 
>   echo "See documentation in /usr/share/doc/squid for nearer instructions."
> else
>   if status squid | grep "start/running" > /dev/null; then
>         restart squid
>   fi
> fi
> 
> Why isn't this "invoke-rc.d squid restart" like it should be?  Also, the
> fixlines check is pointless given that it's preceded by a squid restart
> command.  This all seems to have been a wrong fix for bug #552360 and/or
> bug #509307.

This is particularly troubling because the 'restart' command does not
re-load the upstart job file, while invoke-rc.d's restart method, IIRC,
runs stop/start for this very reason.

That said, currently if the process is stop/waiting, its left in that
very state on upgrade. So while this is a bug, and should be fixed on
the next upload, I don't believe it is the cause of the issue.

The things that can cause a "failed to restart" will also cause a
'failed to stop' or 'failed to start'. Namely:

pre-start exits non zero
post-stop exits non zero
main process cannot be executed

There are a bunch of things in the pre-start in particular that might
fail. In this case, re-running the preinst would result in the postinst
succeeding, but squid not running.

I do think this is related, but not the same, so I've opened bug #726348
to address that issue separately.

-- 
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to squid in ubuntu.
https://bugs.launchpad.net/bugs/717397

Title:
  package squid 2.7.STABLE7-1ubuntu12.1 failed to install/upgrade:
  subprocess installed post-installation script returned error exit
  status 1

-- 
Ubuntu-server-bugs mailing list
Ubuntu-server-bugs@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs

Reply via email to