Performance: optimize genconfig

Config plays do not need to check containers. This avoids skipping
tasks during the genconfig action.

Ironic and Glance rolling upgrades are handled specially.

Swift and Bifrost do not use the handlers at all.

Partially-Implements: blueprint performance-improvements
Change-Id: I140bf71d62e8f0932c96270d1f08940a5ba4542a
This commit is contained in:
Radosław Piliszek 2020-07-30 14:36:15 +02:00
parent 93ad57f47e
commit 3411b9e420
198 changed files with 264 additions and 202 deletions
ansible/roles

@ -95,6 +95,3 @@
- service.enabled | bool
notify:
- "Restart aodh-api container"
- import_tasks: check-containers.yml
when: kolla_action != "config"

@ -3,6 +3,8 @@
- import_tasks: config.yml
- import_tasks: check-containers.yml
- include_tasks: clone.yml
when: aodh_dev_mode | bool

@ -1,6 +1,8 @@
---
- import_tasks: config.yml
- import_tasks: check-containers.yml
- import_tasks: bootstrap_service.yml
- name: Flush handlers

@ -141,6 +141,3 @@
with_dict: "{{ barbican_services }}"
notify:
- Restart {{ item.key }} container
- import_tasks: check-containers.yml
when: kolla_action != "config"

@ -3,6 +3,8 @@
- import_tasks: config.yml
- import_tasks: check-containers.yml
- include_tasks: clone.yml
when: barbican_dev_mode | bool

@ -1,6 +1,8 @@
---
- import_tasks: config.yml
- import_tasks: check-containers.yml
- import_tasks: bootstrap_service.yml
- name: Flush handlers

@ -81,6 +81,3 @@
with_dict: "{{ blazar_services }}"
notify:
- Restart {{ item.key }} container
- import_tasks: check-containers.yml
when: kolla_action != "config"

@ -3,6 +3,8 @@
- import_tasks: config.yml
- import_tasks: check-containers.yml
- include_tasks: clone.yml
when: blazar_dev_mode | bool

@ -1,6 +1,8 @@
---
- import_tasks: config.yml
- import_tasks: check-containers.yml
- import_tasks: bootstrap_service.yml
- name: Flush handlers

@ -390,6 +390,3 @@
with_dict: "{{ ceilometer_services }}"
notify:
- "Restart {{ item.key }} container"
- import_tasks: check-containers.yml
when: kolla_action != "config"

@ -3,6 +3,8 @@
- import_tasks: config.yml
- import_tasks: check-containers.yml
- include_tasks: clone.yml
when: ceilometer_dev_mode | bool

@ -1,6 +1,8 @@
---
- import_tasks: config.yml
- import_tasks: check-containers.yml
- import_tasks: bootstrap_service.yml
- name: Flush handlers

@ -51,6 +51,3 @@
- "chrony.conf.j2"
notify:
- Restart chrony container
- import_tasks: check-containers.yml
when: kolla_action != "config"

@ -1,5 +1,7 @@
---
- import_tasks: config.yml
- import_tasks: check-containers.yml
- name: Flush handlers
meta: flush_handlers

@ -126,6 +126,3 @@
when: inventory_hostname in groups['cinder-volume']
notify:
- Restart cinder-volume container
- import_tasks: check-containers.yml
when: kolla_action != "config"

@ -3,6 +3,8 @@
- import_tasks: config.yml
- import_tasks: check-containers.yml
- include_tasks: clone.yml
when: cinder_dev_mode | bool

@ -8,6 +8,8 @@
- import_tasks: config.yml
- import_tasks: check-containers.yml
- name: Flush handlers
meta: flush_handlers

@ -119,6 +119,3 @@
with_dict: "{{ cloudkitty_services }}"
notify:
- Restart {{ item.key }} container
- import_tasks: check-containers.yml
when: kolla_action != "config"

@ -3,6 +3,8 @@
- import_tasks: config.yml
- import_tasks: check-containers.yml
- include_tasks: clone.yml
when: cloudkitty_dev_mode | bool

@ -1,6 +1,8 @@
---
- import_tasks: config.yml
- import_tasks: check-containers.yml
- import_tasks: bootstrap_service.yml
- name: Flush handlers

@ -56,6 +56,3 @@
- service.enabled | bool
notify:
- Restart collectd container
- import_tasks: check-containers.yml
when: kolla_action != "config"

@ -1,5 +1,7 @@
---
- import_tasks: config.yml
- import_tasks: check-containers.yml
- name: Flush handlers
meta: flush_handlers

@ -1,5 +1,7 @@
---
- import_tasks: config.yml
- import_tasks: check-containers.yml
- name: Flush handlers
meta: flush_handlers

@ -283,6 +283,3 @@
when:
- common_services['kolla-toolbox'] | service_enabled_and_mapped_to_host
- api_address_family == "ipv6"
- import_tasks: check-containers.yml
when: kolla_action != "config"

@ -1,6 +1,8 @@
---
- import_tasks: config.yml
- import_tasks: check-containers.yml
- import_tasks: bootstrap.yml
- name: Flush handlers

@ -1,5 +1,7 @@
---
- import_tasks: config.yml
- import_tasks: check-containers.yml
- name: Flush handlers
meta: flush_handlers

@ -96,6 +96,3 @@
- service.enabled | bool
notify:
- Restart cyborg-api container
- import_tasks: check-containers.yml
when: kolla_action != "config"

@ -3,6 +3,8 @@
- import_tasks: config.yml
- import_tasks: check-containers.yml
- import_tasks: bootstrap.yml
- name: Flush handlers

@ -1,6 +1,8 @@
---
- import_tasks: config.yml
- import_tasks: check-containers.yml
- import_tasks: bootstrap_service.yml
- name: Flush handlers

@ -151,6 +151,3 @@
with_dict: "{{ designate_services }}"
notify:
- Restart {{ item.key }} container
- import_tasks: check-containers.yml
when: kolla_action != "config"

@ -3,6 +3,8 @@
- import_tasks: config.yml
- import_tasks: check-containers.yml
- include_tasks: clone.yml
when: designate_dev_mode | bool

@ -1,6 +1,8 @@
---
- import_tasks: config.yml
- import_tasks: check-containers.yml
- import_tasks: bootstrap_service.yml
- name: Flush handlers

@ -76,6 +76,3 @@
- service.enabled | bool
notify:
- Restart elasticsearch-curator container
- import_tasks: check-containers.yml
when: kolla_action != "config"

@ -3,5 +3,7 @@
- import_tasks: config.yml
- import_tasks: check-containers.yml
- name: Flush handlers
meta: flush_handlers

@ -54,5 +54,7 @@
- import_tasks: config.yml
- import_tasks: check-containers.yml
- name: Flush handlers
meta: flush_handlers

@ -28,6 +28,3 @@
- include_tasks: copy-certs.yml
when:
- etcd_enable_tls | bool
- import_tasks: check-containers.yml
when: kolla_action != "config"

@ -1,5 +1,7 @@
---
- import_tasks: config.yml
- import_tasks: check-containers.yml
- name: Flush handlers
meta: flush_handlers

@ -1,5 +1,7 @@
---
- import_tasks: config.yml
- import_tasks: check-containers.yml
- name: Flush handlers
meta: flush_handlers

@ -95,6 +95,3 @@
with_dict: "{{ freezer_services }}"
notify:
- "Restart {{ item.key }} container"
- import_tasks: check-containers.yml
when: kolla_action != "config"

@ -3,6 +3,8 @@
- import_tasks: config.yml
- import_tasks: check-containers.yml
- include_tasks: clone.yml
when: freezer_dev_mode | bool

@ -1,6 +1,8 @@
---
- import_tasks: config.yml
- import_tasks: check-containers.yml
- import_tasks: bootstrap_service.yml
- name: Flush handlers

@ -185,6 +185,3 @@
- glance_tls_proxy.host_in_groups | bool
notify:
- Restart glance-tls-proxy container
- import_tasks: check-containers.yml
when: kolla_action != "config"

@ -3,6 +3,8 @@
- import_tasks: config.yml
- import_tasks: check-containers.yml
- include_tasks: clone.yml
when:
- glance_dev_mode | bool

@ -1,6 +1,8 @@
---
- import_tasks: config.yml
- import_tasks: check-containers.yml
- import_tasks: bootstrap_service.yml
- name: Flush handlers

@ -74,6 +74,8 @@
- include_tasks: config.yml
when: inventory_hostname != glance_api_hosts[0]
- import_tasks: check-containers.yml
- name: Flush handlers
meta: flush_handlers

@ -101,6 +101,3 @@
with_dict: "{{ gnocchi_services }}"
notify:
- Restart {{ item.key }} container
- import_tasks: check-containers.yml
when: kolla_action != "config"

@ -3,6 +3,8 @@
- import_tasks: config.yml
- import_tasks: check-containers.yml
- import_tasks: bootstrap.yml
- name: Flush handlers

@ -1,6 +1,8 @@
---
- import_tasks: config.yml
- import_tasks: check-containers.yml
- import_tasks: bootstrap_service.yml
- name: Flush handlers

@ -102,6 +102,3 @@
- "prometheus.yaml.j2"
notify:
- Restart grafana container
- import_tasks: check-containers.yml
when: kolla_action != "config"

@ -1,6 +1,8 @@
---
- import_tasks: config.yml
- import_tasks: check-containers.yml
- import_tasks: bootstrap.yml
- name: Flush handlers

