Skip to content

Commit

Permalink
Merge "Fix Octavia service upgrade failure from 2023.1" into stable/2…
Browse files Browse the repository at this point in the history
…024.1
  • Loading branch information
Zuul authored and openstack-gerrit committed Oct 30, 2024
2 parents 8cc772c + 865d041 commit e4aae33
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 0 deletions.
37 changes: 37 additions & 0 deletions ansible/roles/octavia/tasks/upgrade.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,43 @@

- import_tasks: check-containers.yml

# NOTE(mnasiadka): Run octavia persistence db tasks for upgrade
- name: Creating Octavia persistence database
become: true
kolla_toolbox:
container_engine: "{{ kolla_container_engine }}"
module_name: mysql_db
module_args:
login_host: "{{ database_address }}"
login_port: "{{ database_port }}"
login_user: "{{ octavia_persistence_database_shard_root_user }}"
login_password: "{{ database_password }}"
name: "{{ octavia_persistence_database_name }}"
run_once: True
delegate_to: "{{ groups['octavia-api'][0] }}"
when:
- not use_preconfigured_databases | bool

- name: Creating Octavia persistence database user and setting permissions
become: true
kolla_toolbox:
container_engine: "{{ kolla_container_engine }}"
module_name: mysql_user
module_args:
login_host: "{{ database_address }}"
login_port: "{{ database_port }}"
login_user: "{{ octavia_persistence_database_shard_root_user }}"
login_password: "{{ database_password }}"
name: "{{ octavia_persistence_database_user }}"
password: "{{ octavia_persistence_database_password }}"
host: "%"
priv: "{{ octavia_persistence_database_name }}.*:ALL"
append_privs: "yes"
run_once: True
delegate_to: "{{ groups['octavia-api'][0] }}"
when:
- not use_preconfigured_databases | bool

- import_tasks: bootstrap_service.yml

- name: Flush handlers
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
fixes:
- |
Fixes Octavia service upgrade issue where it can fail when Octavia
persistence database user is missing.
`LP#2065591 <https://launchpad.net/bugs/2065591>`__

0 comments on commit e4aae33

Please sign in to comment.