kolla-ansible/ansible/roles/keystone/tasks/upgrade.yml
Radosław Piliszek 3411b9e420 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
2020-10-12 19:30:06 +02:00

50 lines
1.4 KiB
YAML

---
- import_tasks: config.yml
- import_tasks: check-containers.yml
- name: Enable log_bin_trust_function_creators function
become: true
kolla_toolbox:
module_name: mysql_variables
module_args:
login_host: "{{ database_address }}"
login_port: "{{ database_port }}"
login_user: "{{ database_user }}"
login_password: "{{ database_password }}"
variable: log_bin_trust_function_creators
value: 1
run_once: True
when:
- inventory_hostname == groups['keystone'][0]
- not use_preconfigured_databases | bool
- name: Init keystone database upgrade
command: /bin/true
notify: Init keystone database upgrade
when: inventory_hostname == groups['keystone'][0]
- name: Finish keystone database upgrade
command: /bin/true
notify: Finish keystone database upgrade
when: inventory_hostname == groups['keystone'][-1]
- name: Flush handlers
meta: flush_handlers
- name: Disable log_bin_trust_function_creators function
become: true
kolla_toolbox:
module_name: mysql_variables
module_args:
login_host: "{{ database_address }}"
login_port: "{{ database_port }}"
login_user: "{{ database_user }}"
login_password: "{{ database_password }}"
variable: log_bin_trust_function_creators
value: 0
run_once: True
when:
- inventory_hostname == groups['keystone'][-1]
- not use_preconfigured_databases | bool