Use first conductor for nova-manage cell_v2 discover_hosts
Using a random conductor leads to unpredictable results with lazy eval
Change-Id: I846f78c80e4b5eb8421dbdebf3fc943be0bc84df
Closed-Bug: 1762742
(cherry picked from commit db5a6181c3
)
This commit is contained in:
parent
a08fa0e9e0
commit
ad9bcb0815
|
@ -130,11 +130,11 @@
|
|||
# the database connection string and therefore
|
||||
# cannot run nova-manage.
|
||||
- include: nova_db_post_setup.yml
|
||||
delegate_to: "{{ random_conductor }}"
|
||||
delegate_to: "{{ first_conductor }}"
|
||||
run_once: true
|
||||
when:
|
||||
- "nova_services['nova-compute']['group'] in group_names"
|
||||
vars:
|
||||
random_conductor: "{{ groups[nova_services['nova-conductor']['group']] | random }}"
|
||||
first_conductor: "{{ groups[nova_services['nova-conductor']['group']][0] }}"
|
||||
tags:
|
||||
- nova-config
|
||||
|
|
|
@ -15,8 +15,8 @@
|
|||
|
||||
- name: Set the delegated task facts
|
||||
set_fact:
|
||||
_db_nova_bin: "{{ hostvars[random_conductor]['nova_bin'] | default(nova_bin) }}"
|
||||
_db_nova_system_user_name: "{{ hostvars[random_conductor]['nova_system_user_name'] | default(nova_system_user_name) }}"
|
||||
_db_nova_bin: "{{ hostvars[first_conductor]['nova_bin'] | default(nova_bin) }}"
|
||||
_db_nova_system_user_name: "{{ hostvars[first_conductor]['nova_system_user_name'] | default(nova_system_user_name) }}"
|
||||
|
||||
# This needs to be done after Compute hosts are added.
|
||||
- name: Perform a cell_v2 discover
|
||||
|
|
Loading…
Reference in New Issue