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

Remove local clock feature #219

Merged
merged 3 commits into from
Feb 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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