@ -14,6 +14,8 @@
- import_tasks: config.yml
- import_tasks: check-containers.yml
# NOTE(dszumski): We don't want old Grafana instances running after
# a new instance has updated the DB schema. Since the first instance
# is upgraded first, we stop all the other ones.

@ -146,6 +146,3 @@
- "haproxy_run.sh.j2"
notify:
- Restart haproxy container
- import_tasks: check-containers.yml
when: kolla_action != "config"

@ -3,6 +3,8 @@
- import_tasks: config.yml
- import_tasks: check-containers.yml
# NOTE(yoctozepto): haproxy role handlers should not be flushed early.
# site.yml handles all haproxy things in a dedicated play.
# This is to avoid extra haproxy service restart.

@ -109,6 +109,3 @@
- service.enabled | bool
notify:
- Restart heat-api-cfn container
- import_tasks: check-containers.yml
when: kolla_action != "config"

@ -3,6 +3,8 @@
- import_tasks: config.yml
- import_tasks: check-containers.yml
- include_tasks: clone.yml
when:
- heat_dev_mode | bool

@ -1,6 +1,8 @@
---
- import_tasks: config.yml
- import_tasks: check-containers.yml
- import_tasks: bootstrap_service.yml
# NOTE(priteau): Remove this task in V cycle.

@ -135,6 +135,3 @@
- include_tasks: copy-certs.yml
when:
- kolla_copy_ca_into_containers | bool or horizon_enable_tls_backend | bool
- import_tasks: check-containers.yml
when: kolla_action != "config"

@ -1,6 +1,8 @@
---
- import_tasks: config.yml
- import_tasks: check-containers.yml
- include_tasks: clone.yml
when:
- horizon_dev_mode | bool

@ -1,6 +1,8 @@
---
- import_tasks: config.yml
- import_tasks: check-containers.yml
- include_tasks: clone.yml
when:
- horizon_dev_mode | bool

@ -42,6 +42,3 @@
- "influxdb.conf.j2"
notify:
- Restart influxdb container
- import_tasks: check-containers.yml
when: kolla_action != "config"

@ -1,5 +1,7 @@
---
- import_tasks: config.yml
- import_tasks: check-containers.yml
- name: Flush handlers
meta: flush_handlers

@ -1,5 +1,7 @@
---
- import_tasks: config.yml
- import_tasks: check-containers.yml
- name: Flush handlers
meta: flush_handlers

@ -255,6 +255,3 @@
- ironic_services["ironic-api"].enabled | bool
notify:
- "Restart ironic-api container"
- import_tasks: check-containers.yml
when: kolla_action != "config"

@ -6,6 +6,8 @@
- import_tasks: config.yml
- import_tasks: check-containers.yml
- include_tasks: clone.yml
when: ironic_dev_mode | bool

@ -3,6 +3,8 @@
- import_tasks: config.yml
- import_tasks: check-containers.yml
- import_tasks: bootstrap_service.yml
- name: Flush handlers

@ -6,6 +6,8 @@
vars:
pin_release_version: "{{ openstack_previous_release_name }}"
- import_tasks: check-containers.yml
- import_tasks: bootstrap_service.yml
# TODO(donghm): Flush_handlers to restart ironic services
@ -19,6 +21,8 @@
# Unpin version
- import_tasks: config.yml
- import_tasks: check-containers.yml
# Restart ironic services with unpinned release version
- name: Flush handlers
meta: flush_handlers

@ -24,6 +24,3 @@
with_dict: "{{ iscsi_services }}"
notify:
- "Restart {{ item.key }} container"
- import_tasks: check-containers.yml
when: kolla_action != "config"

@ -3,5 +3,7 @@
- import_tasks: config.yml
- import_tasks: check-containers.yml
- name: Flush handlers
meta: flush_handlers

@ -40,6 +40,3 @@
with_dict: "{{ kafka_services }}"
notify:
- Restart kafka container
- import_tasks: check-containers.yml
when: kolla_action != "config"

@ -1,5 +1,7 @@
---
- import_tasks: config.yml
- import_tasks: check-containers.yml
- name: Flush handlers
meta: flush_handlers

@ -1,5 +1,7 @@
---
- import_tasks: config.yml
- import_tasks: check-containers.yml
- name: Flush handlers
meta: flush_handlers

@ -82,6 +82,3 @@
- service.enabled | bool
notify:
- Restart karbor-protection container
- import_tasks: check-containers.yml
when: kolla_action != "config"

@ -3,6 +3,8 @@
- import_tasks: config.yml
- import_tasks: check-containers.yml
- import_tasks: bootstrap.yml
- name: Flush handlers

