Make nova_ssh listen on api_interface as well

This is required as nova_compute tries to reach my_ip of the other
node when resizing an instance and my_ip is set to
api_interface_address.

This potential issue was introduced with [1].

[1] https://review.opendev.org/c/openstack/kolla-ansible/+/569131

Closes-Bug: #1956976
Change-Id: Id57a672c69a2d5aa74e55f252d05bb756bbc945a
This commit is contained in:
Radosław Piliszek 2022-01-10 17:10:46 +00:00
parent ae57c39085
commit 75b69ea745
3 changed files with 24 additions and 1 deletions

View File

@ -68,7 +68,21 @@
- nova_spicehtml5proxy.enabled | bool
- inventory_hostname in groups[nova_spicehtml5proxy.group]
- name: Checking free port for Nova SSH
- name: Checking free port for Nova SSH (API interface)
vars:
nova_ssh: "{{ nova_cell_services['nova-ssh'] }}"
wait_for:
host: "{{ api_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 SSH (migration interface)
vars:
nova_ssh: "{{ nova_cell_services['nova-ssh'] }}"
wait_for:
@ -78,6 +92,7 @@
timeout: 1
state: stopped
when:
- migration_interface_address != api_interface_address
- container_facts['nova_ssh'] is not defined
- nova_ssh.enabled | bool
- inventory_hostname in groups[nova_ssh.group]

View File

@ -1,5 +1,8 @@
Port {{ nova_ssh_port }}
ListenAddress {{ api_interface_address }}
{% if migration_interface_address != api_interface_address %}
ListenAddress {{ migration_interface_address }}
{% endif %}
SyslogFacility AUTHPRIV
UsePAM yes

View File

@ -0,0 +1,5 @@
---
fixes:
- |
Fixes Nova resize failing when ``migration_interface`` is customised.
`LP#1956976 <https://launchpad.net/bugs/1956976>`__