From bea090a9a959a13043789be229c11076cc56d40d Mon Sep 17 00:00:00 2001 From: Fatih Degirmenci Date: Wed, 11 Apr 2018 23:32:11 +0200 Subject: Update prepare-functest role for k8s and fix fetching xci.env This change updates prepare-functest role for testing k8s scenarios using functest healthcheck. The changes include - update tasks to skip checking/creation of public gateway which is needed for OpenStack based scenarios - update run-functest.sh.j2 template and set the used docker image name based on FUNCTEST_SUITE_NAME that is going to be used - update run-functest.sh.j2 template and add commands needed to run tests using functest-kubernetes-${FUNCTEST_SUITE_NAME} docker image - update env.j2 to exclude setting the var EXTERNAL_NETWORK which is needed for OpenStack based scenarios Apart from updating the the prepare-functest role, a bug has also been fixed by adding the fetching of xci.env for installer kubespray. installer-type:kubespray deploy-scenario:k8-nosdn-nofeature Change-Id: Ia701db9748ea9509a2dc165341285fb189aa7266 Signed-off-by: Fatih Degirmenci --- xci/playbooks/roles/prepare-functest/tasks/main.yml | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) (limited to 'xci/playbooks/roles/prepare-functest/tasks') diff --git a/xci/playbooks/roles/prepare-functest/tasks/main.yml b/xci/playbooks/roles/prepare-functest/tasks/main.yml index ad578bfd..c29baca9 100644 --- a/xci/playbooks/roles/prepare-functest/tasks/main.yml +++ b/xci/playbooks/roles/prepare-functest/tasks/main.yml @@ -26,16 +26,19 @@ state: present extra_args: '-c https://raw.githubusercontent.com/openstack/requirements/{{ requirements_git_install_branch }}/upper-constraints.txt' -- name: check if the gateway was already set - shell: "ip a | grep {{ gateway_ip }}" - register: gateway_ip_result - ignore_errors: True - changed_when: False +- name: create public network gateway for functest + block: + - name: check if the gateway was already set + shell: "ip a | grep {{ gateway_ip }}" + register: gateway_ip_result + ignore_errors: True + changed_when: False -- name: add public network gateway - command: "ip addr add {{ gateway_ip_mask }} brd {{ broadcast_ip }} dev {{ gateway_interface }}" - changed_when: False - when: gateway_ip_result|failed + - name: add public network gateway + command: "ip addr add {{ gateway_ip_mask }} brd {{ broadcast_ip }} dev {{ gateway_interface }}" + changed_when: False + when: gateway_ip_result|failed + when: deploy_scenario is match("os-.*") - name: prepare environment file for functest template: -- cgit 1.2.3-korg