From 68e269ee762d5d723cca74c99a1c16c9713252db Mon Sep 17 00:00:00 2001 From: Guillem Jover Date: Thu, 14 Oct 2021 19:27:57 +0200 Subject: [PATCH] TT#144703 Restore support for ntp We add optional support for ntpd, as some customers have demanded it back. While preserving timesyncd as the default. Change-Id: Ib954ee73e21b572beb9655c9ce471702e03f7142 (cherry picked from commit eac3e56b1d305fc1c7f02e0c12a80ad8e047bcf3) --- templates/400_process-debian.yaml.tt2 | 5 ++++- templates/500_init-daemons-dabian.yaml.tt2 | 8 ++++++-- templates/820_network-ports-debian.yaml.tt2 | 2 +- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/templates/400_process-debian.yaml.tt2 b/templates/400_process-debian.yaml.tt2 index 156d61b..d9461be 100644 --- a/templates/400_process-debian.yaml.tt2 +++ b/templates/400_process-debian.yaml.tt2 @@ -22,6 +22,9 @@ process: running: [% general.init_system == 'systemd' ? 'false' : 'true' %] {{end}} + ntpd: + running: [% ntp.backend == 'ntpd' ? 'true' : 'false ' %] + redis-server: running: true @@ -34,7 +37,7 @@ process: # XXX: We need to truncate the process name to 15 characters (from the # actual "systemd-timesyncd"), which is the size of the comm string in Linux. systemd-timesyn: - running: true + running: [% ntp.backend == 'timesyncd' ? 'true' : 'false ' %] systemd-udevd: running: true diff --git a/templates/500_init-daemons-dabian.yaml.tt2 b/templates/500_init-daemons-dabian.yaml.tt2 index 6a2a79f..e4d20b3 100644 --- a/templates/500_init-daemons-dabian.yaml.tt2 +++ b/templates/500_init-daemons-dabian.yaml.tt2 @@ -57,6 +57,10 @@ service: enabled: true running: true + ntp.service: + enabled: [% ntp.backend == 'ntpd' ? 'true' : 'false ' %] + running: [% ntp.backend == 'ntpd' ? 'true' : 'false ' %] + rsyslog.service: enabled: true running: true @@ -90,8 +94,8 @@ service: running: true systemd-timesyncd.service: - enabled: true - running: true + enabled: [% ntp.backend == 'timesyncd' ? 'true' : 'false ' %] + running: [% ntp.backend == 'timesyncd' ? 'true' : 'false ' %] telegraf.service: enabled: [% monitoring.backend == 'influxdb' ? 'true' : 'false' %] diff --git a/templates/820_network-ports-debian.yaml.tt2 b/templates/820_network-ports-debian.yaml.tt2 index 9f0b932..88f22c8 100644 --- a/templates/820_network-ports-debian.yaml.tt2 +++ b/templates/820_network-ports-debian.yaml.tt2 @@ -11,7 +11,7 @@ port: # NTP (systemd-timesyncd does not listen) udp:123: - listening: false + listening: [% ntp.backend == 'timesyncd' ? 'false' : 'true ' %] # Check for a closed port, nothing there. tcp:7777: