image-store-proxy reports failure to start while it starts correctly

Bug #433863 reported by Thierry Carrez
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
image-store-proxy (Ubuntu)
Fix Released
Low
Mathias Gug

Bug Description

python-image-store-proxy 0.9.1-0ubuntu1

Sometimes the image-store-proxy will report failure to start, while it is indeed started:

$ sudo service image-store-proxy start
 * Starting Image Store Proxy image-store-proxy [fail]
$ sudo service image-store-proxy status
 * Checking status of Image Store Proxy image-store-proxy [ OK ]

This comes from the way STARTTIME is used in /etc/init.d/image-store-proxy.

If STARTTIME is undefined (or equal to 0) then its a race between the init script and the pidfile creation in the backgrounded process, which the shell sometimes wins.

This should be changed to either:
- always report success if STARTTIME is undefined and start-stop-daemon succeeded (no pidfile check)
- set STARTTIME to at least 1 second to have the race won by python most of the time

Thierry Carrez (ttx)
Changed in image-store-proxy (Ubuntu):
importance: Undecided → Low
status: New → Triaged
Mathias Gug (mathiaz)
Changed in image-store-proxy (Ubuntu):
assignee: nobody → Mathias Gug (mathiaz)
status: Triaged → In Progress
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package image-store-proxy - 1.0-0ubuntu1

---------------
image-store-proxy (1.0-0ubuntu1) karmic; urgency=low

  * New upsream release (LP: #434185)
    + Enable image signature checking. Add gnupg dependency. Import image
    store GPG armored key in its keyring at install time.
    + Renable all tests.
  * Set STARTTIME to 1 second to avoid false start failure report from the
    init script (LP: #433863).

 -- Mathias Gug <email address hidden> Wed, 23 Sep 2009 20:17:44 -0400

Changed in image-store-proxy (Ubuntu):
status: In Progress → Fix Released
Revision history for this message
Soren Hansen (soren) wrote :

Setting this back to confirmed, since it -- at least for me -- still happens (*almost* every time). Perhaps 1 second is a bit optimistic?

Changed in image-store-proxy (Ubuntu):
status: Fix Released → Confirmed
Revision history for this message
Thierry Carrez (ttx) wrote :

I see this as well. I think we should not do a pidfile check after n seconds, delaying the whole boot. Let's just assume success if STARTTIME is undefined and start-stop-daemon succeeded ?

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

This bug was fixed in the package image-store-proxy - 1.0.1-0ubuntu1

---------------
image-store-proxy (1.0.1-0ubuntu1) karmic; urgency=low

  * New upstream release:
    - fix gpg usage (LP: #436896).
  * Add euca2ools as a dependency.
  * Update init script to assume success if STARTTIME is undefined and
    start-stop-daemon succeeded as there is a race condition between the
    pid file creation and the check in the init script. (LP: #433863)
  * Fix gpg key files permission so that they can be read by the eucalyptus
    user.

 -- Mathias Gug <email address hidden> Tue, 06 Oct 2009 20:50:48 -0400

Changed in image-store-proxy (Ubuntu):
status: Confirmed → Fix Released
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.