Bug - NTP Klib not working with IPv6 in AWS

Hello

I discovered a bug while configuring the NTP Klib to use the AWS NTP Server with the IPv6 IP. Using AWS NTP server is recommended for lower latency within the AWS cloud. Doc Reference.

Basically the ipv4 works:

"ntp_servers": ["169.254.169.123"],

And the ipv6 does not:

"ntp_servers": ["[fd00:ec2::123]"], 

I enclosed the ipv6 IP within brackets as mentioned in the documentation.

The error is:

NTP: invalid max slew frequency
klib automatic load failed (4)

I’m not setting the ntp_max_slew_ppm configuration property, therefore should be using the default value of 83333.

Screenshot:

Even though the ipv4 works, I think this should be fixed at some point.

Thanks and regards,
Ernesto Medina.

Thanks - we’ll take a look.

I tried to reproduce this issue but was unable to. I deployed a test application to a t4g.nano instance, using the ntp klib configured to query the AWS IPv6 NTP server, and everything works as expected, communication with the server is OK and the local clock gets synchronized with the NTP time. What Nanos release did you use?
Here are the relevant parts of my Ops configuration:

{
  "Klibs": ["ntp"],
  "CloudConfig" : {
    "Zone": "us-west-1a",
    "Flavor": "t4g.nano",
    "EnableIPv6": true
  },
  "ManifestPassthrough": {
    "ntp_servers": ["[fd00:ec2::123]"]
  }
}

Note that IPv6 networking must be enabled via the “EnableIPv6” option, otherwise the ntp klib won’t be able to contact the ntp server and you will see error messages such as “ntp_query: failed to send request: -4”

Hi Francesco

Upgrading to the latest versions of ops/nanos solved the problem.

% ~/.ops/bin/ops version
Ops version: 0.1.40
Nanos version: 0.1.48

We can close this one.
Thanks and regards,
Ernesto.