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 resource_for_node() instead of hardcoding User #518

Closed
wants to merge 1 commit into from
Closed

Use resource_for_node() instead of hardcoding User #518

wants to merge 1 commit into from

Conversation

docwhat
Copy link
Contributor

@docwhat docwhat commented Oct 5, 2016

With Chef 12.14.89 the Chef::Resource::User class isn't "real" and
throws NotImplementedError (with no message, grrr) and shows up
in the output as user_resource_abstract_base_class.

Instead, Chef::Resource.resource_for_node(:user, node) has to be
used to get the real user class (e.g. LinuxUser)

Fixes #513

@docwhat
Copy link
Contributor Author

docwhat commented Oct 5, 2016

This probably should be done for all other Chef::Resource::Foo occurrences as well.

@docwhat
Copy link
Contributor Author

docwhat commented Oct 5, 2016

Paging Dr. @tas50

Also, I filed chef/chef#5412 to have Chef explain itself better in the future.

With Chef 12.14.89 the `Chef::Resource::User` class isn't "real" and
throws `NotImplementedError` (with no message, grrr) and shows up
in the output as `user_resource_abstract_base_class`.

Instead, `Chef::Resource.resource_for_node(:user, node)` has to be
used to get the real user class (e.g. `LinuxUser`)

Fixes #513

Signed-off-by: Christian Höltje <docwhat@gerf.org>
@lamont-granquist
Copy link
Contributor

@iennae is working on a fix using build_resource

@iennae
Copy link
Contributor

iennae commented Oct 10, 2016

@docwhat Thanks for your contribution here, but I'm not going to be pulling this in. As @lamont-granquist mentioned I'm going to be fixing the Chef::Resource::* issues via build_resource as this cookbook has already moved to a 12+ model.

@iennae iennae closed this Oct 10, 2016
@docwhat docwhat deleted the pr/user_resource_abstract_base_class branch October 10, 2016 14:05
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.

3 participants