[chrony-users] Chrony IPv6 sources offline after resume - dispatcher script runs before IPv6 is up |
[ Thread Index |
Date Index
| More chrony.tuxfamily.org/chrony-users Archives
]
- To: Networkmanager List <networkmanager-list@xxxxxxxxx>, chrony-users@xxxxxxxxxxxxxxxxxxxx
- Subject: [chrony-users] Chrony IPv6 sources offline after resume - dispatcher script runs before IPv6 is up
- From: Andrei Borzenkov <arvidjaar@xxxxxxxxx>
- Date: Thu, 12 Aug 2021 21:03:44 +0300
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=to:from:subject:message-id:date:user-agent:mime-version :content-language:content-transfer-encoding; bh=dYeag1gOmqCM6TEtQU92mqEXLrkQ+8hQRY680TAn98Y=; b=TtUPWLGh4cbNEJIJ+XEvwZPMQ1cpW3D9LK9itBfzF+8jJJ4/mp4AtEx6dV3dKM5Mf2 TT5LIH6PN6vK0+97xHbEorCUmos3Vn4DbuTLiXMgvRak4H91GaUwLbGpdtFrVgLhUOXD NWtQ0etag2+eNc3cCnOKIBwBXpBBJMeCRyBj5fH+du9dZ5cFA997Vrhd9hpzMk2SwOM6 NA3DvNxQuR5lBHtNlhHlnwnssweK8Y88b3kwTHOdLQyPxyVUM5OJ0VliQDbol/ipIqr4 /tNmPFvNlLQxg4KBQjXy8O/JkEA3We7sqAm7GFTJT0ua7NFvsLx5xK+VveBfpawk9d+i mqqw==
Chrony comes with sample NetworkManager dispatcher script that offlines
NTP sources when interface goes down and onlines them when interface
comes up. Technically it runs "chronyc onoffline" which tries to
determine whether each source can be reached. This script is actually
installed by distributions (openSUSE and Ubuntu for sure).
When system goes to suspend NetworkManager offlines interfaces that
causes chrony to offline its sources. On resume chrony is expected to
online them again.
This works well for IPv4 sources but IPv6 sources remain offline. Like
$ chronyc -n sources
210 Number of sources = 8
MS Name/IP address Stratum Poll Reach LastRx Last sample
===============================================================================
^? 2001:67c:1560:8003::c8 0 6 0 - +0ns[ +0ns] +/-
0ns
^? 2001:67c:1560:8003::c7 0 6 0 - +0ns[ +0ns] +/-
0ns
^- 91.189.89.199 2 8 377 108 -2030us[-2209us] +/-
53ms
^- 91.189.94.4 2 8 377 49 -2878us[-3067us] +/-
60ms
^+ 79.111.152.5 1 8 377 51 -2960us[-3149us] +/-
18ms
^* 188.225.9.167 2 8 377 49 -1819us[-2008us] +/-
15ms
^+ 85.21.78.91 2 8 377 116 -3053us[-3230us] +/-
19ms
^+ 185.209.85.222 2 8 377 50 +6182us[+5993us] +/-
23ms
$
The reason is - when ifup dispatcher script runs, IPv6 is not yet
configured. Here are route entries
default via 192.168.1.1 dev wlan0 proto dhcp metric 20600
169.254.0.0/16 dev wlan0 scope link metric 1000
192.168.1.0/24 dev wlan0 proto kernel scope link src 192.168.1.6 metric 600
::1 dev lo proto kernel metric 256 pref medium
fe80::/64 dev wlan0 proto kernel metric 600 pref medium
So IPv4 is up and has default route but IPv6 still only link-local
address. Couple of seconds later
::1 dev lo proto kernel metric 256 pref medium
2a00:xxxx:yyyy:zzzz::/64 dev wlan0 proto ra metric 600 pref medium
fe80::/64 dev wlan0 proto kernel metric 600 pref medium
default via fe80::1 dev wlan0 proto ra metric 20600 pref medium
Is it possible to run dispatcher script after both IPv4 and IPv6 are
configured on interface? Or only IPv6 for that matter - it does not
matter if "chronyc onoffline" runs multiple times.
Both IPv4 and IPv6 are set to auto.
--
To unsubscribe email chrony-users-request@xxxxxxxxxxxxxxxxxxxx
with "unsubscribe" in the subject.
For help email chrony-users-request@xxxxxxxxxxxxxxxxxxxx
with "help" in the subject.
Trouble? Email listmaster@xxxxxxxxxxxxxxxxxxxx.