diff options
-rw-r--r-- | CHANGELOG.md | 8 | ||||
-rw-r--r-- | RELEASE_NOTES.md | 21 |
2 files changed, 29 insertions, 0 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index e22cb2f150..a16a8dfa76 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -138,6 +138,14 @@ ### Chef Contributions +* Added os/platform_family options to provides syntax on the Chef::Resource DSL +* Added provides methods to the Chef::Provider DSL +* Added supported?(resource, action) class method to all Providers for late-evaluation if a provider can handle a + resource +* Added ProviderResolver feature to handle late resolution of providers based on what kinds of support is in the + base operating system. +* Partial Deprecation of Chef::Platform provider mapping. The static mapping will be removed as Chef-12 progresses + and the hooks will be completely dropped in Chef-13. * Default `guard_interpreter` for `powershell_script` resource set to `:powershell_script`, for `batch` to `:batch` * Recipe definition now returns the retval of the definition * Add support for Windows 10 to version helper. diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index ca1f504ba5..3541460625 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -425,3 +425,24 @@ Events by default will be logged to the "Application" event log on Windows. Chef * Run fails Information about these events can be found in `Chef::EventDispatch::Base`. + +## Resource and Provider Resolution changes + +Resource resolution and provider resolution has been made more dynamic in Chef-12. The `provides` syntax on the +Chef::Resource DSL (which has existed for 4 years) has been expanded to use platform_family and os and has been applied +to most resources. This does early switching at compile time between different resources based on the node data returned +from ohai. The effect is that previously the package resource on a CentOS machine invoked via `package "foo"` would be +an instance of Chef::Resource::Package but would use the Chef::Provider::Package::Yum provider. After the changes to +the resources the resource will be an instance of Chef::Resource::YumPackage and will do the correct validation for +the yum package provider. + +For the service resource it uses late validation via the Chef::ProviderResolver and will dynamically select which +service provider to use at package converge time right before the service provider actions are invoked. This means +that if Chef is used to install systemd (or alternatively to remove it) then the ProviderResolver will be invoked +and will be able to determine the proper provider to start the service. It also allows for multiple providers to +be invoked for a resource on a case-by-case basis. The old static one-to-one Chef::Platform provider mapping was +inflexible since it cannot handle the case where an admin installs or removes a subsystem from a distro, and cannot +handle the case where there may be multiple providers that handle different kinds of services (e.g. Upstart, SysV, +etc). This fixes the Ubuntu 14.04 service resource problems, and can handle arbitrarily complicated future distro +and administrative preferences dynamically. + |