[chef] Re: Re: commands output for execute/script resources

Chronological Thread 
  • From: Vladimir Girnet < >
  • To:
  • Subject: [chef] Re: Re: commands output for execute/script resources
  • Date: Tue, 02 Nov 2010 22:19:05 +0200

On 11/2/2010 6:18 PM, Seth Falcon wrote:

On Tue, Nov 2, 2010 at 7:55 AM, Vladimir Girnet
< >
Sometimes it is required to see output of a command or a script. I know that
"-l debug" will display it, but it will also display a lot of non-required
debug information.

Is there a way to display output of a specific "execute", "package" or
"script/bash" resources, except debug mode?

Is it possible to add for "execute", "package" and "script/bash" resources a
new option "output", which is by default false, but can be set to true to
display execution results?
Is it that you want to process the output of a resource or just see it
in the logs in more detail?
If I'm understanding right, you just want the output to appear in the
log.  I'd like to understand a bit more on the motivation.  Is this
for debugging, but where debug -l produces too much info or for
another purpose?

+ seth
I'd like to see more details in the chef-client output or log file. Not just "running this task"...
Why? We have multiple "execute" and "script" resources. And some of them will run for a long time without any output. Running the same command manually will display some output, this way informing me about progress.
So, progress in log files/console is always good. It would be great to have an option to enable/disable it for particular resources.
Also, I may need to view output from only one resource. I know all other resources are working well. Running chef-client in debug mode will display output from all resources.
Another moment - if a resource will fail - we will see a ruby stacktrace. Only in debug mode we will see the actual error. What if we have a resource that will run for 5 minutes? I have to wait 5 minutes to see the ruby stack, then switch to debug mode to see the actual error. I think this one was discussed previously already. It will be great to display full output of a resource with stderr included if exit code is different from expected ( usually 0 ).

Vladimir Girnet

Archive powered by MHonArc 2.6.16.