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

Using platform resources instead of shelling out #197

Closed
wants to merge 1 commit into from
Closed

Using platform resources instead of shelling out #197

wants to merge 1 commit into from

Conversation

jschneiderhan
Copy link
Contributor

Hi there. Thank you for sharing your excellent cookbook! I have been finding it very useful.

This PR is more for discussion than an actual merge candidate. I have been hitting an issue similar to #194 while trying to use the :redeploy action, and I think the problem is due to the timing between when platform resources are processed (embedded into the resource collection) vs when the shelled out commands are run. If the platform resources defined in the container provider executes immediately everything works fine. What I am seeing currently is the docker rm shellout execute prior to the service resource's :stop action, leading to the following error:

==> default: [2014-07-28T18:59:18+00:00] DEBUG: Platform ubuntu version 14.04 found
==> default:
==> default: ================================================================================
==> default: Error executing action `run` on resource 'execute[rm  a4117fb8ab6474f8d6d360345c96d3e13fa995175a89e7c2af2ce086232e6817]'
==> default: ================================================================================
==> default:
==> default:
==> default: Mixlib::ShellOut::ShellCommandFailed
==> default: ------------------------------------
==> default: Expected process to exit with [0], but received '1'
==> default: ---- Begin output of rm  a4117fb8ab6474f8d6d360345c96d3e13fa995175a89e7c2af2ce086232e6817 ----
==> default: STDOUT:
==> default: STDERR: rm: cannot remove 'a4117fb8ab6474f8d6d360345c96d3e13fa995175a89e7c2af2ce086232e6817': No such file or directory
==> default: ---- End output of rm  a4117fb8ab6474f8d6d360345c96d3e13fa995175a89e7c2af2ce086232e6817 ----
==> default: Ran rm  a4117fb8ab6474f8d6d360345c96d3e13fa995175a89e7c2af2ce086232e6817 returned 1
==> default:
==> default:

If I replace the shellout calls with execute resources (as shown below) all the commands process just as the code reads and work perfectly (for my use case, it very well may have broken every other one).

@someara
Copy link
Contributor

someara commented Aug 13, 2015

Thanks for the PR.

In master, the provider now talks to the API directly instead of shelling out.

-s

@someara someara closed this Aug 13, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants