Chrony configuration not updated

Bug #1885682 reported by Alberto Donato
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MAAS
Fix Released
High
Alberto Donato
2.8
Fix Released
High
Alberto Donato

Bug Description

Reported from https://discourse.maas.io/t/maas-2-8-7328-not-configuring-chrony/1736:

New insall of MaaS 2.8 (7328) is not respecting the NTP configuration. I have configured my internal NTP servers as a destination, but the server is still reaching out to the default ubuntu pool.

root 10131 0.0 0.0 110356 3220 ? S 20:11 0:00 /snap/maas/7328/usr/sbin/chronyd -u root -d -f /var/snap/maas/7328/etc/chrony/chrony.conf

There is a configuration file which is correct: /var/snap/maas/7328/etc/chrony/maas.conf, but obviously not being used in this case.

Some additional troubleshooting here. When I cat “/var/snap/maas/7328/etc/chrony/chrony.conf” it returned with the distribution version of the chrony.conf file. I modified “/bin/run-chronyd” and commented out “cp “$SNAP/usr/share/maas/chrony.conf” “$SNAP_DATA/etc/chrony/chrony.conf””
After getting everything restarted, I cat’d “/var/snap/maas/7328/etc/chrony/chrony.conf” and it had all pool statements in chrony.conf commented and added “include /var/snap/maas/7328/etc/chrony/maas.conf” to the bottom. It would appear there is some race condition with the logic. Like the cp command is occuring after the file has already been modified to use the maas.conf version.

Related branches

Alberto Donato (ack)
Changed in maas:
milestone: 2.8.1 → 2.9.0b1
status: Triaged → In Progress
Changed in maas:
status: In Progress → Fix Committed
Revision history for this message
Erlon R. Cruz (sombrafam) wrote :

Can you please target this to 2.8.2 too?

Revision history for this message
Alberto Donato (ack) wrote :

Erlon, why 2.8.2?
The fix is released in 2.8.1-RC1, so it will be in 2.8.1 final when that gets released.

Lee Trager (ltrager)
Changed in maas:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.