Skip to content

Commit b9cac43

Browse files
committed
fio-tets: add DECLARE_HOSTS support
Declared hosts support enables testing on bare metal servers, pre-provisioned VMs, or any pre-existing infrastructure with SSH access. The fio-tests workflow can now be used with declared hosts for both single filesystem and multi-filesystem testing scenarios. The implementation removes the KDEVOPS_USE_DECLARED_HOSTS restriction and extends the declared-hosts template to properly handle fio-tests multi-filesystem sections. Signed-off-by: Luis Chamberlain <[email protected]>
1 parent fa55f7c commit b9cac43

File tree

2 files changed

+41
-1
lines changed

2 files changed

+41
-1
lines changed

kconfigs/workflows/Kconfig

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,6 @@ config KDEVOPS_WORKFLOW_DEDICATE_MMTESTS
219219

220220
config KDEVOPS_WORKFLOW_DEDICATE_FIO_TESTS
221221
bool "fio-tests"
222-
depends on !KDEVOPS_USE_DECLARED_HOSTS
223222
select KDEVOPS_WORKFLOW_ENABLE_FIO_TESTS
224223
help
225224
This will dedicate your configuration to running only the

playbooks/roles/gen_hosts/templates/workflows/declared-hosts.j2

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,21 @@ ansible_python_interpreter = "{{ kdevops_python_interpreter }}"
7878
[fio_tests:vars]
7979
ansible_python_interpreter = "{{ kdevops_python_interpreter }}"
8080

81+
{# Add per-section groups for multi-filesystem testing #}
82+
{% if fio_tests_multi_filesystem|default(false)|bool %}
83+
{% for host in parsed_hosts %}
84+
{% set section = host | regex_replace('^.*-fio-tests-', '') | regex_replace('-dev$', '') %}
85+
{% if section != host %}
86+
[fio_tests_{{ section | replace('-', '_') }}]
87+
{{ host }}
88+
89+
[fio_tests_{{ section | replace('-', '_') }}:vars]
90+
ansible_python_interpreter = "{{ kdevops_python_interpreter }}"
91+
92+
{% endif %}
93+
{% endfor %}
94+
{% endif %}
95+
8196
{% elif kdevops_workflow_enable_fstests %}
8297
[fstests]
8398
{% for host in parsed_hosts %}
@@ -230,6 +245,32 @@ ansible_python_interpreter = "{{ kdevops_python_interpreter }}"
230245
{% endfor %}
231246
{% endif %}
232247

248+
{# For non-dedicated workflows (mix mode), add fio-tests group if enabled #}
249+
{% if kdevops_workflow_enable_fio_tests %}
250+
[fio_tests]
251+
{% for host in parsed_hosts %}
252+
{{ host }}
253+
{% endfor %}
254+
255+
[fio_tests:vars]
256+
ansible_python_interpreter = "{{ kdevops_python_interpreter }}"
257+
258+
{# Add per-section groups for multi-filesystem testing #}
259+
{% if fio_tests_multi_filesystem|default(false)|bool %}
260+
{% for host in parsed_hosts %}
261+
{% set section = host | regex_replace('^.*-fio-tests-', '') | regex_replace('-dev$', '') %}
262+
{% if section != host %}
263+
[fio_tests_{{ section | replace('-', '_') }}]
264+
{{ host }}
265+
266+
[fio_tests_{{ section | replace('-', '_') }}:vars]
267+
ansible_python_interpreter = "{{ kdevops_python_interpreter }}"
268+
269+
{% endif %}
270+
{% endfor %}
271+
{% endif %}
272+
{% endif %}
273+
233274
{% endif %}
234275

235276
[service]

0 commit comments

Comments
 (0)