From 2f33d9afeb74bd8e6d31cfe76481dd445537b4fc Mon Sep 17 00:00:00 2001 From: James Page Date: Thu, 4 Nov 2021 11:39:38 +0000 Subject: [PATCH] Remove all traces of process monitor The Masakari process monitor is explicitly outside the scope of what we chose to enable when the original charm development was done for Masakari. Drop installation of the process monitor package and related templates and configuration. Drive-by fixup of requirements for older Pythons. Related-Bug: 1941623 Change-Id: Id883c117e73e71842fbe7a96e0471b37e999020f --- requirements.txt | 1 + src/lib/charm/openstack/masakari_monitors.py | 7 +-- src/templates/masakarimonitors.conf | 1 - src/templates/process_list.yaml | 65 -------------------- test-requirements.txt | 2 + 5 files changed, 5 insertions(+), 71 deletions(-) delete mode 100644 src/templates/process_list.yaml diff --git a/requirements.txt b/requirements.txt index b786b42..a68620f 100644 --- a/requirements.txt +++ b/requirements.txt @@ -9,6 +9,7 @@ setuptools<50.0.0 # https://github.com/pypa/setuptools/commit/04e3df22df840c6bb244e9b27bc56750c44b7c85 # Build requirements +cffi==1.14.6; python_version < '3.6' # cffi 1.15.0 drops support for py35. charm-tools==2.8.3 simplejson diff --git a/src/lib/charm/openstack/masakari_monitors.py b/src/lib/charm/openstack/masakari_monitors.py index a807c1a..719deaa 100644 --- a/src/lib/charm/openstack/masakari_monitors.py +++ b/src/lib/charm/openstack/masakari_monitors.py @@ -22,17 +22,14 @@ class MasakariMonitorsCharm(charms_openstack.charm.OpenStackCharm): release = 'rocky' # List of packages to install for this charm - packages = ['masakari-host-monitor', 'masakari-instance-monitor', - 'masakari-process-monitor'] + packages = ['masakari-host-monitor', 'masakari-instance-monitor'] - services = ['masakari-host-monitor', 'masakari-instance-monitor', - 'masakari-process-monitor'] + services = ['masakari-host-monitor', 'masakari-instance-monitor'] required_relations = ['identity-credentials'] restart_map = { '/etc/masakarimonitors/masakarimonitors.conf': services, - '/etc/masakarimonitors/process_list.yaml': services, } release_pkg = 'masakari-monitors-common' diff --git a/src/templates/masakarimonitors.conf b/src/templates/masakarimonitors.conf index 7a2cf57..2fac4f7 100644 --- a/src/templates/masakarimonitors.conf +++ b/src/templates/masakarimonitors.conf @@ -32,4 +32,3 @@ disable_ipmi_check = True [libvirt] [oslo_middleware] [process] -process_list_path = /etc/masakari/process_list.yaml diff --git a/src/templates/process_list.yaml b/src/templates/process_list.yaml deleted file mode 100644 index 62b9459..0000000 --- a/src/templates/process_list.yaml +++ /dev/null @@ -1,65 +0,0 @@ -# WARNING: Maintained by Juju. -# Any manual changes will be overridden. - -# Define the monitoring processes as follows: -# process_name: [Name of the process as it in 'ps -ef'.] -# start_command: [Start command of the process.] -# pre_start_command: [Command which is executed before start_command.] -# post_start_command: [Command which is executed after start_command.] -# restart_command: [Restart command of the process.] -# pre_restart_command: [Command which is executed before restart_command.] -# post_restart_command: [Command which is executed after restart_command.] -# run_as_root: [Bool value whether to execute commands as root authority.] -# -# These definitions need to be set according to the environment to use. -# Sample of definitions is shown below. -- - # libvirt-bin - process_name: /usr/sbin/libvirtd - start_command: systemctl start libvirtd - pre_start_command: - post_start_command: - restart_command: systemctl restart libvirtd - pre_restart_command: - post_restart_command: - run_as_root: True -- - # nova-compute - process_name: /usr/bin/nova-compute - start_command: systemctl start nova-compute - pre_start_command: - post_start_command: - restart_command: systemctl restart nova-compute - pre_restart_command: - post_restart_command: - run_as_root: True -- - # instancemonitor - process_name: /usr/bin/masakari-instancemonitor - start_command: systemctl start masakari-instance-monitor - pre_start_command: - post_start_command: - restart_command: systemctl restart masakari-instance-monitor - pre_restart_command: - post_restart_command: - run_as_root: True -- - # hostmonitor - process_name: /usr/bin/masakari-hostmonitor - start_command: systemctl start masakari-host-monitor - pre_start_command: - post_start_command: - restart_command: systemctl restart masakari-host-monitor - pre_restart_command: - post_restart_command: - run_as_root: True -- - # sshd - process_name: /usr/sbin/sshd - start_command: systemctl start ssh - pre_start_command: - post_start_command: - restart_command: systemctl restart ssh - pre_restart_command: - post_restart_command: - run_as_root: True diff --git a/test-requirements.txt b/test-requirements.txt index af069e1..bb1307f 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -3,6 +3,8 @@ # choices of *requirements.txt files for OpenStack Charms: # https://github.com/openstack-charmers/release-tools # +pyparsing<3.0.0 # aodhclient is pinned in zaza and needs pyparsing < 3.0.0, but cffi also needs it, so pin here. +cffi==1.14.6; python_version < '3.6' # cffi 1.15.0 drops support for py35. setuptools<50.0.0 # https://github.com/pypa/setuptools/commit/04e3df22df840c6bb244e9b27bc56750c44b7c85 stestr>=2.2.0