Skip to content

add tos_orphan parameter #452

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

Merged
merged 3 commits into from
Mar 26, 2018
Merged
Show file tree
Hide file tree
Changes from 2 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
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -635,6 +635,16 @@ Specifies the cohort tos option. Valid options: 0 or 1.

Default value: 0.

#### `tos_orphan`

Optional.

Data type: Integer[1].

Enables orphan mode at stated stratum level. The recommended value for tos\_orphan is 2 more than the worst-case externally-reachable source of time.
Participing ntpd instances must be in a mesh with each others (e.g. peers).
[ntp.org](http://support.ntp.org/bin/view/Support/OrphanMode)

#### `tinker`

Data type: Boolean.
Expand Down
1 change: 1 addition & 0 deletions data/common.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ ntp::tos_floor: 1
ntp::tos_maxclock: 6
ntp::tos_minclock: 3
ntp::tos_minsane: 1
ntp::tos_orphan: 6
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is having this enabled by default at a value of 6 for all users and OS's a reasonable default? This would affect all users as-is.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wouldn't. This option was added in ntpd 4.2.2, I think, and might be not available everywhere, so it can be a breaking change.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ntpd 4.2.2 was released in October 2005. An older version shouldn't be around anymore. The default should have been fine for all users as you shouldn't have an upstream ntp with a stratum worse than 4 as source for your pool.

It would have clashed with users of the undisciplined local clock which shouldn't be used with 4.2.2 and later (ntpd documentation).

ntp::tos: false
ntp::udlc_stratum: 10
ntp::udlc: false
5 changes: 5 additions & 0 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,10 @@
# @param peers
# List of NTP servers with which to synchronise the local clock.
#
# @param tos_orphan
# Enables Orphan mode for peer group
# Value: Should be set to 2 more than the worst-case externally-reachable source's stratum.
#
# @param pool
# List of NTP server pools with which to synchronise the local clock.
#
Expand Down Expand Up @@ -255,6 +259,7 @@
Optional[Integer[1]] $tos_minsane,
Optional[Integer[1]] $tos_floor,
Optional[Integer[1]] $tos_ceiling,
Optional[Integer[1]] $tos_orphan,
Variant[Boolean, Integer[0,1]] $tos_cohort,
Boolean $udlc,
Optional[Integer[1,15]] $udlc_stratum,
Expand Down
4 changes: 4 additions & 0 deletions templates/ntp.conf.epp
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,10 @@ ntpsigndsocket <%= $ntp::ntpsigndsocket %>
<% $ntp::peers.each |$peer| {-%>
peer <%= $peer %>
<% } -%>
<% if $ntp::tos_orphan {-%>
# Enable peer group orphan mode
tos orphan <%= $ntp::tos_orphan %>
<% } -%>
<% } -%>
<% unless $ntp::pool.empty {-%>

Expand Down