-
-
Notifications
You must be signed in to change notification settings - Fork 792
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
return codes of docker commands not verified #52
Comments
I agree this could be improved. I thought error! Fails with any non-zero exit status. Is this what makes sense in all cases? Should we have retries, etc for exit codes in any places and how would the implementation look? Thanks for the consideration |
It seems till the next release of docker this won't be much use anyway as there a lot of fixes for things exiting with the wrong exit code mainly, 0 with an error. See a |
It probably makes sense to have both a
AFAICT, the use of return codes has gotten better and better with each release. |
@jcrobak Are your changes in a public repo somewhere? I was also thinking about refactoring the docker_cmd work into the helper library. |
@jhulten I don't have anything up yet, but I'll try to push up what I have after some cleanups. |
Here's most of what I have so far: https://github.com/jcrobak/chef-docker/tree/return-code-validation I haven't been able to get the tests to pass on debian 7 (in particular, the test that |
@jcrobak nice work so far. I'd be happy to merge that into next release. With respect to Debian 7 support, I still have it listed as "Debian 7 (experimental)" in the README, so I wouldn't let that stop you for now given your changes would likely not change that behavior. |
@bflad Sounds good. I was able to verify that my full changeset (there are a couple more commits atop of what's pushed publicly) passes kitchen tests on all platforms other than Debian 7. Would you prefer if I break the branch into a couple PRs or are you ok with a PR with a few semi-related commits? |
Ah, sorry I didn't respond to this yesterday. If you already have it in one branch, please feel free to submit as one PR, although may need to rebase. I also have some more minor functionality going into the image provider tonight to match (ha!) the functionality #57 just added to the container provider. If I have time I may look into #59 as well, but that shouldn't affect your work. |
Fixed in 0.30.0 which will be released tonight. |
I noticed that the LWRP's are not verifying return codes except in one place:
Is this on purpose? It seems like it'd be more appropriate to use
shell_out!
(which verifies exit codes) everywhere instead ofshell_out
(which doesn't). Specifically, it'd be nice ifdocker_image
withaction :pull
failed fast so thatdocker_container
doesn't try to start a container that failed to pull.The text was updated successfully, but these errors were encountered: