Skip to content

Commit

Permalink
tests: remove NTP service on Xenial
Browse files Browse the repository at this point in the history
The auto-refresh tests and the degraded test were all failing. The
former happened because chrony sometimes failed to run and the latter
because ntp.service conflicted with chrony. Removing ntp and leaving
chrony fixes both issues.

Signed-off-by: Miguel Pires <[email protected]>
  • Loading branch information
miguelpires committed Jan 7, 2025
1 parent d2e08bc commit 324956b
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions tests/lib/prepare-restore.sh
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,16 @@ install_dependencies_gce_bucket(){
###

prepare_project() {
# we install chrony on xenial (as its also used in later distros), so the
# ntp service was in conflict, degrading the systemd unit and sometimes breaking
# NTP syncs
if os.query is-xenial; then
systemctl stop ntp.service
systemctl disable ntp.service
apt-get remove --purge -y ntp
systemctl reset-failed
fi

if os.query is-ubuntu && os.query is-classic; then
apt-get remove --purge -y lxd lxcfs || true
apt-get autoremove --purge -y
Expand Down

0 comments on commit 324956b

Please sign in to comment.