Skip to content

Commit

Permalink
Remove local clock feature (#219)
Browse files Browse the repository at this point in the history
* Remove local clock feature, no longer recommended

Signed-off-by: Hans Rakers <h.rakers@global.leaseweb.com>

* Update CHANGELOG

Signed-off-by: Hans Rakers <h.rakers@global.leaseweb.com>

---------

Signed-off-by: Hans Rakers <h.rakers@global.leaseweb.com>
Co-authored-by: Dan Webb <dan.webb@damacus.io>
  • Loading branch information
hrak and damacus authored Feb 16, 2023
1 parent 065ec99 commit 6e25a31
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 14 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ This file is used to list changes made in each version of the ntp cookbook.

## Unreleased

- Remove local clock feature, this is no longer recommended

## 4.0.0 - *2023-02-16*

Remove Delivery
Expand Down
5 changes: 0 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -250,11 +250,6 @@ These attributes are set based on platform / system information provided by Ohai
- Defaults to false and will make no provisions for apparmor.
- If a platform has apparmor enabled (currently Ubuntu) default will become true.

- `ntp['use_cmos']`

- Boolean, uses a high stratum undisciplined clock for machines with real CMOS clock.
- Defaults to true unless a platform appears to be virtualized according to Ohai.

- `ntp['pkg_source']`
- _Only applicable to Solaris 10_
- String, device/path to Solaris packages.
Expand Down
1 change: 0 additions & 1 deletion attributes/default.rb
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,5 @@
default['ntp']['var_owner'] = 'root'
end

default['ntp']['use_cmos'] = !node['virtualization'] || node['virtualization']['role'] != 'guest' ? true : false
default['ntp']['leapfile_url'] = 'ntp.leapseconds'
default['ntp']['leapfile_from_mirror'] = false
1 change: 0 additions & 1 deletion spec/unit/recipes/default_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,6 @@
cached(:chef_run) do
runner = ChefSpec::SoloRunner.new(platform: 'ubuntu', version: '16.04')
runner.node.override['ntp']['pools'] = %w(0.pool.ntp.org 1.pool.ntp.org)
runner.node.override['ntp']['use_cmos'] = false
runner.converge('ntp::default')
end

Expand Down
7 changes: 0 additions & 7 deletions templates/ntp.conf.erb
Original file line number Diff line number Diff line change
Expand Up @@ -90,13 +90,6 @@ restrict -6 ::1<%if node['ntp']['localhost']['noquery'] -%> noquery<% end -%>
<% end -%>
<% end -%>
<%# It is best practice to use a high stratum undisciplined clock, if you have a real CMOS clock %>
<%# Except cases where you have a low stratum server, or a virtualized system without a real CMOS clock %>
<% if node['ntp']['use_cmos'] -%>
<% -%>server 127.127.1.0 # local clock
<% -%>fudge 127.127.1.0 stratum 10
<% end -%>
<% if node['ntp']['orphan']['enabled'] -%>
tos orphan <%= node['ntp']['orphan']['stratum'] %>
<% end -%>
Expand Down

0 comments on commit 6e25a31

Please sign in to comment.