Opened 4 years ago

Closed 4 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):

https://codereview.adblockplus.org/29323443

Description

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.

Note

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 4 years ago by matze

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

comment:2 Changed 4 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 4 years ago by matze

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