Merge "setup: allow custom conductor host"

This commit is contained in:
Zuul 2019-03-18 13:33:39 +00:00 committed by Gerrit Code Review
commit ab9642f95c
4 changed files with 9 additions and 8 deletions

View File

@ -34,6 +34,10 @@ debug: False
nova_service_setup_host: "{{ openstack_service_setup_host | default('localhost') }}"
nova_service_setup_host_python_interpreter: "{{ openstack_service_setup_host_python_interpreter | default((nova_service_setup_host == 'localhost') | ternary(ansible_playbook_python, ansible_python['executable'])) }}"
# Set the host which will run compute initialization tasks such as checking
# for a compute node to be up and running cell discovery.
nova_conductor_setup_host: "{{ groups[nova_services['nova-conductor']['group']][0] }}"
# Set the package install state for distribution and pip packages
# Options are 'present' and 'latest'
nova_package_state: "latest"

View File

@ -196,12 +196,11 @@
# where we want to isolate the clouds.yaml configuration,
# rather than have it implemented on all compute nodes.
- import_tasks: nova_compute_wait.yml
delegate_to: "{{ first_conductor }}"
delegate_to: "{{ nova_conductor_setup_host }}"
when:
- "nova_services['nova-compute']['group'] in group_names"
- "nova_discover_hosts_in_cells_interval | int < 1"
vars:
first_conductor: "{{ groups[nova_services['nova-conductor']['group']][0] }}"
compute_host_to_wait_for: "{{ ansible_nodename }}"
tags:
- nova-config
@ -211,11 +210,9 @@
# the database connection string and therefore
# cannot run nova-manage.
- import_tasks: nova_db_post_setup.yml
delegate_to: "{{ first_conductor }}"
delegate_to: "{{ nova_conductor_setup_host }}"
run_once: true
when:
- "nova_services['nova-compute']['group'] in group_names"
vars:
first_conductor: "{{ groups[nova_services['nova-conductor']['group']][0] }}"
tags:
- nova-config

View File

@ -19,7 +19,7 @@
- name: Set the delegated task facts
set_fact:
_wait_nova_bin: "{{ hostvars[first_conductor]['nova_bin'] | default(nova_bin) }}"
_wait_nova_bin: "{{ hostvars[nova_conductor_setup_host]['nova_bin'] | default(nova_bin) }}"
- block:
- name: Wait for the nova-compute service to initialize

View File

@ -15,8 +15,8 @@
- name: Set the delegated task facts
set_fact:
_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) }}"
_db_nova_bin: "{{ hostvars[nova_conductor_setup_host]['nova_bin'] | default(nova_bin) }}"
_db_nova_system_user_name: "{{ hostvars[nova_conductor_setup_host]['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