Skip to content

Commit 55ebc64

Browse files
committed
fix(reproducer): Use controller-0's path when checking for requirements
Previously, the check for `common-requirements.txt` would check if common requirements exists on localhost at a given path. This path is based on the home directory on localhost. If the file did exist, it would use that same path to try to install the requirements on controller-0. This causes issues when localhost and controller-0 do not have the same users and home directories.
1 parent 6ed357f commit 55ebc64

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

roles/reproducer/tasks/configure_controller.yml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -365,11 +365,10 @@
365365
- cifmw_reproducer_src_dir_stat.stat.exists
366366
- cifmw_reproducer_src_dir_stat.stat.isdir
367367

368-
- name: Check if local common-requirements.txt exists
369-
delegate_to: localhost
368+
- name: Check if common-requirements.txt exists on controller-0
370369
ansible.builtin.stat:
371-
path: "{{ cifmw_reproducer_src_dir }}/github.com/openstack-k8s-operators/ci-framework/common-requirements.txt"
372-
register: _local_common_requirements_check
370+
path: "{{ cifmw_reproducer_controller0_user_dir }}/src/github.com/openstack-k8s-operators/ci-framework/common-requirements.txt"
371+
register: _controller_common_requirements_check
373372
run_once: true
374373
ignore_errors: true
375374

@@ -380,8 +379,8 @@
380379
ansible.builtin.pip:
381380
requirements: "{{ have_local | ternary(local, remote) }}"
382381
vars:
383-
have_local: "{{ _local_common_requirements_check.stat is defined and _local_common_requirements_check.stat.exists }}"
384-
local: "{{ cifmw_reproducer_src_dir }}/github.com/openstack-k8s-operators/ci-framework/common-requirements.txt"
382+
have_local: "{{ _controller_common_requirements_check.stat is defined and _controller_common_requirements_check.stat.exists }}"
383+
local: "{{ cifmw_reproducer_controller0_user_dir }}/src/github.com/openstack-k8s-operators/ci-framework/common-requirements.txt"
385384
remote: https://raw.githubusercontent.com/openstack-k8s-operators/ci-framework/main/common-requirements.txt
386385

387386
- name: Inject most of the cifmw_ parameters passed to the reproducer run

0 commit comments

Comments
 (0)