@ -1,6 +1,8 @@
---
- import_tasks: config.yml
- import_tasks: check-containers.yml
- import_tasks: bootstrap_service.yml
- name: Flush handlers

@ -243,6 +243,3 @@
- keystone_ssh.enabled | bool
notify:
- Restart keystone-ssh container
- import_tasks: check-containers.yml
when: kolla_action != "config"

@ -1,6 +1,8 @@
---
- import_tasks: config.yml
- import_tasks: check-containers.yml
- include_tasks: clone.yml
when:
- keystone_dev_mode | bool

@ -1,6 +1,8 @@
---
- import_tasks: config.yml
- import_tasks: check-containers.yml
- name: Enable log_bin_trust_function_creators function
become: true
kolla_toolbox:

@ -46,6 +46,3 @@
- kibana.enabled | bool
notify:
- Restart kibana container
- import_tasks: check-containers.yml
when: kolla_action != "config"

@ -1,5 +1,7 @@
---
- import_tasks: config.yml
- import_tasks: check-containers.yml
- name: Flush handlers
meta: flush_handlers

@ -1,6 +1,8 @@
---
- import_tasks: config.yml
- import_tasks: check-containers.yml
- import_tasks: migrate-kibana-index.yml
- name: Flush handlers

@ -97,6 +97,3 @@
with_dict: "{{ kuryr_services }}"
notify:
- Restart kuryr container
- import_tasks: check-containers.yml
when: kolla_action != "config"

@ -3,6 +3,8 @@
- import_tasks: config.yml
- import_tasks: check-containers.yml
- include_tasks: clone.yml
when:
- kuryr_dev_mode | bool

@ -1,5 +1,7 @@
---
- import_tasks: config.yml
- import_tasks: check-containers.yml
- name: Flush handlers
meta: flush_handlers

@ -81,6 +81,3 @@
with_dict: "{{ magnum_services }}"
notify:
- Restart {{ item.key }} container
- import_tasks: check-containers.yml
when: kolla_action != "config"

@ -3,6 +3,8 @@
- import_tasks: config.yml
- import_tasks: check-containers.yml
- include_tasks: clone.yml
when: magnum_dev_mode | bool

@ -1,6 +1,8 @@
---
- import_tasks: config.yml
- import_tasks: check-containers.yml
- import_tasks: bootstrap_service.yml
- name: Flush handlers

@ -110,6 +110,3 @@
with_dict: "{{ manila_services }}"
notify:
- "Restart {{ item.key }} container"
- import_tasks: check-containers.yml
when: kolla_action != "config"

@ -6,6 +6,8 @@
- import_tasks: config.yml
- import_tasks: check-containers.yml
- import_tasks: bootstrap.yml
- name: Flush handlers

@ -1,6 +1,8 @@
---
- import_tasks: config.yml
- import_tasks: check-containers.yml
- import_tasks: bootstrap_service.yml
- name: Flush handlers

@ -109,6 +109,3 @@
- service.enabled | bool
notify:
- restart mariadb-clustercheck
- import_tasks: check-containers.yml
when: kolla_action != "config"

@ -1,6 +1,8 @@
---
- import_tasks: config.yml
- import_tasks: check-containers.yml
- import_tasks: bootstrap.yml
- name: Flush handlers

@ -131,6 +131,3 @@
- service.enabled | bool
notify:
- Restart masakari-api container
- import_tasks: check-containers.yml
when: kolla_action != "config"

@ -3,6 +3,8 @@
- import_tasks: config.yml
- import_tasks: check-containers.yml
- include_tasks: clone.yml
when: masakari_dev_mode | bool

@ -1,6 +1,8 @@
---
- import_tasks: config.yml
- import_tasks: check-containers.yml
- import_tasks: bootstrap_service.yml
- name: Flush handlers

@ -24,6 +24,3 @@
- inventory_hostname in groups[service.group]
- service.enabled | bool
notify: Restart memcached container
- import_tasks: check-containers.yml
when: kolla_action != "config"

@ -1,2 +1,4 @@
---
- import_tasks: config.yml
- import_tasks: check-containers.yml

@ -1,2 +1,4 @@
---
- import_tasks: config.yml
- import_tasks: check-containers.yml

@ -99,6 +99,3 @@
- "{{ role_path }}/templates/event_definitions.yaml.j2"
notify:
- "Restart mistral-event-engine container"
- import_tasks: check-containers.yml
when: kolla_action != "config"

@ -3,6 +3,8 @@
- import_tasks: config.yml
- import_tasks: check-containers.yml
- include_tasks: clone.yml
when: mistral_dev_mode | bool

@ -1,6 +1,8 @@
---
- import_tasks: config.yml
- import_tasks: check-containers.yml
- import_tasks: bootstrap_service.yml
- name: Flush handlers

Some files were not shown because too many files have changed in this diff Show More