![Doug Szumski](/assets/img/avatar_default.png)
This patch adds initial support for deploying multiple Nova cells. Splitting a nova-cell role out from the Nova role allows a more granular approach to deploying and configuring Nova services. A new enable_cells flag has been added that enables the support of multiple cells via the introduction of a super conductor in addition to cell-specific conductors. When this flag is not set (the default), nova is configured in the same manner as before - with a single conductor. The nova role now deploys the global services: * nova-api * nova-scheduler * nova-super-conductor (if enable_cells is true) The nova-cell role handles services specific to a cell: * nova-compute * nova-compute-ironic * nova-conductor * nova-libvirt * nova-novncproxy * nova-serialproxy * nova-spicehtml5proxy * nova-ssh This patch does not support using a single cell controller for managing more than one cell. Support for sharing a cell controller will be added in a future patch. This patch should be backwards compatible and is tested by existing CI jobs. A new CI job has been added that tests a multi-cell environment. ceph-mon has been removed from the play hosts list as it is not necessary - delegate_to does not require the host to be in the play. Documentation will be added in a separate patch. Partially Implements: blueprint support-nova-cells Co-Authored-By: Mark Goddard <mark@stackhpc.com> Change-Id: I810aad7d49db3f5a7fd9a2f0f746fd912fe03917
103 lines
3.0 KiB
YAML
103 lines
3.0 KiB
YAML
---
|
|
- name: Get container facts
|
|
become: true
|
|
kolla_container_facts:
|
|
name:
|
|
- nova_libvirt
|
|
- nova_novncproxy
|
|
- nova_serialproxy
|
|
- nova_spicehtml5proxy
|
|
- nova_ssh
|
|
register: container_facts
|
|
|
|
- name: Checking available compute nodes in inventory
|
|
vars:
|
|
nova_compute_ironic: "{{ nova_cell_services['nova-compute-ironic'] }}"
|
|
fail:
|
|
msg: >
|
|
At least 1 compute node required in inventory when ironic is disabled.
|
|
when:
|
|
- groups[nova_cell_compute_group] | length < 1
|
|
- not nova_compute_ironic.enabled | bool
|
|
|
|
- name: Checking free port for Nova NoVNC Proxy
|
|
vars:
|
|
nova_novncproxy: "{{ nova_cell_services['nova-novncproxy'] }}"
|
|
wait_for:
|
|
host: "{{ api_interface_address }}"
|
|
port: "{{ nova_novncproxy_listen_port }}"
|
|
connect_timeout: 1
|
|
timeout: 1
|
|
state: stopped
|
|
when:
|
|
- container_facts['nova_novncproxy'] is not defined
|
|
- nova_novncproxy.enabled | bool
|
|
- inventory_hostname in groups[nova_novncproxy.group]
|
|
|
|
- name: Checking free port for Nova Serial Proxy
|
|
vars:
|
|
nova_serialproxy: "{{ nova_cell_services['nova-serialproxy'] }}"
|
|
wait_for:
|
|
host: "{{ api_interface_address }}"
|
|
port: "{{ nova_serialproxy_listen_port }}"
|
|
connect_timeout: 1
|
|
timeout: 1
|
|
state: stopped
|
|
when:
|
|
- container_facts['nova_serialproxy'] is not defined
|
|
- nova_serialproxy.enabled | bool
|
|
- inventory_hostname in groups[nova_serialproxy.group]
|
|
|
|
- name: Checking free port for Nova Spice HTML5 Proxy
|
|
vars:
|
|
nova_spicehtml5proxy: "{{ nova_cell_services['nova-spicehtml5proxy'] }}"
|
|
wait_for:
|
|
host: "{{ api_interface_address }}"
|
|
port: "{{ nova_spicehtml5proxy_listen_port }}"
|
|
connect_timeout: 1
|
|
timeout: 1
|
|
state: stopped
|
|
when:
|
|
- container_facts['nova_spicehtml5proxy'] is not defined
|
|
- nova_spicehtml5proxy.enabled | bool
|
|
- inventory_hostname in groups[nova_spicehtml5proxy.group]
|
|
|
|
- name: Checking free port for Nova SSH
|
|
vars:
|
|
nova_ssh: "{{ nova_cell_services['nova-ssh'] }}"
|
|
wait_for:
|
|
host: "{{ migration_interface_address }}"
|
|
port: "{{ nova_ssh_port }}"
|
|
connect_timeout: 1
|
|
timeout: 1
|
|
state: stopped
|
|
when:
|
|
- container_facts['nova_ssh'] is not defined
|
|
- nova_ssh.enabled | bool
|
|
- inventory_hostname in groups[nova_ssh.group]
|
|
|
|
- name: Checking free port for Nova Libvirt
|
|
vars:
|
|
nova_libvirt: "{{ nova_cell_services['nova-libvirt'] }}"
|
|
wait_for:
|
|
host: "{{ api_interface_address }}"
|
|
port: "{{ nova_libvirt_port }}"
|
|
connect_timeout: 1
|
|
timeout: 1
|
|
state: stopped
|
|
when:
|
|
- container_facts['nova_libvirt'] is not defined
|
|
- nova_libvirt.enabled | bool
|
|
- inventory_hostname in groups[nova_libvirt.group]
|
|
|
|
- name: Checking that libvirt is not running
|
|
vars:
|
|
nova_libvirt: "{{ nova_cell_services['nova-libvirt'] }}"
|
|
stat: path=/var/run/libvirt/libvirt-sock
|
|
register: result
|
|
failed_when: result.stat.exists
|
|
when:
|
|
- nova_compute_virt_type in ['kvm', 'qemu']
|
|
- container_facts['nova_libvirt'] is not defined
|
|
- inventory_hostname in groups[nova_libvirt.group]
|