Opened 5 years ago

Closed 5 years ago

#2882 closed change (fixed)

Let exec's logoutput default to 'on_failure'

Reported by: matze Assignee: matze
Priority: P2 Milestone:
Module: Infrastructure Keywords:
Cc: fhd, fred Blocked By:
Blocking: #1614 Platform: Unknown / Cross platform
Ready: yes Confidential: no
Tester: Unknown Verified working: no
Review URL(s):


The Puppet exec resource type suppresses output unless explicitly configured so by setting the logoutput option to true or on_failure. Most of these resources in our infrastructure repository, however, do not use this option at all. This is actually a quite time-consuming issue:

Many failures cannot get debugged properly because one must reproduce the exact same circumstances in order to get the information the output may have provided in the first place. Reproducing though is often quite difficult without the output information. More of a guess, most of the time. And turning on output while reproducing is actually already falsifying the attempt to create the same results.

The consequence is, for example, a discourse module that basically consists of Heisenbugs only.

What To Do

Globally set the logoutput option to on_failure. That should be a good balance, not being too chatty but allowing for more straightforward analysis. In fact it would be the default behavior in Puppet 3 anyway.


There may remain a few occurrences where this is not enough, e.g. when invoking commands that seem to not properly return a nonzero exit code in case of an error. For now it should be sufficient to individually set those up with logoutput set to true (read: always) when encountered.

Change History (3)

comment:1 Changed 5 years ago by matze

  • Review URL(s) modified (diff)
  • Status changed from new to reviewing
  • Type changed from defect to change

comment:2 Changed 5 years ago by matze

  • Summary changed from Globally set exec's $logoutput to true to Let exec's logoutput default to 'on_failure'

comment:3 Changed 5 years ago by matze

  • Resolution set to fixed
  • Status changed from reviewing to closed
Note: See TracTickets for help on using tickets.