[4.0] chrony: default `pool 2.azurelinux.pool.ntp.org` does not resolve (NXDOMAIN); non-Azure hosts may get no NTP source
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 63/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- linux
調査の方向性
base/comps/chrony/chrony.comp.toml と specs/c/chrony/chrony.spec から始めます。issue では、これらが overlay と生成される pool 名のソースとして示されています。パッケージ化された /etc/chrony.conf がどのように構築されるかを確認し、次に、示された再現手順で、結果の pool が名前解決され、chronyd が時刻測定値を取得できることを検証します。Azure PTP クロックのないホストでデフォルトのソースが名前解決されれば完了です。
索引モデルが issue の本文から書いたものです。
説明
Environment
- Azure Linux version and/or image name: 4.0 (
vm-baseimage built from4.0at27484b424b) - Kernel version: N/A (config issue; reproduced in
mcr.microsoft.com/azurelinux/core:4) - Architecture: all (noarch config, x86_64 verified)
- Affected package(s) and version(s), if applicable:
chrony-4.8-6.azl4 - Custom image or package modifications, if applicable: none
Deployment / platform
- Azure VM (mitigated by the PTP refclock; see below)
- AKS
- Azure Linux container image
- Other: any host without
azurelinux-release-identity-cloudand/or/dev/ptp_hyperv.
Describe the bug
The default /etc/chrony.conf shipped by chrony contains:
pool 2.azurelinux.pool.ntp.org iburst
azurelinux.pool.ntp.org is not a registered NTP Pool vendor zone, so the name does not resolve:
$ host 2.azurelinux.pool.ntp.org
Host 2.azurelinux.pool.ntp.org not found: 3(NXDOMAIN)
$ host 2.fedora.pool.ntp.org
2.fedora.pool.ntp.org has address 68.197.222.112
The name comes from the Fedora spec, which derives the vendor zone from the build root's /etc/os-release:
%if 0%{!?vendorzone:1}
%global vendorzone %(source /etc/os-release && echo ${ID}.)
%endif
...
test -n "%{vendorzone}"
sed -e 's|^\(pool \)\(pool.ntp.org\)|\12.%{vendorzone}\2|' ...
On Azure Linux, ID=azurelinux gives 2.azurelinux.pool.ntp.org. The spec also refuses an empty vendor zone, so this can't be fixed with a simple define.
Impact
- Azure VMs with the cloud identity package:
azurelinux-release-identity-cloudinstalls/etc/chrony.d/chrony-azure.conf(refclock PHC /dev/ptp_hyperv ...), and chrony's confdir picks it up. Time sync works via Hyper-V PTP. The broken pool only causes repeated failed DNS lookups and log noise. - Everything else (no cloud identity package, or no
/dev/ptp_hyperv): the only remaining source issourcedir /run/chrony-dhcp. If DHCP doesn't supply NTP servers, the clock is never synchronised, with no obvious error. Clock drift then breaks TLS validation, Kerberos and log correlation.
Steps to reproduce
Reproducible in the public container image; no privileges are needed (chronyd -Q only queries servers and never sets the clock):
docker run --rm mcr.microsoft.com/azurelinux/core:4 bash -c '
dnf -y -q install chrony >/dev/null
rpm -q chrony
grep -E "^(pool|server|sourcedir|refclock)" /etc/chrony.conf
getent hosts 2.azurelinux.pool.ntp.org || echo "NXDOMAIN: 2.azurelinux.pool.ntp.org"
echo "--- shipped config:"; chronyd -Q -t 20 -f /etc/chrony.conf; echo "exit=$?"
echo "--- generic pool:"; chronyd -Q -t 20 "pool 2.pool.ntp.org iburst"; echo "exit=$?"
'
Output (trimmed):
chrony-4.8-6.azl4.x86_64
pool 2.azurelinux.pool.ntp.org iburst
sourcedir /run/chrony-dhcp
NXDOMAIN: 2.azurelinux.pool.ntp.org
--- shipped config:
chronyd version 4.8 starting (...)
Timeout reached
exit=1
--- generic pool:
chronyd version 4.8 starting (...)
System clock wrong by 0.006126 seconds (ignored)
exit=0
With the shipped config, chronyd finds no usable source within 20 s. The same chronyd with a resolvable pool gets a measurement in ~5 s.
Expected behavior
The default configuration names an NTP source that resolves, so hosts without the Azure PTP clock still sync time.
Actual behavior
The default pool name is NXDOMAIN, so time sync depends entirely on the Azure PTP refclock or DHCP-provided NTP servers.
Possible fixes
- Add an overlay to
base/comps/chrony/chrony.comp.tomlthat rewrites the pool line to a resolvable source: the generic2.pool.ntp.org(chrony upstream ships plainpool.ntp.org; the2.prefix adds IPv6), or a Microsoft-operated source if that's the product preference. - Register an
azurelinuxvendor zone with the NTP Pool project (https://www.ntppool.org/vendors.html), as Fedora/RHEL/CentOS do, then keep the current name.
Option 1 is a quick fix; option 2 is the long-term one if a vendor zone is wanted.
Additional context
- Rendered spec:
specs/c/chrony/chrony.spec(vendorzone derivation, non-empty check, and thesedthat rewrites the pool line). - Azure PTP snippet:
base/comps/azurelinux-release/chrony-azure.conf, packaged inazurelinux-release-identity-cloud. - Not checked: whether Azure Linux 3.0 had the same behaviour.
- 主要言語
- Python
- スター
- 5.4k
- フォーク
- 711
- 平均マージ
- 1日 10時間
- マージ済み PR(30日)
- 603
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
microsoft/azurelinux のほかの issue
-
3.0 AKS
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
microsoft/azurelinux#19651 · コメント 1 件 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
-
3.0
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
microsoft/azurelinux#19417 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
[4.0] Offline installer does not handle HTTP URLs in inst.ks kernel parameter対応中かも @sonarbhavarth が 115 日前に担当しました。 オープン4.0 enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
microsoft/azurelinux#17915 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
[4.0] Live installer initrd missing NFS dracut module preventing NFS based PXE deployment対応中かも @IzanVil が 63 日前に担当しました。 オープン4.0 enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
microsoft/azurelinux#17913 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
Wire guardオープンbug
難易度 5/5 1週間以上 初心者へのやさしさ 15/100
microsoft/azurelinux#19828 ·
メンテナーはふだん 1 日以内に返信
microsoft/azurelinux の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
メンテナーはふだん 2 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
メンテナーはふだん 2 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
developmentseed/titiler-cmr#278 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 2 日以内に返信