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
This commit is contained in:
Carlos Camacho 2018-07-05 16:16:56 +02:00
parent a8393fa8a4
commit 00ed1a2d39
3 changed files with 32 additions and 12 deletions
docker/services
database
nova-api.yaml
pacemaker/database

@ -282,3 +282,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'

@ -423,18 +423,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

@ -507,3 +507,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'