Init script always returns 0

Bug #527860 reported by Simon Déziel
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
puppet (Ubuntu)
Fix Released
Wishlist
Mathias Gug

Bug Description

Binary package hint: puppet

In Lucid, the init script of puppetmaster (0.25.4-2ubuntu2) ends with an "exit 0" that masks the real return code.

I have attach a patch that removes the exit 0. I've tested it and all actions (start/stop/restart/status) now return the a valid exit code.

Tags: patch

Related branches

Revision history for this message
Simon Déziel (sdeziel) wrote :
Revision history for this message
Simon Déziel (sdeziel) wrote :

I just found that the same should apply for the client's init script. I've tested the patch and it works well.

tags: added: patch
Revision history for this message
Chuck Short (zulcss) wrote :

Thanks for the patch ill take a look at this for lucid.

Regards
chuck

Changed in puppet (Ubuntu):
importance: Undecided → Wishlist
status: New → Confirmed
Revision history for this message
Angel Abad (angelabad) wrote :

I proposed a branch merge with patch applied.

Thanks!

Revision history for this message
Thierry Carrez (ttx) wrote :

@Simon: I think your patch is incomplete: in puppet.init, start, stop and restart will always return 0 (since you get the return value of "log_end_msg 0" which happens to always be "0". I think changing those to "log_end_msg $?" should do it... Maybe you can validate all calls to puppet.init and update your branch accordingly ?

Revision history for this message
Simon Déziel (sdeziel) wrote :

@Thierry: you are absolutely right. I did the patch only for puppetmaster without paying attention to restart exit code. Strangely, the puppetmaster script does use "log_end_msg $?" for start and stop already but the puppet script doesn't. I'll attach the 2 new patches. Thanks for your review.

Revision history for this message
Simon Déziel (sdeziel) wrote :
Revision history for this message
Angel Abad (angelabad) wrote :

Updated proposed branch for merge.

Thanks

Revision history for this message
Thierry Carrez (ttx) wrote :

Looks good, subscribing main sponsors, will sponsor it if noone beats me to it.

Mathias Gug (mathiaz)
Changed in puppet (Ubuntu):
status: Confirmed → In Progress
assignee: nobody → Mathias Gug (mathiaz)
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package puppet - 0.25.4-2ubuntu3

---------------
puppet (0.25.4-2ubuntu3) lucid; urgency=low

  [ Angel Abad ]
  * Fix return codes puppetmaster.init and puppet.init (LP: #527860)

  [ Mathias Gug ]
  * debian/puppet-common.postrm: only remove puppet directories if they're
    empty on package purge.
  * etckeeper integration:
    + debian/README.Debian: add a note about etckeeper integration.
    + debian/control: suggest etckeeper.
 -- Mathias Gug <email address hidden> Thu, 11 Mar 2010 12:42:32 -0500

Changed in puppet (Ubuntu):
status: In Progress → 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.