[FFU] Ensure compatibility with ansible 2.6.
Ansible 2.6 fix didn't properly selct bootstrap node. Also
new ansible changed mysql backend library making it unable
to read misformated my.cnf. This library also needs to have
socket specified if it's going to connect to local server.
Change-Id: I31b38eaf66bb899e72b1bfeca8795e5d1007eee5
Resolves: rhbz#1678235
Closes-bug: #1816422
(cherry picked from commit d8c368e09f
)
This commit is contained in:
parent
b427f43683
commit
6297c1b2d8
|
@ -700,7 +700,9 @@ outputs:
|
|||
fast_forward_upgrade_bootstrap_role_tasks: |
|
||||
{%- for role in roles %}
|
||||
- include_tasks: {{role.name}}/fast_forward_upgrade_tasks.yaml
|
||||
when: tripleo_role_name == '{{role.name}}' and ansible_hostname == {{role.name}}[0]
|
||||
when:
|
||||
- tripleo_role_name == '{{role.name}}'
|
||||
- is_bootstrap_node|bool
|
||||
{%- endfor %}
|
||||
post_update_steps_tasks: |
|
||||
{%- for role in roles %}
|
||||
|
|
|
@ -275,13 +275,20 @@ outputs:
|
|||
- release == 'ocata'
|
||||
- is_bootstrap_node|bool
|
||||
block:
|
||||
- name: Remove whitespaces in .my.cnf
|
||||
replace:
|
||||
path: /root/.my.cnf
|
||||
regexp: '^ +'
|
||||
replace: ''
|
||||
- name: Create cell0 db
|
||||
mysql_db:
|
||||
name: nova_cell0
|
||||
state: present
|
||||
login_unix_socket: '/var/lib/mysql/mysql.sock'
|
||||
- name: Grant access to cell0 db
|
||||
mysql_user:
|
||||
name: nova
|
||||
host_all: yes
|
||||
state: present
|
||||
priv: '*.*:ALL'
|
||||
login_unix_socket: '/var/lib/mysql/mysql.sock'
|
||||
|
|
|
@ -516,13 +516,20 @@ outputs:
|
|||
- release == 'ocata'
|
||||
- is_bootstrap_node|bool
|
||||
block:
|
||||
- name: Remove whitespaces in .my.cnf
|
||||
replace:
|
||||
path: /root/.my.cnf
|
||||
regexp: '^ +'
|
||||
replace: ''
|
||||
- name: Create cell0 db
|
||||
mysql_db:
|
||||
name: nova_cell0
|
||||
state: present
|
||||
login_unix_socket: '/var/lib/mysql/mysql.sock'
|
||||
- name: Grant access to cell0 db
|
||||
mysql_user:
|
||||
name: nova
|
||||
host_all: yes
|
||||
state: present
|
||||
priv: '*.*:ALL'
|
||||
login_unix_socket: '/var/lib/mysql/mysql.sock'
|
||||
|
|
|
@ -175,9 +175,11 @@ outputs:
|
|||
mysql_db:
|
||||
name: nova_cell0
|
||||
state: present
|
||||
login_unix_socket: '/var/lib/mysql/mysql.sock'
|
||||
- name: Setup cell_v2 (grant access to the nova DB user)
|
||||
when: step|int == 4
|
||||
mysql_user:
|
||||
login_unix_socket: '/var/lib/mysql/mysql.sock'
|
||||
str_replace:
|
||||
template: "name=nova password=PASSWORD host=\"%\" priv=\"nova.*:ALL/nova_cell0.*:ALL,GRANT\" state=present"
|
||||
params:
|
||||
|
|
Loading…
Reference in New Issue