From 312c3fe56f38efff5e22a653fc3a03cbf40c5af8 Mon Sep 17 00:00:00 2001 From: caoyuan Date: Sun, 19 Mar 2017 16:55:58 +0800 Subject: [PATCH] Fix the Nova SSH port prechecks missing Change-Id: Ide78ed1de89a9904db48f08fcff3c247ee650317 --- ansible/roles/nova/tasks/precheck.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/ansible/roles/nova/tasks/precheck.yml b/ansible/roles/nova/tasks/precheck.yml index 8ef66f68f1..21f4e36176 100644 --- a/ansible/roles/nova/tasks/precheck.yml +++ b/ansible/roles/nova/tasks/precheck.yml @@ -6,6 +6,7 @@ - nova_novncproxy - nova_serialproxy - nova_spicehtml5proxy + - nova_ssh - nova_libvirt - placement_api register: container_facts @@ -75,6 +76,19 @@ - nova_spicehtml5proxy.enabled | bool - inventory_hostname in groups[nova_spicehtml5proxy.group] +- name: Checking free port for Nova SSH + vars: + nova_ssh: "{{ nova_services['nova-ssh'] }}" + wait_for: + host: "{{ hostvars[inventory_hostname]['ansible_' + api_interface]['ipv4']['address'] }}" + port: "{{ nova_ssh_port }}" + connect_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 Placement API vars: placement_api: "{{ nova_services['placement-api'] }}"