kolla-ansible/ansible/roles/keystone/tasks/upgrade.yml
Duong Ha-Quang f7870e1d2f Implement Keystone zero-downtime upgrade
1- Expand and migrate database in first keystone node
  2- Upgrade all nodes sequentially along with updation of each node's
     configuration file with latest release version
  3- Last keystone node, contract database

With this patch, there is small downtime when all containers are
restarted. It will be fixed in other patch.

[1] http://docs.openstack.org/developer/keystone/upgrading.html#upgrading-without-downtime

Co-Authored-By: Surya Prakash Singh <surya.singh@nectechnologies.in>
Co-Authored-By: Eduardo Gonzalez <dabarren@gmail.com>
Co-Authored-By: Duong Ha-Quang <duonghq@vn.fujitsu.com>

Partially-Implements: blueprint ks-rolling-upgrade-role

Change-Id: I2159af567c40848840ff5e483e7d1f6de760b435
2017-11-16 11:13:50 +07:00

43 lines
1.2 KiB
YAML

---
- include: config.yml
- name: Enable log_bin_trust_function_creators function
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]
- 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
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]