-
Notifications
You must be signed in to change notification settings - Fork 522
feat: Enable chrony and host-based time sync by default on Ubuntu 18.04 #4011
Conversation
/azp run pr-e2e |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run pr-e2e |
Azure Pipelines successfully started running 1 pipeline(s). |
Codecov Report
@@ Coverage Diff @@
## master #4011 +/- ##
=======================================
Coverage 73.08% 73.08%
=======================================
Files 145 145
Lines 21776 21776
=======================================
Hits 15914 15914
Misses 4829 4829
Partials 1033 1033
Continue to review full report at Codecov.
|
/azp run pr-e2e |
Commenter does not have sufficient privileges for PR 4011 in repo Azure/aks-engine |
@@ -87,9 +87,8 @@ fi | |||
{{end}} | |||
|
|||
if [[ ${UBUNTU_RELEASE} == "18.04" ]]; then | |||
if apt list --installed | grep 'ntp'; then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In order for this to work on 18.04 prior to building a new VHD w/ chrony already installed is to protect the configureChrony
and ensureChrony
invokations inside a if apt list --installed | grep 'chrony'; then
block.
Otherwise we're going to get a CSE error on all 18.04 VHD nodes ("distro": "aks-ubuntu-18.04"
):
+ sleep 5
+ for i in $(seq 1 $retries)
+ timeout 30 systemctl daemon-reload
+ timeout 30 systemctl restart chrony
Failed to restart chrony.service: Unit chrony.service not found.
+ '[' 100 -eq 100 ']'
+ return 1
+ ret=1
+ systemctl status chrony --no-pager -l
Unit chrony.service could not be found.
+ '[' 1 -ne 0 ']'
+ return 1
+ exit 4
tested this changeset locally using the non-VHD 18.04 image and am consistently getting a failure in this E2E scenario: (not sure why, will have to look into it) |
f4aadb1
to
e70b683
Compare
This passes my smoke tests, am planning to merge. |
/azp run pr-e2e |
Azure Pipelines successfully started running 1 pipeline(s). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: ericsuhong, jackfrancis The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Reason for Change:
Use chrony + host-based time sync which is a recommended way and also work in airgap clouds.
All Azure Ubuntu 18.04 stock images already come with chrony enabled as well.
Issue Fixed:
#2552
Credit Where Due:
Does this change contain code from or inspired by another project?
If "Yes," did you notify that project's maintainers and provide attribution?
Requirements:
Notes:
Reference: https://docs.microsoft.com/en-us/azure/virtual-machines/linux/time-sync