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

Chef Provisioner: Accept more exit codes than 0 #16551

Closed
angelichorsey opened this issue Nov 3, 2017 · 4 comments
Closed

Chef Provisioner: Accept more exit codes than 0 #16551

angelichorsey opened this issue Nov 3, 2017 · 4 comments
Labels
needs-maintainer This code is currently unmaintained. Please submit a PR against our CODEOWNERS to volunteer. provisioner/chef

Comments

@angelichorsey
Copy link

Chef 13 is now pushing specific exit codes that are still considered non-error. This provisioner needs to allow for specifying acceptable non-zero exit codes, or have the codes in the following RFC be acceptable by default.

https://github.com/chef/chef-rfc/blob/master/rfc062-exit-status.md

@davelaramee-ssense
Copy link

I have the same issue (exit-code 35, reboot after ad-join)

@angelichorsey
Copy link
Author

angelichorsey commented Nov 7, 2018

I have resolved this issue by telling Chef not to reboot after joining a domain and creating a remote_exec provisioner following the chef provisioner to run shutdown /r.

@pkolyvas pkolyvas added the needs-maintainer This code is currently unmaintained. Please submit a PR against our CODEOWNERS to volunteer. label Apr 14, 2020
@danieldreier
Copy link
Contributor

I'm closing this issue because we announced tool-specific (vendor or 3rd-party) provisioner deprecation in mid-September 2020. Additionally, we added a deprecation notice for tool-specific provisioners in 0.13.4. On a practical level this means we will no longer be reviewing or merging PRs for built-in plugins like the chef provisioner.

The discuss post linked above explains this in more depth, but the basic reason we're making this change is that these vendor provisioners have been extremely challenging for us to maintain, and are a weak spot in the terraform user experience. People reach for them not realizing the bugs and UX limitations, and they're areas that are difficult for us to maintain because of the huge surface area of integrating with a bunch of different tools (Puppet, Chef, Salt, etc) that each require deep domain knowledge to do right. For example, testing each of these against all the versions of those tools, on multiple platforms, is prohibitive, and so we don't - but users have a reasonable expectation that everything in the Terraform Core codebase is well tested. Similarly, it's tough to accept PRs, even for useful improvements, because we don't have anyone on the core team with deep Chef knowledge, and we have not been able to get community volunteers to own PR review for this codebase, so it's a shot in the dark whether a given PR makes things better or worse from the perspective of an experienced Chef + Terraform user.

For the time being, the best option if you want to fix this bug, is to work with the community and build a standalone chef provisioner, fix this in it, and distribute it as a plugin binary, similar to how the ansible provisioner is distributed.

I'm aware of the limitations of this approach, but it's the best option compared to coupling provisioner development to the Terraform Core release lifecycle. We believe the benefit to users of having provisioner development decoupled from core, exceeds the convenience of having these provisioners built in to core. We want to provide a better user experience in the future, and our hope here is that the ability to improve, fix and repair provisioners without us blocking their development, much like providers, will help make a strong case for what's next.

I think it’s also important to highlight that we have no plans to remove the generic provisioners or the pluggable functionality during Terraform's 1.0 lifecycle.

I appreciate your input here to improve Terraform, and am always happy to talk. Please feel free to reach out to me or Petros Kolyvas if you would like to talk more about this change.

@ghost
Copy link

ghost commented Nov 15, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@ghost ghost locked as resolved and limited conversation to collaborators Nov 15, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
needs-maintainer This code is currently unmaintained. Please submit a PR against our CODEOWNERS to volunteer. provisioner/chef
Projects
None yet
Development

No branches or pull requests

5 participants