masakari: fix minor issues with instance monitor
* Don't generate masakari.conf for instance monitor * Don't generate masakari-monitors.conf for API or engine * Use a consistent name for dimensions - masakari_instancemonitor_dimensions * Fix source code paths in dev mode Change-Id: I551f93c9bf1ad6712b53c316074ae1df84e4352b
This commit is contained in:
parent
0d153af87f
commit
0b0dd35837
@ -34,7 +34,7 @@ masakari_services:
|
|||||||
image: "{{ masakari_monitors_image_full }}"
|
image: "{{ masakari_monitors_image_full }}"
|
||||||
volumes: "{{ masakari_instancemonitor_default_volumes + masakari_instancemonitor_extra_volumes }}"
|
volumes: "{{ masakari_instancemonitor_default_volumes + masakari_instancemonitor_extra_volumes }}"
|
||||||
privileged: True
|
privileged: True
|
||||||
dimensions: "{{ masakari_monitors_dimensions }}"
|
dimensions: "{{ masakari_instancemonitor_dimensions }}"
|
||||||
|
|
||||||
|
|
||||||
####################
|
####################
|
||||||
@ -64,7 +64,9 @@ masakari_monitors_image_full: "{{ masakari_monitors_image }}:{{ masakari_monitor
|
|||||||
|
|
||||||
masakari_api_dimensions: "{{ default_container_dimensions }}"
|
masakari_api_dimensions: "{{ default_container_dimensions }}"
|
||||||
masakari_engine_dimensions: "{{ default_container_dimensions }}"
|
masakari_engine_dimensions: "{{ default_container_dimensions }}"
|
||||||
masakari_monitors_dimensions: "{{ default_container_dimensions }}"
|
# NOTE(mgoddard): Allow masakari_monitors_dimensions for backwards
|
||||||
|
# compatibility.
|
||||||
|
masakari_instancemonitor_dimensions: "{{ masakari_monitors_dimensions | default(default_container_dimensions) }}"
|
||||||
|
|
||||||
masakari_extra_volumes: "{{ default_extra_volumes }}"
|
masakari_extra_volumes: "{{ default_extra_volumes }}"
|
||||||
masakari_api_extra_volumes: "{{ masakari_extra_volumes }}"
|
masakari_api_extra_volumes: "{{ masakari_extra_volumes }}"
|
||||||
@ -89,7 +91,7 @@ masakari_instancemonitor_default_volumes:
|
|||||||
- "/etc/localtime:/etc/localtime:ro"
|
- "/etc/localtime:/etc/localtime:ro"
|
||||||
- "{{ '/etc/timezone:/etc/timezone:ro' if ansible_os_family == 'Debian' else '' }}"
|
- "{{ '/etc/timezone:/etc/timezone:ro' if ansible_os_family == 'Debian' else '' }}"
|
||||||
- "kolla_logs:/var/log/kolla/"
|
- "kolla_logs:/var/log/kolla/"
|
||||||
- "{{ kolla_dev_repos_directory ~ '/masakari/masakari:/var/lib/kolla/venv/lib/python' ~ distro_python_version ~ '/site-packages/masakari' if masakari_dev_mode | bool else '' }}"
|
- "{{ kolla_dev_repos_directory ~ '/masakari-monitors/masakarimonitors:/var/lib/kolla/venv/lib/python' ~ distro_python_version ~ '/site-packages/masakarimonitors' if masakari_dev_mode | bool else '' }}"
|
||||||
|
|
||||||
|
|
||||||
####################
|
####################
|
||||||
@ -114,7 +116,7 @@ masakari_dev_repos_pull: "{{ kolla_dev_repos_pull }}"
|
|||||||
masakari_dev_mode: "{{ kolla_dev_mode }}"
|
masakari_dev_mode: "{{ kolla_dev_mode }}"
|
||||||
masakari_source_version: "{{ kolla_source_version }}"
|
masakari_source_version: "{{ kolla_source_version }}"
|
||||||
|
|
||||||
masakari_monitors_git_repository: "{{ kolla_dev_repos_git }}/masakarimonitors"
|
masakari_monitors_git_repository: "{{ kolla_dev_repos_git }}/masakari-monitors"
|
||||||
masakari_monitors_dev_repos_pull: "{{ kolla_dev_repos_pull }}"
|
masakari_monitors_dev_repos_pull: "{{ kolla_dev_repos_pull }}"
|
||||||
masakari_monitors_dev_mode: "{{ kolla_dev_mode }}"
|
masakari_monitors_dev_mode: "{{ kolla_dev_mode }}"
|
||||||
masakari_monitors_source_version: "{{ kolla_source_version }}"
|
masakari_monitors_source_version: "{{ kolla_source_version }}"
|
||||||
|
@ -11,6 +11,6 @@
|
|||||||
become: true
|
become: true
|
||||||
git:
|
git:
|
||||||
repo: "{{ masakarimonitors_git_repository }}"
|
repo: "{{ masakarimonitors_git_repository }}"
|
||||||
dest: "{{ kolla_dev_repos_directory }}/masakarimonitors"
|
dest: "{{ kolla_dev_repos_directory }}/masakari-monitors"
|
||||||
update: "{{ masakarimonitors_dev_repos_pull }}"
|
update: "{{ masakarimonitors_dev_repos_pull }}"
|
||||||
version: "{{ masakarimonitors_source_version }}"
|
version: "{{ masakarimonitors_source_version }}"
|
||||||
|
@ -64,43 +64,48 @@
|
|||||||
|
|
||||||
- name: Copying over masakari.conf
|
- name: Copying over masakari.conf
|
||||||
vars:
|
vars:
|
||||||
service: "{{ item.key }}"
|
service_name: "{{ item }}"
|
||||||
|
service: "{{ masakari_services[service_name] }}"
|
||||||
merge_configs:
|
merge_configs:
|
||||||
sources:
|
sources:
|
||||||
- "{{ role_path }}/templates/masakari.conf.j2"
|
- "{{ role_path }}/templates/masakari.conf.j2"
|
||||||
- "{{ node_custom_config }}/global.conf"
|
- "{{ node_custom_config }}/global.conf"
|
||||||
- "{{ node_custom_config }}/masakari.conf"
|
- "{{ node_custom_config }}/masakari.conf"
|
||||||
- "{{ node_custom_config }}/masakari/{{ item.key }}.conf"
|
- "{{ node_custom_config }}/masakari/{{ service_name }}.conf"
|
||||||
- "{{ node_custom_config }}/masakari/{{ inventory_hostname }}/masakari.conf"
|
- "{{ node_custom_config }}/masakari/{{ inventory_hostname }}/masakari.conf"
|
||||||
dest: "{{ node_config_directory }}/{{ item.key }}/masakari.conf"
|
dest: "{{ node_config_directory }}/{{ service_name }}/masakari.conf"
|
||||||
mode: "0660"
|
mode: "0660"
|
||||||
become: true
|
become: true
|
||||||
when:
|
when:
|
||||||
- inventory_hostname in groups[item.value.group]
|
- inventory_hostname in groups[service.group]
|
||||||
- item.value.enabled | bool
|
- service.enabled | bool
|
||||||
with_dict: "{{ masakari_services }}"
|
with_items:
|
||||||
|
- masakari-api
|
||||||
|
- masakari-engine
|
||||||
notify:
|
notify:
|
||||||
- Restart {{ item.key }} container
|
- Restart {{ service_name }} container
|
||||||
|
|
||||||
- name: Copying over masakari-monitors.conf
|
- name: Copying over masakari-monitors.conf
|
||||||
vars:
|
vars:
|
||||||
service: "{{ item.key }}"
|
service_name: "{{ item }}"
|
||||||
|
service: "{{ masakari_services[service_name] }}"
|
||||||
merge_configs:
|
merge_configs:
|
||||||
sources:
|
sources:
|
||||||
- "{{ role_path }}/templates/masakari-monitors.conf.j2"
|
- "{{ role_path }}/templates/masakari-monitors.conf.j2"
|
||||||
- "{{ node_custom_config }}/global.conf"
|
- "{{ node_custom_config }}/global.conf"
|
||||||
- "{{ node_custom_config }}/masakari/{{ item.key }}.conf"
|
- "{{ node_custom_config }}/masakari/{{ service_name }}.conf"
|
||||||
- "{{ node_custom_config }}/masakari/masakari-monitors.conf"
|
- "{{ node_custom_config }}/masakari/masakari-monitors.conf"
|
||||||
- "{{ node_custom_config }}/masakari/{{ inventory_hostname }}/masakari-monitors.conf"
|
- "{{ node_custom_config }}/masakari/{{ inventory_hostname }}/masakari-monitors.conf"
|
||||||
dest: "{{ node_config_directory }}/{{ item.key }}/masakari-monitors.conf"
|
dest: "{{ node_config_directory }}/{{ service_name }}/masakari-monitors.conf"
|
||||||
mode: "0660"
|
mode: "0660"
|
||||||
become: true
|
become: true
|
||||||
when:
|
when:
|
||||||
- inventory_hostname in groups[item.value.group]
|
- inventory_hostname in groups[service.group]
|
||||||
- item.value.enabled | bool
|
- service.enabled | bool
|
||||||
with_dict: "{{ masakari_services }}"
|
with_items:
|
||||||
|
- masakari-instancemonitor
|
||||||
notify:
|
notify:
|
||||||
- Restart {{ item.key }} container
|
- Restart {{ service_name }} container
|
||||||
|
|
||||||
- name: Copying over wsgi-masakari file for services
|
- name: Copying over wsgi-masakari file for services
|
||||||
vars:
|
vars:
|
||||||
|
@ -0,0 +1,12 @@
|
|||||||
|
---
|
||||||
|
fixes:
|
||||||
|
- |
|
||||||
|
Fixes an issue where ``masakari.conf`` was generated for the
|
||||||
|
``masakari-instancemonitor`` service but not used.
|
||||||
|
- |
|
||||||
|
Fixes an issue where ``masakari-monitors.conf`` was generated for the
|
||||||
|
``masakari-api`` and ``masakari-engine`` services but not used.
|
||||||
|
- |
|
||||||
|
Uses a consistent variable name for container dimensions for
|
||||||
|
``masakari-instancemonitor`` - ``masakari_instancemonitor_dimensions``.
|
||||||
|
The old name of ``masakari_monitors_dimensions`` is still supported.
|
Loading…
x
Reference in New Issue
Block a user