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

NTP/Chrony Configuration on Rocky via cloud-init fails with "no template found" #5872

Open
thunderboltsid opened this issue Nov 14, 2024 · 0 comments · May be fixed by #5864
Open

NTP/Chrony Configuration on Rocky via cloud-init fails with "no template found" #5872

thunderboltsid opened this issue Nov 14, 2024 · 0 comments · May be fixed by #5864
Labels
bug Something isn't working correctly new An issue that still needs triage

Comments

@thunderboltsid
Copy link

I've encountered an issue with cloud-init on Rocky Linux that prevents NTP configuration during initialization. Rocky Linux seems to be missing the necessary template for chrony configuration. In the /var/log/cloud-init-output.log, the following warnings appear:

[2024-11-08 18:24:55] Cloud-init v. 22.1-5.el9.0.1 running 'modules:config' at Fri, 08 Nov 2024 18:24:55 +0000. Up 113.25 seconds.
[2024-11-08 18:24:55] 2024-11-08 18:24:55,312 - cloud.py[WARNING]: No template found in /etc/cloud/templates for template named chrony.conf.rocky
[2024-11-08 18:24:55] 2024-11-08 18:24:55,312 - util.py[WARNING]: Running module ntp (<module 'cloudinit.config.cc_ntp' from '/usr/lib/python3.9/site-packages/cloudinit/config/cc_ntp.py'>) failed
[2024-11-08 18:24:55] Cloud-init v. 22.1-5.el9.0.1 running 'modules:final' at Fri, 08 Nov 2024 18:24:55 +0000. Up 113.94 seconds.

Upon inspection, the chrony.conf.rocky.tmpl file is indeed missing:

# ls /etc/cloud/templates/chrony*
/etc/cloud/templates/chrony.conf.alpine.tmpl
/etc/cloud/templates/chrony.conf.debian.tmpl
/etc/cloud/templates/chrony.conf.fedora.tmpl
/etc/cloud/templates/chrony.conf.opensuse.tmpl
/etc/cloud/templates/chrony.conf.photon.tmpl
/etc/cloud/templates/chrony.conf.rhel.tmpl
/etc/cloud/templates/chrony.conf.sles.tmpl
/etc/cloud/templates/chrony.conf.ubuntu.tmpl

Cloud-init recognizes ‘rocky’ as a distro in its configuration: cloudinit/config/cc_ntp.py#L40.
Newer versions of cloud-init include logic to handle similar distros through mapping: cloudinit/config/cc_ntp.py#L241-L248 however, Rocky Linux isn’t included in this mapping.

About a year ago, there was an upstream PR addressing this issue, but it wasn’t merged: PR #4627
Earlier this year, AlmaLinux folks submitted a similar PR: PR #5235
Based on these, I’ve created a new PR to add support for Rocky Linux: PR #5864

@thunderboltsid thunderboltsid added bug Something isn't working correctly new An issue that still needs triage labels Nov 14, 2024
@thunderboltsid thunderboltsid linked a pull request Nov 14, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working correctly new An issue that still needs triage
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant