Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use Mixlib::Shellout instead of Chef::Mixin::Command #3591

Merged
merged 5 commits into from
Jul 1, 2015

Conversation

DeWaRs1206
Copy link
Contributor

Using C:\Users\Administrator>chef-solo -i 30 -s 5 -c C:/monsoon/solo.rb -j http://foo-bar/get-run -r http://foo-bar.com/cookbooks.tar.gz
failled with error :
[2015-06-25T15:01:52+02:00] DEBUG: ---- End output of tar zxvf C:/chef/recipes.t
gz -C C:/chef ----
C:/opscode/chef/embedded/apps/chef/lib/chef/mixin/command.rb:140:in block in ou tput_of_command': undefined methodexitstatus' for nil:NilClass (NoMethodError)

    from C:/opscode/chef/embedded/apps/chef/lib/chef/mixin/command.rb:122:in

chdir' from C:/opscode/chef/embedded/apps/chef/lib/chef/mixin/command.rb:122:in output_of_command'
from C:/opscode/chef/embedded/apps/chef/lib/chef/mixin/command.rb:101:in
run_command_and_return_stdout_stderr' from C:/opscode/chef/embedded/apps/chef/lib/chef/mixin/command.rb:79:in run_command'
from C:/opscode/chef/embedded/apps/chef/lib/chef/application/solo.rb:217
:in reconfigure' from C:/opscode/chef/embedded/apps/chef/lib/chef/application.rb:58:inr
un'
from C:/opscode/chef/embedded/apps/chef/bin/chef-solo:25:in <top (requi red)>' from C:/opscode/chef/bin/chef-solo:63:inload'
from C:/opscode/chef/bin/chef-solo:63:in `

'

using Mixlib::ShellOut instead of Chef::Mixin::Command solved the issue

Using C:\Users\Administrator>chef-solo -i 30 -s 5 -c C:/monsoon/solo.rb -j http://foo-bar/get-run -r http://foo-bar.com/cookbooks.tar.gz
failled with error : 
[2015-06-25T15:01:52+02:00] DEBUG: ---- End output of tar zxvf C:/chef/recipes.t
gz -C C:/chef ----
C:/opscode/chef/embedded/apps/chef/lib/chef/mixin/command.rb:140:in `block in ou
tput_of_command': undefined method `exitstatus' for nil:NilClass (NoMethodError)

        from C:/opscode/chef/embedded/apps/chef/lib/chef/mixin/command.rb:122:in
 `chdir'
        from C:/opscode/chef/embedded/apps/chef/lib/chef/mixin/command.rb:122:in
 `output_of_command'
        from C:/opscode/chef/embedded/apps/chef/lib/chef/mixin/command.rb:101:in
 `run_command_and_return_stdout_stderr'
        from C:/opscode/chef/embedded/apps/chef/lib/chef/mixin/command.rb:79:in
`run_command'
        from C:/opscode/chef/embedded/apps/chef/lib/chef/application/solo.rb:217
:in `reconfigure'
        from C:/opscode/chef/embedded/apps/chef/lib/chef/application.rb:58:in `r
un'
        from C:/opscode/chef/embedded/apps/chef/bin/chef-solo:25:in `<top (requi
red)>'
        from C:/opscode/chef/bin/chef-solo:63:in `load'
        from C:/opscode/chef/bin/chef-solo:63:in `<main>'

using Mixlib::ShellOut instead of Chef::Mixin::Command solved the issue
@chef-supermarket
Copy link

Hi. I am an automated pull request bot named Curry. There are commits in this pull request whose authors are not yet authorized to contribute to Chef Software, Inc. projects or are using a non-GitHub verified email address. To become authorized to contribute, you will need to sign the Contributor License Agreement (CLA) as an individual or on behalf of your company. You can read more on Chef's blog.

GitHub Users Who Are Not Authorized To Contribute

The following GitHub users do not appear to have signed a CLA:

Please sign the CLA here.

@chef-supermarket
Copy link

Hi. Your friendly Curry bot here. Just letting you know that all commit authors have become authorized to contribute. I have added the "Signed CLA" label to this issue so it can easily be found in the future.

@thommay
Copy link
Contributor

thommay commented Jun 25, 2015

@DeWaRs1206 Thanks for your submission. You'll need to update the failing tests - https://travis-ci.org/chef/chef/jobs/68317452#L1321 and ensure that you fix the formatting of your code.

@chef-supermarket
Copy link

Hi. I am an automated pull request bot named Curry. There are commits in this pull request whose authors are not yet authorized to contribute to Chef Software, Inc. projects or are using a non-GitHub verified email address. To become authorized to contribute, you will need to sign the Contributor License Agreement (CLA) as an individual or on behalf of your company. You can read more on Chef's blog.

Non-GitHub Verified Committers

There are 1 commit author(s) whose commits are authored by a non-GitHub verified email address. Chef will have to manually verify that they are authorized to contribute.

Please sign the CLA here.

@DeWaRs1206
Copy link
Contributor Author

@thommay , I have fix failling test, not sure what you mean by "ensure that you fix the formatting of your code."
Could you give me more details ?
BR

@btm
Copy link
Contributor

btm commented Jun 26, 2015

@DeWaRs1206 it looks like the 2nd commit you just pushed didn't have your correct email address (and name?) in it. Could you amend that commit with the same name/email as your first one and force push here?

What's the purpose of the "#tarcommand.run_command" comment line? Why the leading spaces?

As a minor detail you added an extra newline in spec/unit/application/solo_spec.rb that wasn't necessary.

@DeWaRs1206
Copy link
Contributor Author

@btm anything else I need to do regarding this PR ?

@sethvargo
Copy link
Contributor

This LGTM, but how did this get assigned to me?

@btm
Copy link
Contributor

btm commented Jun 30, 2015

@sethvargo I believe @thommay has been working on having curry auto-assign PRs needing review. I'm not sure if it's been talked about outside of the IRC meetings yet. I'll poke him.

@sethvargo
Copy link
Contributor

@btm ah okay. I was confused 😄

@ranjib
Copy link
Contributor

ranjib commented Jun 30, 2015

👍

1 similar comment
@tyler-ball
Copy link
Contributor

👍

thommay added a commit that referenced this pull request Jul 1, 2015
Use Mixlib::Shellout instead of Chef::Mixin::Command
@thommay thommay merged commit 22fe3fd into chef:master Jul 1, 2015
@chef chef locked and limited conversation to collaborators Nov 16, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants