From 9dee2a92d8a54817ba480f45c0a40705b88169ff Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Rados=C5=82aw=20Piliszek?= <radoslaw.piliszek@gmail.com>
Date: Fri, 22 Oct 2021 12:25:34 +0000
Subject: [PATCH] Drop enable_host_ntp

As promised for Xena.

Change-Id: Id634426a1961f0b883068e4ed80e7d1633e5708e
---
 ansible/roles/baremetal/defaults/main.yml     |  6 ---
 .../roles/baremetal/tasks/post-install.yml    | 50 -------------------
 .../bootstrap-servers.rst                     | 11 ----
 ...drop-enable_host_ntp-ce6e60a46e7544ea.yaml |  4 ++
 4 files changed, 4 insertions(+), 67 deletions(-)
 create mode 100644 releasenotes/notes/drop-enable_host_ntp-ce6e60a46e7544ea.yaml

diff --git a/ansible/roles/baremetal/defaults/main.yml b/ansible/roles/baremetal/defaults/main.yml
index d646658b33..bb19f40b71 100644
--- a/ansible/roles/baremetal/defaults/main.yml
+++ b/ansible/roles/baremetal/defaults/main.yml
@@ -24,10 +24,6 @@ create_kolla_user_sudoers: "{{ create_kolla_user }}"
 kolla_user: "kolla"
 kolla_group: "kolla"
 
-# Deprecated since Wallaby. To be dropped in Xena.
-# Please use other means of configuring NTP.
-enable_host_ntp: False
-
 change_selinux: True
 
 selinux_state: "permissive"
@@ -52,7 +48,6 @@ debian_pkg_install:
  - "python3-setuptools"
  - "python3-pip"
  - "{% if virtualenv is not none %}python3-virtualenv{% endif %}"
- - "{% if enable_host_ntp | bool %}ntp{% endif %}"
  - "{% if enable_multipathd|bool %}sg3-utils-udev{% endif %}"
  - "{% if not docker_disable_default_iptables_rules | bool %}iptables{% endif %}"
 
@@ -61,7 +56,6 @@ redhat_pkg_install:
  - git
  - "python3-pip"
  - "{% if virtualenv is not none %}python3-virtualenv{% endif %}"
- - "{% if enable_host_ntp | bool %}ntp{% endif %}"
  - sudo
  - "{% if not docker_disable_default_iptables_rules | bool %}iptables{% endif %}"
 
diff --git a/ansible/roles/baremetal/tasks/post-install.yml b/ansible/roles/baremetal/tasks/post-install.yml
index 74c006ae1c..55d31d836b 100644
--- a/ansible/roles/baremetal/tasks/post-install.yml
+++ b/ansible/roles/baremetal/tasks/post-install.yml
@@ -243,56 +243,6 @@
     masked: no
   become: True
 
-- name: Warn about deprecations
-  debug:
-    msg: >
-      enable_host_ntp is deprecated.
-      Please configure NTP using a different tool.
-  when: enable_host_ntp | bool
-
-- name: Stop time service
-  service:
-    name: ntp
-    state: stopped
-  become: True
-  when:
-    - ansible_facts.os_family == "Debian"
-    - enable_host_ntp | bool
-
-- name: Stop time service
-  service:
-    name: ntpd
-    state: stopped
-  become: True
-  when:
-    - ansible_facts.os_family == "RedHat"
-    - enable_host_ntp | bool
-
-- name: Synchronizing time one-time
-  command: ntpd -gq
-  become: True
-  when: enable_host_ntp | bool
-
-- name: Start time sync service
-  service:
-    name: ntp
-    state: started
-    enabled: yes
-  become: True
-  when:
-    - ansible_facts.os_family == "Debian"
-    - enable_host_ntp | bool
-
-- name: Start time sync service
-  service:
-    name: ntpd
-    state: started
-    enabled: yes
-  become: True
-  when:
-    - ansible_facts.os_family == "RedHat"
-    - enable_host_ntp | bool
-
 - name: Change state of selinux
   selinux:
     policy: targeted
diff --git a/doc/source/reference/deployment-and-bootstrapping/bootstrap-servers.rst b/doc/source/reference/deployment-and-bootstrapping/bootstrap-servers.rst
index 293d6677df..9a396a3274 100644
--- a/doc/source/reference/deployment-and-bootstrapping/bootstrap-servers.rst
+++ b/doc/source/reference/deployment-and-bootstrapping/bootstrap-servers.rst
@@ -230,14 +230,3 @@ Configuration of SELinux
 On Red Hat family systems, if ``change_selinux`` is set (default is ``true``),
 then the SELinux state will be set to ``selinux_state`` (default
 ``permissive``). See :doc:`../../user/security` for further information.
-
-Configuration of NTP daemon
-~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-.. warning::
-   Support for configuration of NTP daemon is deprecated and will be removed in
-   the next Kolla Ansible release (Xena).
-   Please use other means of configuring NTP.
-
-This is optional, and enabled by ``enable_host_ntp``, which is ``false`` by
-default.
diff --git a/releasenotes/notes/drop-enable_host_ntp-ce6e60a46e7544ea.yaml b/releasenotes/notes/drop-enable_host_ntp-ce6e60a46e7544ea.yaml
new file mode 100644
index 0000000000..7ee9f6ab98
--- /dev/null
+++ b/releasenotes/notes/drop-enable_host_ntp-ce6e60a46e7544ea.yaml
@@ -0,0 +1,4 @@
+---
+upgrade:
+  - |
+    ``enable_host_ntp`` variable is dropped per the deprecation process.
-- 
GitLab