From 11bc7124bda43d33bd1ce95c10ec6ed7c48270d3 Mon Sep 17 00:00:00 2001 From: Jesse Pretorius Date: Wed, 27 Feb 2019 16:14:24 +0000 Subject: [PATCH] Do ping test from tempest host and disable it by default Currently the ping test runs from the tempest_service_setup_host, which may not have the correct package installed to execute it. The ping package is installed on to the tempest host, and the requirement to do the ping test is actually to verify connectivity from the tempest host before running tempest itself. This patch changes the ping test to run from the tempest host, and because the test is primarily for gate testing, it is disabled by default. Change-Id: I3d1f9e17ef45b4427e8d3088bbcfa0c0df126c4a --- defaults/main.yml | 2 +- tasks/tempest_resources.yml | 25 ++++++++++++------------- 2 files changed, 13 insertions(+), 14 deletions(-) diff --git a/defaults/main.yml b/defaults/main.yml index 7a0cc33b..939d6305 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -164,7 +164,7 @@ tempest_compute_snapshot_enabled: True tempest_compute_change_password: False tempest_network_tenant_network_cidr: "192.168.74.0/24" tempest_network_tenant_network_mask_bits: 28 -tempest_network_ping_gateway: True +tempest_network_ping_gateway: False tempest_dashboard_url: "https://{{ external_lb_vip_address | default('127.0.0.1') }}/" diff --git a/tasks/tempest_resources.yml b/tasks/tempest_resources.yml index d099e3bf..f9d87bea 100644 --- a/tasks/tempest_resources.yml +++ b/tasks/tempest_resources.yml @@ -246,19 +246,6 @@ 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 - - tempest_network_ping_gateway | bool - - name: Create tempest flavors os_nova_flavor: cloud: "{{ tempest_cloud_name }}" @@ -292,3 +279,15 @@ set_fact: tempest_admin_tenant_id: "{{ ansible_facts.openstack_projects[0].id }}" +- 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 + - tempest_network_ping_gateway | bool