nova: make libvirt port configurable and check if the port is free

Change-Id: I7dbb5a33ef78dc4ecd338ffbd59a29c0fe3be9c5
This commit is contained in:
Christian Berendt 2018-05-18 10:26:39 +02:00
parent 5c1f0226d3
commit ad9dc76112
3 changed files with 16 additions and 0 deletions

View File

@ -242,6 +242,7 @@ openstack_nova_auth: "{{ openstack_auth }}"
openstack_placement_auth: "{{ openstack_auth }}"
nova_libvirt_port: "16509"
nova_ssh_port: "8022"
####################

View File

@ -105,6 +105,20 @@
- nova_ssh.enabled | bool
- inventory_hostname in groups[nova_ssh.group]
- name: Checking free port for Nova Libvirt
vars:
nova_libvirt: "{{ nova_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 free port for Nova Placement API
vars:
placement_api: "{{ nova_services['placement-api'] }}"

View File

@ -5,3 +5,4 @@ ca_file = ""
log_level = 3
log_outputs = "3:file:/var/log/kolla/libvirt/libvirtd.log"
listen_addr = "{{ api_interface_address }}"
tcp_port = "{{ nova_libvirt_port }}"