FFU Create cell0 db points to the nova-api bootstrap node.

In case the nova-api service is not running in the MySQL
master node, the FFU tasks will fail as it might not have
MySQL installed.

Avoid executing Nova DB tasks on FFU if MySQL not installed,
point to the MySQL server.

Resolves: rhbz#1593910
Closes-bug: 1780425

Change-Id: I02bc48d535707d579ecd590f970b1a08962a0111
(cherry picked from commit 00ed1a2d39)
This commit is contained in:
Carlos Camacho 2018-07-05 16:16:56 +02:00
parent 1efe4f0aaa
commit d0db7e00e8
3 changed files with 32 additions and 12 deletions

View File

@ -254,3 +254,19 @@ outputs:
- name: Check and upgrade Mysql database after major version upgrade
command: docker exec -u root mysql mysql_upgrade
when: step|int == 2
fast_forward_upgrade_tasks:
- when:
- step|int == 6
- release == 'ocata'
- is_bootstrap_node|bool
block:
- name: Create cell0 db
mysql_db:
name: nova_cell0
state: present
- name: Grant access to cell0 db
mysql_user:
name: nova
host_all: yes
state: present
priv: '*.*:ALL'

View File

@ -408,18 +408,6 @@ outputs:
- release == 'ocata'
- is_bootstrap_node|bool
block:
- name: Create cell0 db
mysql_db:
name: nova_cell0
state: present
- name: Grant access to cell0 db
mysql_user:
name: nova
host_all: yes
state: present
priv: '*.*:ALL'
- name: Create puppet manifest to set transport_url in nova.conf
copy:
dest: /root/nova-api_upgrade_manifest.pp

View File

@ -505,3 +505,19 @@ outputs:
- name: Upgrade Mysql database from the host
shell: /bin/bash -ecx "{{mysql_upgrade_script}}"
when: not mysql_containerized|bool
fast_forward_upgrade_tasks:
- when:
- step|int == 6
- release == 'ocata'
- is_bootstrap_node|bool
block:
- name: Create cell0 db
mysql_db:
name: nova_cell0
state: present
- name: Grant access to cell0 db
mysql_user:
name: nova
host_all: yes
state: present
priv: '*.*:ALL'