Rack Controllers not configured for NTP correctly when ntp_external_only is false
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
MAAS |
Triaged
|
Medium
|
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_
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 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_
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 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: | added: sts |
Changed in maas: | |
status: | New → Triaged |
importance: | Undecided → High |
tags: | added: se-00268100 |
Changed in maas: | |
milestone: | 3.4.0 → 3.4.x |
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("""\
right_ node_id, right_ip routable_ pairs
SELECT left_node_id, left_ip,
FROM maasserver_
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.