[chef-dev] Re: Re: Mixlib:ShellOut fails with empty status


Chronological Thread 
  • From: Daniel DeLeo < >
  • To: Daniel Condomitti < >
  • Cc: " " < >, " " < >
  • Subject: [chef-dev] Re: Re: Mixlib:ShellOut fails with empty status
  • Date: Sun, 5 May 2013 18:23:58 -0700

On Sunday, May 5, 2013 at 11:50 AM, Daniel Condomitti wrote:
That's referring to its exit status code, not the actual output to
STDOUT. An exit code of zero is succesful. When you run it from the
command line what happens when you run 'echo $?' as the next command?

If the command succeeds you can tell chef what codes are considered to
be successful with the returns attribute. Try adding
returns: ['']
to your bash resource call.

Sent from my iPhone


Hi there, I try to develop a fix for the maven lwrp
(https://github.com/opscode-cookbooks/maven) and have run acros this problem:

When ein run "kitchen test" in the master of the git repo I see:
2013-05-05T15:32:21+00:00] DEBUG: Mixlib::ShellOut::ShellCommandFailed:
maven[mysql-connector-java] (maven::test line 6) had an error:
Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but
received ''

The output from the shell command looks like there is actually no error and it
is in the middle of execution (actually downloading, since its maven..) when
somethingh goes wrong. If I run the command from outside chef is succeeds. Is
there a way to get a better Error Description from Mixlib:ShellOut? Anybody
seen it failing with status '' ?
You commonly see a null exit status if a process is terminated will the kill signal (e.g., kill -9). oomkiller, perhaps?

-- 
Daniel DeLeo




Archive powered by MHonArc 2.6.16.

§