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

ntp cookbook collates/merges/concatenates ntp server attributes in base and ntp-server roles #151

Open
benvaljean opened this issue Jun 27, 2016 · 1 comment

Comments

@benvaljean
Copy link

Instead of chef-client allowing the role attributes for the ntp servers in the ntp-server role to replace the attributes in the base (or environment file) it instead uses both sets of attributes - the two attributes of differing precedence get concatenated.

According to the example it is possible to specific the internal ntp servers in a role such as base, and supply the ntp servers' upstream external time sources in a separate role.

It seems this problem is not unique: https://tickets.opscode.com/browse/CHEF-2780

This seems to be quite an obvious problem though that would affect everyone on Chef 11+ so perhaps I am doing something wrong.

@benvaljean
Copy link
Author

An example of it broken in action:

[user@internal-ntp-server ~]$ ntpq -p
     remote           refid      st t when poll reach   delay   offset  jitter
==============================================================================
*10.x.y.z     193.62.22.74     2 u    2   64    1    0.113   -1.262   0.532
+dns1.eng.cam.ac 128.232.103.138  2 u    1   64    1   15.893    0.654   0.003
+ntp1.cam.ac.uk  197.205.52.7     2 u    2   64    1   15.979    0.302   0.000
 ntp1.ja.net     .GPS.            1 u    1   64    1   15.857    0.638   0.000
 ntp3.ja.net     .INIT.          16 u    -   64    0    0.000    0.000   0.000
 LOCAL(0)        .LOCL.          10 l    -   64    0    0.000    0.000   0.000

See how one of our internal ntp servers has the other internal ntp listed as a time source. As this is internal with the lowest ping this gets chosen. The other internal ntp server performs the same logic, the result being the two internal ntp servers choose each other as a time source.

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