Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

[4.0] chrony: default `pool 2.azurelinux.pool.ntp.org` does not resolve (NXDOMAIN); non-Azure hosts may get no NTP source

オープン 初心者向け
#19,834 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 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 の本文から書いたものです。

説明

4.0 bug

Environment

  • Azure Linux version and/or image name: 4.0 (vm-base image built from 4.0 at 27484b424b)
  • 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-cloud and/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-cloud installs /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 is sourcedir /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

  1. Add an overlay to base/comps/chrony/chrony.comp.toml that rewrites the pool line to a resolvable source: the generic 2.pool.ntp.org (chrony upstream ships plain pool.ntp.org; the 2. prefix adds IPv6), or a Microsoft-operated source if that's the product preference.
  2. Register an azurelinux vendor 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 the sed that rewrites the pool line).
  • Azure PTP snippet: base/comps/azurelinux-release/chrony-azure.conf, packaged in azurelinux-release-identity-cloud.
  • Not checked: whether Azure Linux 3.0 had the same behaviour.
主要言語
Python
スター
5.4k
フォーク
711
平均マージ
1日 10時間
マージ済み PR(30日)
603

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

microsoft/azurelinux のほかの issue

microsoft/azurelinux の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。