diff --git a/ansible/group_vars/all.yml b/ansible/group_vars/all.yml index 70996cccf4..a655591122 100644 --- a/ansible/group_vars/all.yml +++ b/ansible/group_vars/all.yml @@ -661,6 +661,8 @@ enable_manila_backend_cephfs_nfs: "no" enable_manila_backend_glusterfs_nfs: "no" enable_mariabackup: "no" enable_masakari: "no" +enable_masakari_instancemonitor: "{{ enable_masakari | bool }}" +enable_masakari_hostmonitor: "{{ enable_masakari | bool }}" enable_mistral: "no" enable_monasca: "no" enable_multipathd: "no" diff --git a/ansible/roles/masakari/defaults/main.yml b/ansible/roles/masakari/defaults/main.yml index 56280a9630..f3f40c376d 100644 --- a/ansible/roles/masakari/defaults/main.yml +++ b/ansible/roles/masakari/defaults/main.yml @@ -28,7 +28,7 @@ masakari_services: masakari-instancemonitor: container_name: masakari_instancemonitor group: masakari-instancemonitor - enabled: true + enabled: "{{ enable_masakari_instancemonitor | bool }}" image: "{{ masakari_monitors_image_full }}" volumes: "{{ masakari_instancemonitor_default_volumes + masakari_instancemonitor_extra_volumes }}" privileged: True @@ -36,7 +36,7 @@ masakari_services: masakari-hostmonitor: container_name: masakari_hostmonitor group: masakari-hostmonitor - enabled: true + enabled: "{{ enable_masakari_hostmonitor | bool }}" ipc_mode: host image: "{{ masakari_monitors_image_full }}" volumes: "{{ masakari_hostmonitor_default_volumes + masakari_hostmonitor_extra_volumes }}" diff --git a/doc/source/reference/compute/masakari-guide.rst b/doc/source/reference/compute/masakari-guide.rst index d24baf156d..51dd4fd64b 100644 --- a/doc/source/reference/compute/masakari-guide.rst +++ b/doc/source/reference/compute/masakari-guide.rst @@ -13,6 +13,9 @@ KVM-based Virtual Machine(VM)s from failure events such as VM process down, provisioning process down, and nova-compute host failure. Masakari also provides an API service to manage and control the automated rescue mechanism. -Kolla deploys Masakari API, Masakari Engine and Masakari Instance Monitor -containers which are the main Masakari components only if ``enable_masakari`` -is set in ``/etc/kolla/globals.yml``. +Kolla deploys Masakari API, Masakari Engine and Masakari Monitor containers +which are the main Masakari components only if ``enable_masakari`` is set in +``/etc/kolla/globals.yml``. By default, both the Masakari Host Monitor and +Masakari Instance Monitor containers are enabled. The deployment of each type +of monitors can be controlled individually via +``enable_masakari_instancemonitor`` and ``enable_masakari_hostmonitor``. diff --git a/releasenotes/notes/control-masakari-monitors-1107c10c45678b0a.yaml b/releasenotes/notes/control-masakari-monitors-1107c10c45678b0a.yaml new file mode 100644 index 0000000000..0d3fb83439 --- /dev/null +++ b/releasenotes/notes/control-masakari-monitors-1107c10c45678b0a.yaml @@ -0,0 +1,8 @@ +--- +features: + - | + New switches added to control deployment of the Masakari monitors. The + deployment of each type of monitors can be controlled individually via + ``enable_masakari_instancemonitor`` and ``enable_masakari_hostmonitor``. + By default, both are set to ``true`` when the deployment of the Masakari + is enabled via ``enable_masakari``.