Skip to content

Commit e614724

Browse files
ddstreetchristopherco
authored andcommitted
feat: Add chrony config file to azurelinux-release-identity-cloud
Add a chrony config file so chronyd will use the Azure PTP timesource.
1 parent c3bc30b commit e614724

2 files changed

Lines changed: 10 additions & 1 deletion

File tree

base/comps/azurelinux-release/azurelinux-release.spec

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ Summary: Azure Linux release files
3636
Name: azurelinux-release
3737
Version: 4.0
3838
# TODO(azl): Review whether we can move back to autorelease (with conditional -p)
39-
Release: 3%{?dist}
39+
Release: 4%{?dist}
4040
License: MIT
4141
URL: https://aka.ms/azurelinux
4242

@@ -51,6 +51,7 @@ Source16: 20-azurelinux-defaults.conf
5151
Source17: 20-azure.conf
5252
Source18: proc-version-override.service
5353
Source19: proc-version-override.sh
54+
Source20: chrony-azure.conf
5455

5556
BuildArch: noarch
5657

@@ -331,6 +332,7 @@ sed -i -e "s|(%{release_name}%{?prerelease})|(Cloud Variant%{?prerelease})|g" %{
331332
sed -e "s#\$version#%{bug_version}#g" -e 's/$variant/Cloud/;s/<!--.*-->//;/^$/d' %{SOURCE15} > %{buildroot}%{_swidtagdir}/com.microsoft.AzureLinux-variant.swidtag.cloud
332333
sed -i -e "/^DEFAULT_HOSTNAME=/d" %{buildroot}%{_prefix}/lib/os-release.cloud
333334
install -Dm0644 %{SOURCE17} -t %{buildroot}%{_prefix}/lib/sysctl.d/
335+
install -Dm0644 %{SOURCE20} -t %{buildroot}%{_sysconfdir}/chrony.d/
334336
%endif
335337

336338
%if %{with container}
@@ -442,6 +444,7 @@ install -Dm0755 %{SOURCE19} %{buildroot}%{_libexecdir}/proc-version-override
442444
%{_prefix}/lib/os-release.cloud
443445
%attr(0644,root,root) %{_swidtagdir}/com.microsoft.AzureLinux-variant.swidtag.cloud
444446
%{_prefix}/lib/sysctl.d/20-azure.conf
447+
%{_sysconfdir}/chrony.d/chrony-azure.conf
445448
%endif
446449

447450

@@ -463,6 +466,9 @@ install -Dm0755 %{SOURCE19} %{buildroot}%{_libexecdir}/proc-version-override
463466

464467

465468
%changelog
469+
* Wed Apr 08 2026 Dan Streetman <ddstreet@ieee.org> - 4.0-4
470+
- Configure chrony to use Azure PTP timesource
471+
466472
* Tue Apr 01 2026 Rachel Menge <rachelmenge@microsoft.com> - 4.0-3
467473
- Add proc-version-override service for Guest-Configuration-Extension compat
468474

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Azure's virtual time source:
2+
# https://docs.microsoft.com/en-us/azure/virtual-machines/linux/time-sync#check-for-ptp-clock-source
3+
refclock PHC /dev/ptp_hyperv poll 3 dpoll -2 offset 0

0 commit comments

Comments
 (0)