Skip to content

Commit 2235f7c

Browse files
committed
Fix EgressIP test playbook execution issues
- Add OCP version/network type discovery task - Fix HOME env variable access (use lookup instead of ansible_env) - Correct Go install task filename (install_go.yml) - Fix allowlist conversion (disable version-based filtering) - Add git clone force flag for idempotency Verified working on OCP 4.22.3 + OVNKubernetes. Change-Id: I562113de5fd0d1f24dcceb0d1f810eedf2fb1719
1 parent d677a2b commit 2235f7c

3 files changed

Lines changed: 13 additions & 8 deletions

File tree

collection/stages/roles/egressip_tests/tasks/prepare_private_tests.yml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
- name: Write SSH deploy key temporarily
99
ansible.builtin.copy:
1010
content: "{{ openshift_tests_private_ssh_key }}"
11-
dest: "{{ ansible_env.HOME }}/.ssh/openshift_tests_private_deploy_key"
11+
dest: "{{ lookup('env', 'HOME') }}/.ssh/openshift_tests_private_deploy_key"
1212
mode: '0600'
1313
no_log: true
1414

@@ -17,17 +17,16 @@
1717
repo: "git@github.com:openshift/openshift-tests-private.git"
1818
version: "release-{{ discovered_openshift_release }}"
1919
dest: "{{ egressip_test_dir }}"
20-
key_file: "{{ ansible_env.HOME }}/.ssh/openshift_tests_private_deploy_key"
20+
key_file: "{{ lookup('env', 'HOME') }}/.ssh/openshift_tests_private_deploy_key"
2121
accept_hostkey: yes
22+
force: yes
2223

2324
- name: Remove SSH deploy key
2425
ansible.builtin.file:
25-
path: "{{ ansible_env.HOME }}/.ssh/openshift_tests_private_deploy_key"
26+
path: "{{ lookup('env', 'HOME') }}/.ssh/openshift_tests_private_deploy_key"
2627
state: absent
2728

2829
- name: Setup Go version
2930
ansible.builtin.include_role:
3031
name: shiftstack.tools.tools_openshift_tests
31-
tasks_from: setup_go_version.yml
32-
vars:
33-
go_version_target: "{{ go_version_target }}"
32+
tasks_from: install_go.yml

collection/stages/roles/egressip_tests/tasks/run_egressip_tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@
5959
vars:
6060
input_tests_list: "{{ egressip_test_results_dir }}/allowlist.yaml"
6161
output_tests_list: "{{ allowlist_path }}"
62-
yaml_format_based_on_ocp_version: true
62+
yaml_format_based_on_ocp_version: false
6363

6464
- name: Prepare the tests list to run
6565
shiftstack.tools.filter_tests_list:

playbooks/plays/egressip_tests.yaml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,16 @@
11
---
22
- name: Run EgressIP tests on OpenShift
33
hosts: installer
4-
gather_facts: no
4+
gather_facts: yes
55
vars_files:
66
- "../../configs/global.yml"
7+
- "../../configs/secret.yaml"
78
tasks:
9+
- name: Discover OCP version and network type
10+
ansible.builtin.include_role:
11+
name: shiftstack.tools.tools_get_deploy_info
12+
tasks_from: discover_ocp_version.yml
13+
814
- name: Main block
915
block:
1016
- name: Run EgressIP tests on OpenShift

0 commit comments

Comments
 (0)