diff --git a/ansible/inventory/all-in-one b/ansible/inventory/all-in-one index d795905e46..e30ac4f8c3 100644 --- a/ansible/inventory/all-in-one +++ b/ansible/inventory/all-in-one @@ -693,9 +693,6 @@ vitrage [vitrage-graph:children] vitrage -[vitrage-collector:children] -vitrage - [vitrage-ml:children] vitrage diff --git a/ansible/inventory/multinode b/ansible/inventory/multinode index 98ae0d96cf..5d53b571e6 100644 --- a/ansible/inventory/multinode +++ b/ansible/inventory/multinode @@ -712,9 +712,6 @@ vitrage [vitrage-graph:children] vitrage -[vitrage-collector:children] -vitrage - [vitrage-ml:children] vitrage diff --git a/ansible/roles/common/templates/conf/filter/01-rewrite-0.12.conf.j2 b/ansible/roles/common/templates/conf/filter/01-rewrite-0.12.conf.j2 index 5bf39693fa..9c87d0d31e 100644 --- a/ansible/roles/common/templates/conf/filter/01-rewrite-0.12.conf.j2 +++ b/ansible/roles/common/templates/conf/filter/01-rewrite-0.12.conf.j2 @@ -31,6 +31,6 @@ rewriterule28 programname ^(ironic-api|ironic-conductor|ironic-inspector)$ openstack_python rewriterule29 programname ^(panko-api|panko-dbsync)$ openstack_python rewriterule30 programname ^(tacker-server|tacker-conductor)$ openstack_python - rewriterule31 programname ^(vitrage-collector|vitrage-ml|vitrage-notifier|vitrage-graph)$ openstack_python + rewriterule31 programname ^(vitrage-ml|vitrage-notifier|vitrage-graph)$ openstack_python rewriterule32 programname ^(blazar-api|blazar-manager)$ openstack_python diff --git a/ansible/roles/common/templates/conf/filter/01-rewrite-0.14.conf.j2 b/ansible/roles/common/templates/conf/filter/01-rewrite-0.14.conf.j2 index a2c7578338..9672671dc0 100644 --- a/ansible/roles/common/templates/conf/filter/01-rewrite-0.14.conf.j2 +++ b/ansible/roles/common/templates/conf/filter/01-rewrite-0.14.conf.j2 @@ -153,7 +153,7 @@ key programname - pattern ^(vitrage-collector|vitrage-ml|vitrage-notifier|vitrage-graph)$ + pattern ^(vitrage-ml|vitrage-notifier|vitrage-graph)$ tag openstack_python diff --git a/ansible/roles/vitrage/defaults/main.yml b/ansible/roles/vitrage/defaults/main.yml index 3138f6aed7..a952203684 100644 --- a/ansible/roles/vitrage/defaults/main.yml +++ b/ansible/roles/vitrage/defaults/main.yml @@ -24,17 +24,6 @@ vitrage_services: mode: "http" external: true port: "{{ vitrage_api_port }}" - vitrage-collector: - container_name: vitrage_collector - group: vitrage-collector - enabled: true - image: "{{ vitrage_collector_image_full }}" - volumes: - - "{{ node_config_directory }}/vitrage-collector/:{{ container_config_directory }}/:ro" - - "/etc/localtime:/etc/localtime:ro" - - "{{ kolla_dev_repos_directory ~ '/vitrage/vitrage:/var/lib/kolla/venv/lib/python2.7/site-packages/vitrage' if vitrage_dev_mode | bool else '' }}" - - "kolla_logs:/var/log/kolla/" - dimensions: "{{ vitrage_collector_dimensions }}" vitrage-notifier: container_name: vitrage_notifier group: vitrage-notifier @@ -95,17 +84,12 @@ vitrage_notifier_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{ vitrage_notifier_tag: "{{ vitrage_tag }}" vitrage_notifier_image_full: "{{ vitrage_notifier_image }}:{{ vitrage_notifier_tag }}" -vitrage_collector_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker_namespace }}/{{ kolla_base_distro }}-{{ vitrage_install_type }}-vitrage-collector" -vitrage_collector_tag: "{{ vitrage_tag }}" -vitrage_collector_image_full: "{{ vitrage_collector_image }}:{{ vitrage_collector_tag }}" - vitrage_ml_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker_namespace }}/{{ kolla_base_distro }}-{{ vitrage_install_type }}-vitrage-ml" vitrage_ml_tag: "{{ vitrage_tag }}" vitrage_ml_image_full: "{{ vitrage_ml_image }}:{{ vitrage_ml_tag }}" vitrage_api_dimensions: "{{ default_container_dimensions }}" vitrage_notifier_dimensions: "{{ default_container_dimensions }}" -vitrage_collector_dimensions: "{{ default_container_dimensions }}" vitrage_graph_dimensions: "{{ default_container_dimensions }}" vitrage_ml_dimensions: "{{ default_container_dimensions }}" diff --git a/ansible/roles/vitrage/handlers/main.yml b/ansible/roles/vitrage/handlers/main.yml index 3471a81494..06ddd25a11 100644 --- a/ansible/roles/vitrage/handlers/main.yml +++ b/ansible/roles/vitrage/handlers/main.yml @@ -24,31 +24,6 @@ or policy_overwriting.changed | bool or vitrage_api_container.changed | bool -- name: Restart vitrage-collector container - vars: - service_name: "vitrage-collector" - service: "{{ vitrage_services[service_name] }}" - config_json: "{{ vitrage_config_jsons.results|selectattr('item.key', 'equalto', service_name)|first }}" - vitrage_conf: "{{ vitrage_confs.results|selectattr('item.key', 'equalto', service_name)|first }}" - policy_overwriting: "{{ vitrage_policy_overwriting.results|selectattr('item.key', 'equalto', service_name)|first }}" - vitrage_collector_container: "{{ check_vitrage_containers.results|selectattr('item.key', 'equalto', service_name)|first }}" - become: true - kolla_docker: - action: "recreate_or_restart_container" - common_options: "{{ docker_common_options }}" - name: "{{ service.container_name }}" - image: "{{ service.image }}" - volumes: "{{ service.volumes | reject('equalto', '') | list }}" - dimensions: "{{ service.dimensions }}" - when: - - kolla_action != "config" - - inventory_hostname in groups[service.group] - - service.enabled | bool - - config_json.changed | bool - or vitrage_conf.changed | bool - or policy_overwriting.changed | bool - or vitrage_collector_container.changed | bool - - name: Restart vitrage-notifier container vars: service_name: "vitrage-notifier" diff --git a/ansible/roles/vitrage/tasks/config.yml b/ansible/roles/vitrage/tasks/config.yml index 66389a22c2..42c739af11 100644 --- a/ansible/roles/vitrage/tasks/config.yml +++ b/ansible/roles/vitrage/tasks/config.yml @@ -42,7 +42,6 @@ with_dict: "{{ vitrage_services }}" notify: - Restart vitrage-api container - - Restart vitrage-collector container - Restart vitrage-notifier container - Restart vitrage-graph container - Restart vitrage-ml container @@ -68,7 +67,6 @@ with_dict: "{{ vitrage_services }}" notify: - Restart vitrage-api container - - Restart vitrage-collector container - Restart vitrage-notifier container - Restart vitrage-graph container - Restart vitrage-ml container @@ -98,7 +96,6 @@ with_dict: "{{ vitrage_services }}" notify: - Restart vitrage-api container - - Restart vitrage-collector container - Restart vitrage-graph container - Restart vitrage-notifier container - Restart vitrage-ml container @@ -120,7 +117,6 @@ with_dict: "{{ vitrage_services }}" notify: - Restart vitrage-api container - - Restart vitrage-collector container - Restart vitrage-graph container - Restart vitrage-notifier container - Restart vitrage-ml container diff --git a/ansible/roles/vitrage/tasks/deploy.yml b/ansible/roles/vitrage/tasks/deploy.yml index 84592499e3..0861879a52 100644 --- a/ansible/roles/vitrage/tasks/deploy.yml +++ b/ansible/roles/vitrage/tasks/deploy.yml @@ -6,8 +6,7 @@ when: inventory_hostname in groups['vitrage-api'] or inventory_hostname in groups['vitrage-ml'] or inventory_hostname in groups['vitrage-graph'] or - inventory_hostname in groups['vitrage-notifier'] or - inventory_hostname in groups['vitrage-collector'] + inventory_hostname in groups['vitrage-notifier'] - include_tasks: clone.yml when: vitrage_dev_mode | bool diff --git a/ansible/roles/vitrage/tasks/upgrade.yml b/ansible/roles/vitrage/tasks/upgrade.yml index 20ccddc8f1..3aaf80c99d 100644 --- a/ansible/roles/vitrage/tasks/upgrade.yml +++ b/ansible/roles/vitrage/tasks/upgrade.yml @@ -3,5 +3,14 @@ - include_tasks: bootstrap_service.yml +# NOTE(kiennt): vitrage-collector are removed in Stein cycle. +# Upgrade to Stein should remove vitrage-collector +# container. This task should be removed in +# T cycle. +- name: Remove vitrage-collector container + kolla_docker: + name: vitrage_collector + action: remove_container + - name: Flush handlers meta: flush_handlers diff --git a/ansible/roles/vitrage/templates/vitrage-collector.json.j2 b/ansible/roles/vitrage/templates/vitrage-collector.json.j2 deleted file mode 100644 index 4da868bf40..0000000000 --- a/ansible/roles/vitrage/templates/vitrage-collector.json.j2 +++ /dev/null @@ -1,24 +0,0 @@ -{ - "command": "vitrage-collector --config-file /etc/vitrage/vitrage.conf", - "config_files": [ - { - "source": "{{ container_config_directory }}/vitrage.conf", - "dest": "/etc/vitrage/vitrage.conf", - "owner": "vitrage", - "perm": "0644" - }{% if vitrage_policy_file is defined %}, - { - "source": "{{ container_config_directory }}/{{ vitrage_policy_file }}", - "dest": "/etc/vitrage/{{ vitrage_policy_file }}", - "owner": "vitrage", - "perm": "0600" - }{% endif %} - ], - "permissions": [ - { - "path": "/var/log/kolla/vitrage", - "owner": "vitrage:vitrage", - "recurse": true - } - ] -} diff --git a/ansible/site.yml b/ansible/site.yml index 3cc9b0b886..93aca9a22a 100644 --- a/ansible/site.yml +++ b/ansible/site.yml @@ -1170,7 +1170,6 @@ - vitrage-api - vitrage-graph - vitrage-notifier - - vitrage-collector - vitrage-ml - '&enable_vitrage_True' serial: '{{ kolla_serial|default("0") }}' diff --git a/tests/templates/inventory.j2 b/tests/templates/inventory.j2 index 2056bfa7e3..c655b8829c 100644 --- a/tests/templates/inventory.j2 +++ b/tests/templates/inventory.j2 @@ -635,9 +635,6 @@ vitrage [vitrage-graph:children] vitrage -[vitrage-collector:children] -vitrage - [vitrage-ml:children] vitrage