timesync icon indicating copy to clipboard operation
timesync copied to clipboard

feat: add manage option leapsectz

Open brakkio86 opened this issue 1 year ago • 11 comments

Enhancement: support leapsectz option

Reason: this option is mandatory in order to manage leap second situation

Result: new option available

Issue Tracker Tickets (Jira or BZ if any):

brakkio86 avatar Nov 02 '23 09:11 brakkio86

Clients normally accept leap second information from their servers. The leapsectz option is mainly useful to set the TAI-UTC offset of the system clock. A potential issue is incompatibility with leap-smearing servers.

mlichvar avatar Nov 02 '23 11:11 mlichvar

Clients normally accept leap second information from their servers. The leapsectz option is mainly useful to set the TAI-UTC offset of the system clock. A potential issue is incompatibility with leap-smearing servers.

If we document this in the README, is it ok to allow this feature to be supported?

richm avatar Nov 06 '23 17:11 richm

Clients normally accept leap second information from their servers. The leapsectz option is mainly useful to set the TAI-UTC offset of the system clock. A potential issue is incompatibility with leap-smearing servers.

If we document this in the README, is it ok to allow this feature to be supported?

@mlichvar ^^^

richm avatar Nov 13 '23 14:11 richm

A warning about imcompatibility with leapsmearing servers would be nice.

However, I don't like the chrony-specific variable name. Would something like local_leap_source as a boolean work better? This would open up the possibility for support with ntpd, which has the leapfile file directive and some systems have the leap file included with their tzdata at known location.

The support for leapsectz directive was added long time ago. Is there other reason for having the >= 4.0 conditional?

mlichvar avatar Nov 13 '23 14:11 mlichvar

ping - any update?

richm avatar Nov 29 '23 23:11 richm

ping - any update? Can we close this?

richm avatar Dec 12 '23 16:12 richm

Hello,

The support for leapsectz directive was added long time ago. Is there other reason for having the >= 4.0 conditional?

My fault, I didn't find when whas introduced and then I put this check. Now I verify and removed the conditional.

brakkio86 avatar Dec 15 '23 09:12 brakkio86

A warning about imcompatibility with leapsmearing servers would be nice.

I've added the documenation and warning section.

brakkio86 avatar Dec 15 '23 09:12 brakkio86

Do we need this PR at all? Can you use timesync_chrony_custom_settings https://github.com/linux-system-roles/timesync#role-variables:

timesync_chrony_custom_settings:
  - "leapsectz right/UTC"

?

richm avatar Dec 15 '23 15:12 richm

Do we need this PR at all? Can you use timesync_chrony_custom_settings https://github.com/linux-system-roles/timesync#role-variables:

timesync_chrony_custom_settings:
  - "leapsectz right/UTC"

?

Yes, it could be use. In my philosofy, I prefer explicit setting.

brakkio86 avatar Dec 18 '23 09:12 brakkio86

Do we need this PR at all? Can you use timesync_chrony_custom_settings https://github.com/linux-system-roles/timesync#role-variables:

timesync_chrony_custom_settings:
  - "leapsectz right/UTC"

?

Yes, it could be use. In my philosofy, I prefer explicit setting.

Either way is fine with my. One problem with having an explicit setting is that there is a chance of a duplicate entry. For example, if the user specifies

timesync_chrony_leapsectz: "right/UTC"
...
timesync_chrony_custom_settings:
  - "leapsectz left/UTC"

then I think the config file will have both settings. Yes, this is an unlikely scenario, but if you have a complex inventory with multiple hosts and host groups https://docs.ansible.com/ansible/latest/inventory_guide/index.html then you may have a "general" setting in one file with

timesync_chrony_custom_settings:
  - "leapsectz left/UTC"

and a host/region specific setting timesync_chrony_leapsectz: "right/UTC" and will have to figure out how the rules of precedence merge these values for a given host.

Of course we will document in the README something like "Do not use both timesync_chrony_leapsectz and have leapsectz in timesync_chrony_custom_settings".

Do we need to add code to the role to check if timesync_chrony_custom_settings contains leapsectz if timesync_chrony_leapsectz is set?

richm avatar Jan 07 '24 22:01 richm

closing due to inactivity

richm avatar Aug 01 '24 22:08 richm