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

TimeMonitor should pick the results chosen by ntpdate when mutiple are available

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: SignServer 4.3.1
    • Component/s: TimeMonitor
    • Labels:
      None
    • Stakeholder:
      Customer
    • Sprint:
      SignServer-Sprint 79, SignServer-Sprint 80, SignServer-Sprint 81

      Description

      When configuring TimeMonitor with multiple hosts the first results from ntpdate with a stratum above zero is chosen. However, that might not be the best result and not the server chosen by ntpdate.

      If the (incorrectly) chosen server has an incorrect time but the other are fine, this could potentially be causing a false positive and set the state to OUT_OF_SYNC.

      See below example where the TimeMonitor would use the second line of output for 91.189.89.198 while at the last line it can be seen that ntpdate instead chose 91.189.89.199:

      [user@work ~]$ ntpdate -p 1 -t 0.2 -q 127.0.0.1 ntp.ubuntu.com 127.1.1.1
      server 127.0.0.1, stratum 0, offset 0.000000, delay 0.00000
      server 91.189.89.198, stratum 2, offset 2.454932, delay 0.06888
      server 91.189.91.157, stratum 2, offset 2.431183, delay 0.19104
      server 91.189.89.199, stratum 2, offset 2.457274, delay 0.06342
      server 91.189.94.4, stratum 2, offset 2.455926, delay 0.06697
      server 127.1.1.1, stratum 0, offset 0.000000, delay 0.00000
       6 Apr 10:03:27 ntpdate[3642]: step time server 91.189.89.199 offset 2.457274 sec
      
      • Change the logic in TimeMonitor to instead look at the last line with the format like "DATE ntpdate[PID] step time server HOST offset TIME sec".
      • Write manuel test steps (text) for QA.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              vinays Vinay Singh (Inactive)
              Reporter:
              markus Markus KilÄs
              Verified by:
              Marcus Lundblad
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - 1 day, 4 hours
                  1d 4h
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 1 day, 53 minutes Time Not Required
                  1d 53m