Uploaded image for project: 'SignServer'
  1. SignServer
  2. DSS-825

Implement internal SNTP client instead of executing the NTP commands in TimeMonitor

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: TimeMonitor
    • Labels:
      None

      Description

      Currently the TimeMonitor executes the 'ntpdate' and 'ntpq' commands. Executing external commands take time and is not efficient. We could replace the usage of ntpdate with our own implementation of an SNTP client. Then we would not need to call 'ntpq' either as the leap information would already be available from our SNTP client.

      Advantages:
      + Faster execution
      + No need to configure external commands that must exist
      + No execution of external commands
      + Full control of the implementation
      + Independence of local NTP daemon/service. I.e. instead of NTPd, Chrony could be used (assuming we would also get leap second information from the query or that we add support for using a leapseconds file or tzdata)
      + ntpdate might get removed in future distributions

      Disadvantages:

      • Java time resolution is only milliseconds
      • More code to maintain

       

      Note: This would also be a solution to the issue with ntp-tools not being available from RHEL/CentOS 8 (see DSS-2102)

      Tasks in this ticket:

      • Add configuration option to timemonitor.properties to use either ntp-tools (default/legacy) or to use the new builtin support
      • Implement SNTP functionality, possibly based on the prototype
      • Use the SNTP functionality in TimeMonitor
      • Add unit tests
      • Re-test leap-second handling tests
      • Update documentation (including TimeMonitor Manual)

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              markus Markus Kilås
              Reporter:
              markus Markus Kilås
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:

                  Time Tracking

                  Estimated:
                  Original Estimate - 3 days, 3 hours
                  3d 3h
                  Remaining:
                  Remaining Estimate - 3 days, 3 hours
                  3d 3h
                  Logged:
                  Time Spent - Not Specified
                  Not Specified