Skip to content

Commit

Permalink
DLPX-93479 ntpsec-rotate-stats.timer should follow ntpsec.service (#795)
Browse files Browse the repository at this point in the history
  • Loading branch information
palash-gandhi authored Feb 26, 2025
1 parent 4747760 commit 71a8186
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@
- delphix-fluentd.service
- delphix-masking.service
- ntpsec.service
- ntpsec-rotate-stats.timer
- snmpd.service

#
Expand Down
1 change: 1 addition & 0 deletions upgrade/upgrade-scripts/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -492,6 +492,7 @@ function fix_and_migrate_services() {
nfs-mountd.service
nginx.service
ntpsec.service
ntpsec-rotate-stats.timer
postgresql.service
rpc-statd.service
rpcbind.service
Expand Down
10 changes: 10 additions & 0 deletions upgrade/upgrade-scripts/execute
Original file line number Diff line number Diff line change
Expand Up @@ -387,6 +387,7 @@ if [[ -f "/etc/ntp/ntp.conf" ]]; then
cp /etc/ntp/ntp.conf /etc/ntpsec/ntp.conf ||
die "failed to copy /etc/ntp/ntp.conf to /etc/ntpsec/ntp.conf"
if [[ "$(systemctl is-enabled ntp.service)" == enabled ]]; then
systemctl disable --now ntp.service
systemctl enable ntpsec.service
fi
fi
Expand Down Expand Up @@ -494,6 +495,15 @@ if [[ "$(systemctl is-enabled telegraf)" == enabled ]]; then
systemctl mask --now telegraf.service
fi

#
# Upgrading to LTS 24.04 causes the `ntpsec` package to be installed. This package installs the
# `ntpsec-rotate-stats.timer` timer which is enabled by default. Our product never enables
# the collection of NTP stats, so we disable the timer to prevent it from running.
#
if [[ "$(systemctl is-enabled ntpsec-rotate-stats.timer)" == enabled ]]; then
systemctl mask --now ntpsec-rotate-stats.timer
fi

#
# Unmask docker, which was masked at the beginning of the upgrade due
# to DLPX-77949.
Expand Down

0 comments on commit 71a8186

Please sign in to comment.