NTP Hardware Tests Fail on Bionic

Bug #1768534 reported by KingJ
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MAAS
Fix Released
High
Lee Trager
2.3
Fix Released
High
Lee Trager

Bug Description

When running hardware tests using MAAS 2.4.0-beta2 and Ubuntu 18.04 Bionic, the test fails as the ntpq command and ntpd.service unit are not found;

/tmp/user_data.sh.K4dT3X/scripts/testing/ntp: line 51: ntpq: command not found
Failed to stop ntp.service: Unit ntp.service not loaded.
timeout: failed to run command ‘ntpd’: No such file or directory
Failed to start ntp.service: Unit ntp.service not found.

In Ubuntu 18.04, Crony replaces ntp as the default set of ntp tools. However, timesyncd is also used and enabled by default.

Could it be possible to change the NTP test script so that if Ubuntu 18.04 is detected, the status of the systemd-timesyncd unit is checked? The status of that unit outputs a line similar to the following if ntp sync has succeeded;

   Status: "Synchronized to time server 10.1.10.5:123 (10.1.10.5)."

Related branches

Revision history for this message
KingJ (kj-kingj) wrote :
Changed in maas:
milestone: none → 2.4.0rc1
Revision history for this message
KingJ (kj-kingj) wrote :

Here's a simple patch that will at least fix the NTP provisioning test for 18.04. Probably best to improve upon this for 18.10 etc.

Revision history for this message
Lee Trager (ltrager) wrote :

The ntpq command shows that NTP has been configured properly. MAAS should query chrony for this information using

chronyc status
chronyc sources

Changed in maas:
status: New → Confirmed
importance: Undecided → High
Changed in maas:
assignee: nobody → Lee Trager (ltrager)
Revision history for this message
Andres Rodriguez (andreserl) wrote :

I think MAAS should be smart and act as such. In 2.4/bionic we are using chrony, so MAAS should be smart and do that. As a fallback it should use timesyncd.

Changed in maas:
assignee: Lee Trager (ltrager) → Björn Tillenius (bjornt)
Lee Trager (ltrager)
Changed in maas:
status: Confirmed → In Progress
assignee: Björn Tillenius (bjornt) → Lee Trager (ltrager)
Changed in maas:
status: In Progress → Fix Committed
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.