The Puppet Labs Issue Tracker has Moved: https://tickets.puppetlabs.com

Feature #694

Add explanation to commands being executed

Added by Luke Kanies almost 7 years ago. Updated over 3 years ago.

Status:AcceptedStart date:
Priority:LowDue date:
Assignee:-% Done:

0%

Category:newfeature
Target version:-
Affected Puppet version:0.24.8 Branch:
Keywords:

We've Moved!

Ticket tracking is now hosted in JIRA: https://tickets.puppetlabs.com

This ticket may be automatically exported to the PUP project on JIRA using the button below:


Description

When Puppet executes a command, the command is visible when debugging is enabled. It would be nice if this debug statement included the reason the command is being executed, at least indicating the method doing the execution (e.g., “latest”).

Nearly all of these executions are called from providers, so they would be the best place to start in terms of adding this information.

This will likely require either changing the prototype for the methods that perform the execution or finding some way to register why an execution is being performed.

execute() in util.rb accepts a hash as a trailing argument for options; we could add support for a ‘label’ option, and then test the command methods in the providers, so that instead of calling:

aptget :install, @resource[:name]

we could call:

aptget :install, @resource[:name], :label => :installing

We just need to check if the last argument is a hash, and if so, pass that hash as options to execute().

The log messages already automatically use the resource as the source of the message, so the logging is contextual; we would just need to add this label to the beginning of the message.


Related issues

Related to Puppet - Bug #17603: Puppet execute has unexpected semantics Accepted

History

#1 Updated by Redmine Admin almost 6 years ago

  • Status changed from 1 to Accepted

#2 Updated by James Turnbull almost 5 years ago

  • Assignee deleted (Puppet Community)
  • Affected Puppet version set to 0.24.8

#3 Updated by Nigel Kersten over 3 years ago

  • Target version deleted (4)

Also available in: Atom PDF