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

Why is node.set/node.normal being used in server.rb #117

Open
youngjl1 opened this issue Oct 19, 2016 · 1 comment
Open

Why is node.set/node.normal being used in server.rb #117

youngjl1 opened this issue Oct 19, 2016 · 1 comment

Comments

@youngjl1
Copy link

Cookbook version

latest

Chef-client version

11.16.2

Platform Details

amazon linux

Scenario:

using roles have a server change from including recipe "rsyslog::server" to including "rsyslog::client"

Steps to Reproduce:

have two roles, one that includes recipe "rsyslog::server" and one that includes "rsyslog::client." If you switch from server to client role it will not work.

Expected Result:

client recipe is run

Actual Result:

client recipe starts to run but it immediately returns because the first line is:

return if node['rsyslog']['server']

this is because server.rb is using

node.normal['rsyslog']['server'] = true

this permanently sets that attribute on the node. so even if you start including the client recipe (and stop including server), the above setting persists and overrides the default of false. Why does this attribute have to be permanently applied to the server? Is there some reason, and if not it could be changed to

node.override['rsyslog']['server'] = true
@tas50
Copy link
Contributor

tas50 commented Dec 26, 2016

This should probably be refactored to remove the use of node.normal. It's mostly just legacy best practices from 2009/2010 era

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

No branches or pull requests

3 participants