/etc/init.d/dansguardian restart fails

Bug #684394 reported by gpk
32
This bug affects 5 people
Affects Status Importance Assigned to Milestone
dansguardian (Debian)
Fix Released
Unknown
dansguardian (Ubuntu)
Fix Released
High
Scott Kitterman
Maverick
Fix Released
High
Ricardo Samano

Bug Description

Binary package hint: dansguardian

When you run /etc/init.d/dansguardian restart
it doesn't actually restart dansguardian. Here's why:
look at the first start-stop-daemon line. See how it ends in "--pidfile \"
and how the next one doesn't start with the name of the pidfile,
but rather with a misplaced "--retry 15" flag?

So, when you try to restart, it can't find the PIDfile, and doesn't
stop the process. The start then fails, leaving you with the old
un-restarted incarnation of dansguardian.

  restart|force-reload)
        #
        # If the "reload" option is implemented, move the "force-reload"
        # option to the "reload" entry above. If not, "force-reload" is
        # just the same as "restart".
        #
        echo -n "Restarting $DESC: "
        log_daemon_msg "Restarting $DESC: "
        start-stop-daemon --stop --quiet --retry 15 --oknodo --pidfile \
                --retry 15 /var/run/$NAME.pid --exec $DAEMON || log_end_msg 1
        start-stop-daemon --start --quiet --pidfile \
                /var/run/$NAME.pid --exec $DAEMON || log_end_msg 1
        log_end_msg 0
        ;;

... found this bug after my daughter was in tears of frustration at being unable to watch something on youtube, and I was climbing a tree, wondering why nothing I did had any effect on the behaviour of Dansguardian...

ProblemType: Bug
DistroRelease: Ubuntu 10.10
Package: dansguardian 2.10.1.1-2
ProcVersionSignature: Ubuntu 2.6.35-23.40-generic 2.6.35.7
Uname: Linux 2.6.35-23-generic x86_64
Architecture: amd64
Date: Thu Dec 2 19:33:09 2010
InstallationMedia: Ubuntu 10.04.1 LTS "Lucid Lynx" - Release amd64 (20100816.1)
ProcEnviron:
 PATH=(custom, no user)
 LANG=en_GB.utf8
 SHELL=/bin/bash
SourcePackage: dansguardian

TEST CASE: Install dansguardian, it initially won't run. Edit /etc/dansguardian/dansguardian.conf so it can start, then start the daemon (/etc/init.d/dansguardian start).

Restart the daemon (/etc/init.d/dansguardian restart). It will fail with an error like "Restarting DansGuardian: Restarting DansGuardian: : failed!".

Install the updated package from maverick-proposed.

Restart the daemon again. This time is will succeed.

Revision history for this message
gpk (gpk-kochanski) wrote :
Revision history for this message
Scott Kitterman (kitterman) wrote :

This is an odd one as the init in the source package is correct, but I inspected the amd64 binary and it's as you described.

Changed in dansguardian (Ubuntu):
importance: Undecided → High
milestone: none → natty-alpha-2
status: New → In Progress
Changed in dansguardian (Ubuntu Maverick):
status: New → In Progress
importance: Undecided → High
Changed in dansguardian (Ubuntu):
assignee: nobody → Scott Kitterman (kitterman)
Changed in dansguardian (Ubuntu Maverick):
assignee: nobody → Scott Kitterman (kitterman)
milestone: none → maverick-updates
Revision history for this message
Scott Kitterman (kitterman) wrote :

Actually I take that back. It's wrong in the source package too.

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

This bug was fixed in the package dansguardian - 2.10.1.1-2ubuntu1

---------------
dansguardian (2.10.1.1-2ubuntu1) natty; urgency=low

  * In debian/dansguardian.init, fix restart so that it can successfully stop
    the running daemon (LP: #684394)
 -- Scott Kitterman <email address hidden> Sat, 04 Dec 2010 13:21:42 -0500

Changed in dansguardian (Ubuntu):
status: In Progress → Fix Released
Revision history for this message
Scott Kitterman (kitterman) wrote :

I've uploaded a fixed version for testing for Maverick. It will be reviewed by the stable release updates team and then published for testing in maverick-proposed.

description: updated
Changed in dansguardian (Ubuntu Maverick):
status: In Progress → Fix Committed
Revision history for this message
Martin Pitt (pitti) wrote : Please test proposed package

Accepted dansguardian into maverick-proposed, the package will build now and be available in a few hours. Please test and give feedback here. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

tags: added: verification-needed
Revision history for this message
jhansonxi (jhansonxi) wrote :

This also affects dansguardian 2.10.1.1-1 on Ubuntu 10.04 (Lucid Lynx) i386.

Revision history for this message
jhansonxi (jhansonxi) wrote :

Bug #615551 is a report about the Lucid version failure.

Changed in dansguardian (Debian):
status: Unknown → Fix Released
Revision history for this message
Martin Pitt (pitti) wrote :

Any testers of the maverick-proposed package? As this has been in -proposed for a long time already, I'll remove the proposed package soon if there is no feedback. Thank you!

Revision history for this message
gpk (gpk-kochanski) wrote : Re: [Bug 684394] Re: /etc/init.d/dansguardian restart fails

Oh, yes. It works in Maverick.

On 25/01/11 09:27, Martin Pitt wrote:
> Any testers of the maverick-proposed package? As this has been in
> -proposed for a long time already, I'll remove the proposed package soon
> if there is no feedback. Thank you!
>

Martin Pitt (pitti)
tags: added: verification-done
removed: verification-needed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package dansguardian - 2.10.1.1-2ubuntu0.1

---------------
dansguardian (2.10.1.1-2ubuntu0.1) maverick-proposed; urgency=low

  * In debian/dansguardian.init, fix restart so that it can successfully stop
    the running daemon (LP: #684394)
 -- Scott Kitterman <email address hidden> Sat, 04 Dec 2010 13:21:42 -0500

Changed in dansguardian (Ubuntu Maverick):
status: Fix Committed → Fix Released
tags: added: testcase
Changed in dansguardian (Ubuntu Maverick):
assignee: Scott Kitterman (kitterman) → Ricardo Samano (cruzazulzero)
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.