From 84ac7b309629a5c253dd4774b75708c673374e5f Mon Sep 17 00:00:00 2001 From: Mark Goddard Date: Wed, 19 May 2021 11:28:24 +0100 Subject: chrony: allow to remove the container The chrony container is deprecated in Wallaby, and disabled by default. This change allows to remove the container if chrony is disabled. Change-Id: I1c4436072c2d47a95625e64b731edb473384b395 --- tests/pre.yml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) (limited to 'tests/pre.yml') diff --git a/tests/pre.yml b/tests/pre.yml index 0a6a9f7eb..c2f1d2e1a 100644 --- a/tests/pre.yml +++ b/tests/pre.yml @@ -104,3 +104,31 @@ until: "'synchronized: yes' in timedatectl_status.stdout" retries: 90 delay: 10 + + # TODO(mgoddard): Remove this task in the Y cycle after chrony has been + # dropped for a cycle. + # NOTE(mgoddard): For upgrades, test the case where we are running + # a chrony container, but keep the default of disabled after the + # upgrade. + - block: + - name: Remove host NTP packages + become: true + package: + name: + - chrony + - ntp + state: absent + + # NOTE(mgoddard): removing the systemd-timesyncd package fails, so stop + # and disable it instead. + - name: Stop systemd-timesyncd service + become: true + service: + name: systemd-timesyncd + enabled: no + state: stopped + when: ansible_os_family == 'Debian' + when: + - is_upgrade + # cephadm gets grumpy without a host-level chrony. + - scenario != 'cephadm' -- cgit v1.2.3