Skip to content

Commit cc8c60e

Browse files
maryamtahhanclaude
andcommitted
fix: ensure local results directories exist before rsync
Adds file module tasks to create destination directories before ansible.posix.synchronize operations to prevent rsync failures when parent directories don't exist. Fixes "No such file or directory" errors during result collection. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> Signed-off-by: Maryam Tahhan <mtahhan@redhat.com>
1 parent 0be4663 commit cc8c60e

File tree

5 files changed

+36
-0
lines changed

5 files changed

+36
-0
lines changed

automation/test-execution/ansible/collect-sweep-results.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,13 @@
3838
# from the remote load generator to the local ansible controller.
3939
# Each test run has its own directory on the remote (organized by test_run_id),
4040
# so we only sync results from this specific test run.
41+
- name: Ensure local results directory exists
42+
ansible.builtin.file:
43+
path: "{{ playbook_dir }}/../../../results/llm/{{ test_model | replace('/', '__') }}/{{ workload_type }}-{{ test_run_id }}"
44+
state: directory
45+
mode: "0755"
46+
delegate_to: localhost
47+
4148
- name: Fetch all core sweep results for this test run
4249
ansible.posix.synchronize:
4350
src: "{{ bench_config.results_dir }}/{{ test_model | replace('/', '__') }}/{{ workload_type }}-{{ test_run_id }}/"

automation/test-execution/ansible/embedding-benchmark.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,13 @@
102102
test_type: "{{ scenario | default('baseline') }}"
103103

104104
tasks:
105+
- name: Ensure local results directory exists
106+
ansible.builtin.file:
107+
path: "{{ playbook_dir }}/../../../results/embedding/{{ model_name | replace('/', '__') }}/{{ test_type }}-{{ test_run_id }}"
108+
state: directory
109+
mode: "0755"
110+
delegate_to: localhost
111+
105112
- name: Fetch results to local machine
106113
ansible.posix.synchronize:
107114
src: "{{ bench_config.results_dir }}/{{ model_name | replace('/', '__') }}/{{ test_type }}/"

automation/test-execution/ansible/llm-benchmark-auto.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -280,6 +280,14 @@
280280

281281
# Skip result fetching when running as part of a core sweep
282282
# The collect-sweep-results.yml playbook will fetch all results at once
283+
- name: Ensure local results directory exists
284+
ansible.builtin.file:
285+
path: "{{ playbook_dir }}/../../../results/llm/{{ test_model | replace('/', '__') }}/{{ workload_type }}-{{ test_run_id }}/{{ core_configuration.name }}"
286+
state: directory
287+
mode: "0755"
288+
delegate_to: localhost
289+
when: is_core_sweep is not defined or not is_core_sweep
290+
283291
- name: Fetch results to local machine
284292
ansible.posix.synchronize:
285293
src: "{{ bench_config.results_dir }}/{{ test_model | replace('/', '__') }}/{{ workload_type }}-{{ test_run_id }}/{{ core_configuration.name }}/"

automation/test-execution/ansible/llm-benchmark.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,13 @@
109109
}
110110
dest: "{{ bench_config.results_dir }}/{{ test_model | replace('/', '__') }}/{{ workload_type }}-{{ test_run_id }}/{{ core_configuration.name }}/test-metadata.json"
111111

112+
- name: Ensure local results directory exists
113+
ansible.builtin.file:
114+
path: "{{ playbook_dir }}/../../../results/llm/{{ test_model | replace('/', '__') }}/{{ workload_type }}-{{ test_run_id }}/{{ core_configuration.name }}"
115+
state: directory
116+
mode: "0755"
117+
delegate_to: localhost
118+
112119
- name: Fetch results to local machine
113120
ansible.posix.synchronize:
114121
src: "{{ bench_config.results_dir }}/{{ test_model | replace('/', '__') }}/{{ workload_type }}-{{ test_run_id }}/{{ core_configuration.name }}/"

automation/test-execution/ansible/llm-core-sweep-auto.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,13 @@
180180

181181
tasks:
182182
- block:
183+
- name: Ensure local results directory exists
184+
ansible.builtin.file:
185+
path: "{{ playbook_dir }}/../../../results/llm/{{ test_model | replace('/', '__') }}/{{ workload_type }}-{{ test_run_id }}"
186+
state: directory
187+
mode: "0755"
188+
delegate_to: localhost
189+
183190
- name: Fetch all core sweep results
184191
ansible.posix.synchronize:
185192
src: "{{ bench_config.results_dir }}/{{ test_model | replace('/', '__') }}/{{ workload_type }}/"

0 commit comments

Comments
 (0)