From f30f002d4b5db1cb30a0b7d669ba19e774e99e8e Mon Sep 17 00:00:00 2001 From: Chandan Kumar Date: Wed, 30 Jan 2019 13:31:39 +0530 Subject: [PATCH] Ping router once it is created Once router gets created. It is necessary to check from that router we can ping public_network or not. It helps to debug what wents wrong with in container. It should be only checked when router admin_state_up is true Change-Id: I24d1b93f88efe04dfab2b7790daa357a880e2c56 --- tasks/tempest_resources.yml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/tasks/tempest_resources.yml b/tasks/tempest_resources.yml index 2639f4c5..daf05d6d 100644 --- a/tasks/tempest_resources.yml +++ b/tasks/tempest_resources.yml @@ -236,6 +236,25 @@ when: - tempest_service_available_neutron | bool + - name: Get router admin state and ip address + set_fact: + router_admin_state: "{{ _add_router['router']['admin_state_up'] }}" + router_ip: "{{ _add_router['router']['external_gateway_info']['external_fixed_ips'][0]['ip_address'] }}" + when: + - tempest_service_available_neutron | bool + + - name: Ping router ip address + shell: | + set -e + ping -c2 "{{ router_ip }}" + register: _ping_router + until: _ping_router is success + retries: 5 + delay: 10 + when: + - tempest_service_available_neutron | bool + - router_admin_state|bool == true + - name: Create tempest flavors os_nova_flavor: cloud: "{{ tempest_cloud_name }}"