Rack Controllers not configured for NTP correctly when ntp_external_only is false

Bug #1865545 reported by Nick Niehoff on 2020-03-02
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
MAAS
High
Unassigned

Bug Description

With separated region and rack controllers when ntp_external_only is set to true and ntp_servers are defined:

# maas admin maas get-config name=ntp_external_only
Success.
Machine-readable output follows:
true
# maas admin maas get-config name=ntp_servers
Success.
Machine-readable output follows:
"192.168.10.66 192.168.10.69"

Chrony is configured on the rackd servers as follows:

# cat /etc/chrony/maas.conf
# MAAS NTP configuration.
hwtimestamp *
server 10.12.48.66 iburst
server 10.12.48.69 iburst
local stratum 9 orphan
allow

# chronyc -n sources
210 Number of sources = 2
MS Name/IP address Stratum Poll Reach LastRx Last sample
===============================================================================
^+ 192.168.10.66 4 7 377 65 -53us[ -174us] +/- 7723us
^* 192.168.10.69 4 7 377 4 +59us[ -76us] +/- 6912us

However, if ntp_external_only is false:

# maas admin maas get-config name=ntp_external_only
Success.
Machine-readable output follows:
false
# maas admin maas get-config name=ntp_servers
Success.
Machine-readable output follows:
"192.168.10.66 192.168.10.69"

According to the settings page "Otherwise only region controller hosts will be configured to use those external NTP servers, rack contoller hosts will in turn refer to the regions' NTP servers, and deployed machines will refer to the racks' NTP servers." I would then expect to see the rack controllers chrony point to the region controllers but this is the result on the rackd server:

# cat /etc/chrony/maas.conf
# MAAS NTP configuration.
hwtimestamp *
local stratum 9 orphan
allow
# chronyc -n sources
210 Number of sources = 0
MS Name/IP address Stratum Poll Reach LastRx Last sample
===============================================================================
#

So unless some other time sync method is being used (which I doubt) it appears chrony is not getting configured correctly on the rackd servers. I have replicated this behavior on MAAS 2.6 and 2.7.

Tags: sts Edit Tag help
Nick Niehoff (nniehoff) on 2020-03-02
tags: added: sts
Victor Tapia (vtapia) wrote :

This issue can be reproduced by deploying the region and rack controllers in different subnets. The problem comes from the following SQL query @ src/maasserver/routablepairs.py:

_find_addresses_sql = dedent("""\
    SELECT left_node_id, left_ip,
           right_node_id, right_ip
      FROM maasserver_routable_pairs
     WHERE left_node_id IN (%s)
       AND right_node_id IN (%s)
       AND metric < 4
     ORDER BY metric ASC
""")

If the subnets don't share vlan/space, the metric is 4 and the IP is filtered out, rendering a useless chrony conf file for the rack controllers.

Alberto Donato (ack) on 2020-04-07
Changed in maas:
status: New → Triaged
importance: Undecided → High
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers