Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix ntp service restart when settings change #2270

Merged
merged 2 commits into from
Jul 11, 2022

Conversation

bcressey
Copy link
Contributor

Issue number:
N/A

Description of changes:
Since the service is named "ntp" rather than "chronyd", the restart commands were not run when NTP settings changed.

Testing done:
Confirmed that both newly launched and upgraded hosts restart the NTP service after settings change.

Terms of contribution:

By submitting this pull request, I agree that this contribution is dual-licensed under the terms of both the Apache License, version 2.0, and the MIT license.

Since the service is named "ntp" rather than "chronyd", the restart
commands were not run when NTP settings changed.

Signed-off-by: Ben Cressey <[email protected]>
Ensure that existing hosts get the fix to properly restart the NTP
service on upgrade.

Signed-off-by: Ben Cressey <[email protected]>
Copy link
Member

@markusboehme markusboehme left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR was a helpful exercise for me. Leaving this here for someone to correct me if my understanding is wrong: The mix-up happened because Bottlerocket's API and model just talk of an NTP service in the abstract, whereas currently this is implemented via Chrony (chrony systemd service). The API and thar-be-settings only care about the generic service name. The fact it's Chrony is hidden in the model and considered an implementation detail.

@bcressey
Copy link
Contributor Author

The API and thar-be-settings only care about the generic service name. The fact it's Chrony is hidden in the model and considered an implementation detail.

That's right!

@bcressey bcressey merged commit 49b1136 into bottlerocket-os:develop Jul 11, 2022
@bcressey bcressey deleted the ntp-restart branch July 11, 2022 23:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants