aks-engine icon indicating copy to clipboard operation
aks-engine copied to clipboard

Disable ntp time sync

Open gossion opened this issue 6 years ago • 11 comments

Describe the request currently the default configuration for aks and aks-engine VMs uses both NTP time (ntp.ubuntu.com) and VMICTimeSync host-time to sync the time. The request here is to disable ntp time sync for egress purpose

Explain why AKS Engine needs it

  1. VMICtimeSync is sufficient enough for time sync, and according to azure docs, removing NTP by switching to host-only sync can sometimes improve your time sync results.
  2. ntp sync has a lot of egress traffic to ntp.ubuntu.com:123, which in some case is not allowed in customers' environment and generate a lot of error message.

Describe the solution you'd like disable ntp time sync in the image by default and use VMICTimeSync as primary

Describe alternatives you've considered or add a parameter that we can turn off ntp time sync on demand

Additional context About linux time-sync, please refer to https://docs.microsoft.com/en-us/azure/virtual-machines/linux/time-sync

gossion avatar Jan 10 '20 05:01 gossion

👋 Thanks for opening your first issue here! If you're reporting a 🐞 bug, please make sure you include steps to reproduce it.

welcome[bot] avatar Jan 10 '20 05:01 welcome[bot]

@sauryadas

gossion avatar Jan 10 '20 05:01 gossion

Interesting... I wonder if this would also help with https://github.com/Azure/aks-engine/issues/1306 (cc @jackfrancis @palma21)

CecileRobertMichon avatar Jan 10 '20 17:01 CecileRobertMichon

It could, but my plan of action was to actually propose chrony based on the Linux team's experiences and since VMICTimeSync is still mentioned as secondary to ntp on the docs. That said, it does look like it's better on the latest versions so it might be good to test.

I would love to get @szarkos, @shirgall, @linuxelf001 and @seansp's take on it

palma21 avatar Jan 11 '20 05:01 palma21

VMICTimeSync (sync time from the host that is Stratum3 in our time server hierarchy) should be sufficient to sync time even if clusters/vms are spread across different regions.

linuxelf001 avatar Jan 18 '20 16:01 linuxelf001

@ritazh Can you please assign this to someone to fix?

sauryadas avatar Jan 18 '20 20:01 sauryadas

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Mar 18 '20 20:03 stale[bot]

@ritazh @jackfrancis @CecileRobertMichon we need this feature to be able to sync time in air-gapped clouds. Can we re-open this issue?

ericsuhong avatar Apr 11 '20 22:04 ericsuhong

I found out that disabling NTP is not enough for enabling host-only sync mode. If you disable NTP, VMs till only sync from host on when VM is paused or reboot (got a confirmation from Azure Linux team). Chrony is the only way to sync time from host using PTP source.

ericsuhong avatar Apr 16 '20 16:04 ericsuhong

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Jun 17 '20 04:06 stale[bot]

I am investigating into introducing a new flag (something like "UseChrony") to use chrony to enable host-based time sync (on Ubuntu 18.04 only) as documented here: (https://docs.microsoft.com/en-us/azure/virtual-machines/linux/time-sync).

ericsuhong avatar Nov 05 '20 09:11 ericsuhong