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

Removing default nameservers #18

Merged
merged 1 commit into from Sep 11, 2017

Conversation

Projects
None yet
2 participants
@jonathantullett
Copy link

commented Sep 7, 2017

As arrays are merged on attribute resolution rather than user provided ones taking precedence this can lead to confusion on the resulting resolv.conf including more than just expected provided servers

See:
http://devopsblues.com/how-to-overwrite-attribute-array-elements-instead-of-merging-in-chef/

@chr4

This comment has been minimized.

Copy link
Member

commented Sep 7, 2017

Thanks for the report and pull-request!
Things like this are the reason why I never (unless there's absolutely no other option) use node attributes in Chef - and I always try to use wrapper cookbooks instead.

Maybe removing the default nameservers is a good idea in general. Did you check what happens when no nameservers at all are set? Will the resulting /etc/resolv.conf just have no nameserver entry at all? Does the cookbook throw an error?

Note: Removing the defaults would be a major version release, as it will break setups relying on the defaults being set.

@jonathantullett

This comment has been minimized.

Copy link
Author

commented Sep 7, 2017

Without nameservers set, the resolv.conf has no nameservers. Nothing else appears affected.

If there's a way to only use the defaults if none others are specified that would be the best of both worlds, but otherwise no defaults and a major version bump will be great.

@chr4 chr4 merged commit d9216fd into chr4-cookbooks:master Sep 11, 2017

@chr4

This comment has been minimized.

Copy link
Member

commented Sep 11, 2017

Released in v1.0.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.