declared hosts support
v2 cover declared hosts support
This v2 adresses Chuck's feedback to make the include just use the workflow name. This scales better.
While at it, I decided to ensure to only enable workflows which are tested, so far that is none, so they all just need to be disabled. But I'll add one next which goes tested.
The data partition stuff is modified so to be skipped as well. We expect the user to have set that up, they can howeer specify a custom path for that. The new workflow is minio WARP testing. Since we already used minio setup via docker, we take that from the milvus ai role, and generalize it to be shared.
If folks want to try this:
https://github.com/linux-kdevops/kdevops/tree/20250830-lambda-minio
And how you can easily test this on an existing server which you already have ssh access to:
make defconfig-minio-warp-xfs DECLARE_HOSTS=foo WARP_DEVICE=/dev/nvme4n1 make
make minio
make minio-warp
See the resutls on workflows/minio/results/
That will configure the device with xfs with 4k block size. To test with 16k block size you can use:
make defconfig-minio-warp-xfs-16k DECLARE_HOSTS=foo WARP_DEVICE=/dev/nvme4n1
Luis Chamberlain (4):
gen_hosts: use kdevops_workflow_name directly for template selection
declared_hosts: add support for pre-existing infrastructure
Makefile: add missing extra_vars.yaml dependencies
minio: add MinIO Warp S3 benchmarking with declared hosts support
.gitignore | 2 + Makefile | 12 +- defconfigs/minio-warp | 52 ++ defconfigs/minio-warp-ab | 41 + defconfigs/minio-warp-btrfs | 35 + defconfigs/minio-warp-declared-hosts | 56 ++ defconfigs/minio-warp-multifs | 74 ++ defconfigs/minio-warp-storage | 65 ++ defconfigs/minio-warp-xfs | 35 + defconfigs/minio-warp-xfs-16k | 65 ++ defconfigs/minio-warp-xfs-lbs | 65 ++ defconfigs/xfs_reflink_16k_4ks_declared | 19 + kconfigs/Kconfig.bringup | 9 +- kconfigs/Kconfig.declared_hosts | 81 ++ kconfigs/workflows/Kconfig | 43 + kconfigs/workflows/Kconfig.data_partition | 11 + playbooks/minio.yml | 53 ++ playbooks/roles/ai_setup/tasks/main.yml | 40 +- .../create_data_partition/tasks/main.yml | 23 + playbooks/roles/devconfig/defaults/main.yml | 2 + playbooks/roles/devconfig/tasks/main.yml | 25 + playbooks/roles/gen_hosts/defaults/main.yml | 1 + playbooks/roles/gen_hosts/tasks/main.yml | 319 ++----- playbooks/roles/gen_hosts/templates/hosts.j2 | 242 +---- .../roles/gen_hosts/templates/workflows/ai.j2 | 99 ++ .../gen_hosts/templates/workflows/blktests.j2 | 58 ++ .../gen_hosts/templates/workflows/cxl.j2 | 7 + .../templates/workflows/declared-hosts.j2 | 239 +++++ .../templates/workflows/fio-tests.j2 | 38 + .../gen_hosts/templates/workflows/fstests.j2 | 72 ++ .../gen_hosts/templates/workflows/gitr.j2 | 41 + .../gen_hosts/templates/workflows/ltp.j2 | 41 + .../gen_hosts/templates/workflows/minio.j2 | 173 ++++ .../gen_hosts/templates/workflows/mix.j2 | 62 ++ .../gen_hosts/templates/workflows/mmtests.j2 | 77 ++ .../gen_hosts/templates/workflows/nfstest.j2 | 41 + .../gen_hosts/templates/workflows/pynfs.j2 | 7 + .../templates/workflows/reboot-limit.j2 | 33 + .../templates/workflows/selftests.j2 | 53 ++ .../gen_hosts/templates/workflows/sysbench.j2 | 53 ++ playbooks/roles/gen_nodes/defaults/main.yml | 1 + playbooks/roles/gen_nodes/tasks/main.yml | 132 ++- .../linux-mirror/python/start-mirroring.py | 4 +- playbooks/roles/minio_destroy/tasks/main.yml | 34 + playbooks/roles/minio_install/tasks/main.yml | 61 ++ playbooks/roles/minio_results/tasks/main.yml | 86 ++ playbooks/roles/minio_setup/defaults/main.yml | 16 + playbooks/roles/minio_setup/tasks/main.yml | 100 ++ .../roles/minio_uninstall/tasks/main.yml | 17 + playbooks/roles/minio_warp_run/tasks/main.yml | 249 +++++ .../templates/warp_config.json.j2 | 14 + workflows/Makefile | 4 + workflows/ai/Makefile | 3 - workflows/blktests/Makefile | 3 - workflows/cxl/Makefile | 2 - workflows/demos/reboot-limit/Kconfig | 5 + workflows/fio-tests/Makefile | 3 - workflows/fstests/Makefile | 3 - workflows/gitr/Makefile | 3 - workflows/linux/Makefile | 1 - workflows/ltp/Makefile | 3 - workflows/minio/Kconfig | 23 + workflows/minio/Kconfig.docker | 66 ++ workflows/minio/Kconfig.storage | 364 ++++++++ workflows/minio/Kconfig.warp | 141 +++ workflows/minio/Makefile | 76 ++ .../minio/scripts/analyze_warp_results.py | 858 ++++++++++++++++++ .../minio/scripts/generate_warp_report.py | 404 +++++++++ .../minio/scripts/run_benchmark_suite.sh | 116 +++ workflows/mmtests/Makefile | 3 - workflows/nfstest/Makefile | 3 - workflows/pynfs/Makefile | 3 - workflows/selftests/Makefile | 3 - workflows/sysbench/Makefile | 3 - 74 files changed, 4705 insertions(+), 566 deletions(-) create mode 100644 defconfigs/minio-warp create mode 100644 defconfigs/minio-warp-ab create mode 100644 defconfigs/minio-warp-btrfs create mode 100644 defconfigs/minio-warp-declared-hosts create mode 100644 defconfigs/minio-warp-multifs create mode 100644 defconfigs/minio-warp-storage create mode 100644 defconfigs/minio-warp-xfs create mode 100644 defconfigs/minio-warp-xfs-16k create mode 100644 defconfigs/minio-warp-xfs-lbs create mode 100644 defconfigs/xfs_reflink_16k_4ks_declared create mode 100644 kconfigs/Kconfig.declared_hosts create mode 100644 playbooks/minio.yml create mode 100644 playbooks/roles/gen_hosts/templates/workflows/ai.j2 create mode 100644 playbooks/roles/gen_hosts/templates/workflows/blktests.j2 create mode 100644 playbooks/roles/gen_hosts/templates/workflows/cxl.j2 create mode 100644 playbooks/roles/gen_hosts/templates/workflows/declared-hosts.j2 create mode 100644 playbooks/roles/gen_hosts/templates/workflows/fio-tests.j2 create mode 100644 playbooks/roles/gen_hosts/templates/workflows/fstests.j2 create mode 100644 playbooks/roles/gen_hosts/templates/workflows/gitr.j2 create mode 100644 playbooks/roles/gen_hosts/templates/workflows/ltp.j2 create mode 100644 playbooks/roles/gen_hosts/templates/workflows/minio.j2 create mode 100644 playbooks/roles/gen_hosts/templates/workflows/mix.j2 create mode 100644 playbooks/roles/gen_hosts/templates/workflows/mmtests.j2 create mode 100644 playbooks/roles/gen_hosts/templates/workflows/nfstest.j2 create mode 100644 playbooks/roles/gen_hosts/templates/workflows/pynfs.j2 create mode 100644 playbooks/roles/gen_hosts/templates/workflows/reboot-limit.j2 create mode 100644 playbooks/roles/gen_hosts/templates/workflows/selftests.j2 create mode 100644 playbooks/roles/gen_hosts/templates/workflows/sysbench.j2 create mode 100644 playbooks/roles/minio_destroy/tasks/main.yml create mode 100644 playbooks/roles/minio_install/tasks/main.yml create mode 100644 playbooks/roles/minio_results/tasks/main.yml create mode 100644 playbooks/roles/minio_setup/defaults/main.yml create mode 100644 playbooks/roles/minio_setup/tasks/main.yml create mode 100644 playbooks/roles/minio_uninstall/tasks/main.yml create mode 100644 playbooks/roles/minio_warp_run/tasks/main.yml create mode 100644 playbooks/roles/minio_warp_run/templates/warp_config.json.j2 create mode 100644 workflows/minio/Kconfig create mode 100644 workflows/minio/Kconfig.docker create mode 100644 workflows/minio/Kconfig.storage create mode 100644 workflows/minio/Kconfig.warp create mode 100644 workflows/minio/Makefile create mode 100755 workflows/minio/scripts/analyze_warp_results.py create mode 100755 workflows/minio/scripts/generate_warp_report.py create mode 100755 workflows/minio/scripts/run_benchmark_suite.sh
Signature · 1 line
2.50.1
PATCH v2 1/4 gen_hosts: use kdevops_workflow_name directly for template selection
The hosts.j2 template had become unwieldy with 40+ lines of conditional logic to select which workflow template to include. Since kdevops already defines KDEVOPS_WORKFLOW_NAME in Kconfig that's always set (either to the workflow name or "mix" for non-dedicated), we can eliminate ALL conditional logic.
The entire hosts.j2 is now just:
{% include 'workflows/' + kdevops_workflow_name + '.j2' %}
This massive simplification:
- Reduces hosts.j2 from 40+ lines to just 1 line of logic
- Removes ALL conditional template selection from gen_hosts playbook
- Eliminates ALL workflow-specific template overrides from Makefiles
- Makes adding new workflows trivial - just define KDEVOPS_WORKFLOW_NAME
Additional changes:
- Split monolithic hosts.j2 into per-workflow templates under workflows/
- Rename default.j2 to mix.j2 to match non-dedicated workflow name
- Add missing 'cxl' to KDEVOPS_WORKFLOW_NAME in main Kconfig
- Add KDEVOPS_WORKFLOW_NAME to reboot-limit demo workflow
--- kconfigs/workflows/Kconfig | 1 + playbooks/roles/gen_hosts/tasks/main.yml | 293 ++---------------- playbooks/roles/gen_hosts/templates/hosts.j2 | 240 +------------- .../roles/gen_hosts/templates/workflows/ai.j2 | 99 ++++++ .../gen_hosts/templates/workflows/blktests.j2 | 58 ++++ .../gen_hosts/templates/workflows/cxl.j2 | 7 + .../templates/workflows/fio-tests.j2 | 38 +++ .../gen_hosts/templates/workflows/fstests.j2 | 72 +++++ .../gen_hosts/templates/workflows/gitr.j2 | 41 +++ .../gen_hosts/templates/workflows/ltp.j2 | 41 +++ .../gen_hosts/templates/workflows/mix.j2 | 62 ++++ .../gen_hosts/templates/workflows/mmtests.j2 | 77 +++++ .../gen_hosts/templates/workflows/nfstest.j2 | 41 +++ .../gen_hosts/templates/workflows/pynfs.j2 | 7 + .../templates/workflows/reboot-limit.j2 | 33 ++ .../templates/workflows/selftests.j2 | 53 ++++ .../gen_hosts/templates/workflows/sysbench.j2 | 53 ++++ .../linux-mirror/python/start-mirroring.py | 4 +- workflows/ai/Makefile | 3 - workflows/blktests/Makefile | 3 - workflows/cxl/Makefile | 2 - workflows/demos/reboot-limit/Kconfig | 5 + workflows/fio-tests/Makefile | 3 - workflows/fstests/Makefile | 3 - workflows/gitr/Makefile | 3 - workflows/linux/Makefile | 1 - workflows/ltp/Makefile | 3 - workflows/mmtests/Makefile | 3 - workflows/nfstest/Makefile | 3 - workflows/pynfs/Makefile | 3 - workflows/selftests/Makefile | 3 - workflows/sysbench/Makefile | 3 - 32 files changed, 726 insertions(+), 535 deletions(-) create mode 100644 playbooks/roles/gen_hosts/templates/workflows/ai.j2 create mode 100644 playbooks/roles/gen_hosts/templates/workflows/blktests.j2 create mode 100644 playbooks/roles/gen_hosts/templates/workflows/cxl.j2 create mode 100644 playbooks/roles/gen_hosts/templates/workflows/fio-tests.j2 create mode 100644 playbooks/roles/gen_hosts/templates/workflows/fstests.j2 create mode 100644 playbooks/roles/gen_hosts/templates/workflows/gitr.j2 create mode 100644 playbooks/roles/gen_hosts/templates/workflows/ltp.j2 create mode 100644 playbooks/roles/gen_hosts/templates/workflows/mix.j2 create mode 100644 playbooks/roles/gen_hosts/templates/workflows/mmtests.j2 create mode 100644 playbooks/roles/gen_hosts/templates/workflows/nfstest.j2 create mode 100644 playbooks/roles/gen_hosts/templates/workflows/pynfs.j2 create mode 100644 playbooks/roles/gen_hosts/templates/workflows/reboot-limit.j2 create mode 100644 playbooks/roles/gen_hosts/templates/workflows/selftests.j2 create mode 100644 playbooks/roles/gen_hosts/templates/workflows/sysbench.j2
kconfigs/workflows/Kconfig +1 -0
@@ -228,6 +228,7 @@ config KDEVOPS_WORKFLOW_NAME output yaml default "fstests" if KDEVOPS_WORKFLOW_DEDICATE_FSTESTS default "blktests" if KDEVOPS_WORKFLOW_DEDICATE_BLKTESTS + default "cxl" if KDEVOPS_WORKFLOW_DEDICATE_CXL default "pynfs" if KDEVOPS_WORKFLOW_DEDICATE_PYNFS default "selftests" if KDEVOPS_WORKFLOW_DEDICATE_SELFTESTS default "gitr" if KDEVOPS_WORKFLOW_DEDICATE_GITR
playbooks/roles/gen_hosts/tasks/main.yml +34 -259
340 lines not on this page · raw message
playbooks/roles/gen_hosts/templates/hosts.j2 +1 -239
243 lines not on this page · raw message
playbooks/roles/gen_hosts/templates/workflows/ai.j2 new file +99 -0
99 lines not on this page · raw message
playbooks/roles/gen_hosts/templates/workflows/blktests.j2 new file +58 -0
58 lines not on this page · raw message
playbooks/roles/gen_hosts/templates/workflows/cxl.j2 new file +7 -0
@@ -0,0 +1,7 @@ +{# Workflow template for CXL #} +[all] +localhost ansible_connection=local +write-your-own-template-for-cxl-workflow + +[all:vars] +ansible_python_interpreter = "{{ kdevops_python_interpreter }}"
playbooks/roles/gen_hosts/templates/workflows/fio-tests.j2 new file +38 -0
@@ -0,0 +1,38 @@ +{# Workflow template for fio-tests #} +[all] +localhost ansible_connection=local +{{ kdevops_host_prefix }}-fio-tests +{% if kdevops_baseline_and_dev %} +{{ kdevops_host_prefix }}-fio-tests-dev +{% endif %} + +[all:vars] +ansible_python_interpreter = "{{ kdevops_python_interpreter }}" + +[baseline] +{{ kdevops_host_prefix }}-fio-tests + +[baseline:vars] +ansible_python_interpreter = "{{ kdevops_python_interpreter }}" + +{% if kdevops_baseline_and_dev %} +[dev] +{{ kdevops_host_prefix }}-fio-tests-dev + +[dev:vars] +ansible_python_interpreter = "{{ kdevops_python_interpreter }}" + +{% endif %} +[fio_tests] +{{ kdevops_host_prefix }}-fio-tests +{% if kdevops_baseline_and_dev %} +{{ kdevops_host_prefix }}-fio-tests-dev +{% endif %} + +[fio_tests:vars] +ansible_python_interpreter = "{{ kdevops_python_interpreter }}" + +[service] + +[service:vars] +ansible_python_interpreter = "{{ kdevops_python_interpreter }}"
playbooks/roles/gen_hosts/templates/workflows/fstests.j2 new file +72 -0
72 lines not on this page · raw message
playbooks/roles/gen_hosts/templates/workflows/gitr.j2 new file +41 -0
41 lines not on this page · raw message
playbooks/roles/gen_hosts/templates/workflows/ltp.j2 new file +41 -0
41 lines not on this page · raw message
playbooks/roles/gen_hosts/templates/workflows/mix.j2 new file +62 -0
62 lines not on this page · raw message
playbooks/roles/gen_hosts/templates/workflows/mmtests.j2 new file +77 -0
77 lines not on this page · raw message
playbooks/roles/gen_hosts/templates/workflows/nfstest.j2 new file +41 -0
41 lines not on this page · raw message
playbooks/roles/gen_hosts/templates/workflows/pynfs.j2 new file +7 -0
@@ -0,0 +1,7 @@ +{# Workflow template for pynfs #} +[all] +localhost ansible_connection=local +write-your-own-template-for-pynfs-workflow + +[all:vars] +ansible_python_interpreter = "{{ kdevops_python_interpreter }}"
playbooks/roles/gen_hosts/templates/workflows/reboot-limit.j2 new file +33 -0
@@ -0,0 +1,33 @@ +{# Workflow template for reboot-limit #} +[all] +localhost ansible_connection=local +{{ kdevops_host_prefix }}-reboot-limit +{% if kdevops_baseline_and_dev %} +{{ kdevops_host_prefix }}-reboot-limit-dev +{% endif %} + +[all:vars] +ansible_python_interpreter = "{{ kdevops_python_interpreter }}" + +[baseline] +{{ kdevops_host_prefix }}-reboot-limit + +[baseline:vars] +ansible_python_interpreter = "{{ kdevops_python_interpreter }}" + +{% if kdevops_baseline_and_dev %} +[dev] +{{ kdevops_host_prefix }}-reboot-limit-dev + +[dev:vars] +ansible_python_interpreter = "{{ kdevops_python_interpreter }}" + +{% endif %} +[reboot-limit] +{{ kdevops_host_prefix }}-reboot-limit +{% if kdevops_baseline_and_dev %} +{{ kdevops_host_prefix }}-reboot-limit-dev +{% endif %} + +[reboot-limit:vars] +ansible_python_interpreter = "{{ kdevops_python_interpreter }}"
playbooks/roles/gen_hosts/templates/workflows/selftests.j2 new file +53 -0
53 lines not on this page · raw message
playbooks/roles/gen_hosts/templates/workflows/sysbench.j2 new file +53 -0
53 lines not on this page · raw message
playbooks/roles/linux-mirror/python/start-mirroring.py +3 -1
@@ -54,7 +54,9 @@ def mirror_entry(mirror, args): cmd = cmd + reference_args mirror_target = mirror_path + target if os.path.isdir(mirror_target): - sys.stdout.write("Skipping %s - mirror already exists at %s\n" % (short_name, mirror_target)) + sys.stdout.write( + "Skipping %s - mirror already exists at %s\n" % (short_name, mirror_target) + ) return "skipped" sys.stdout.write("Mirroring: %s onto %s\n" % (short_name, mirror_target)) if args.verbose:
workflows/ai/Makefile +0 -3
@@ -3,9 +3,6 @@ PHONY += ai-setup ai-uninstall ai-destroy ai-help-menu PHONY += ai-tests ai-tests-baseline ai-tests-dev PHONY += ai-tests-results -ifeq (y,$(CONFIG_WORKFLOWS_DEDICATED_WORKFLOW)) -export KDEVOPS_HOSTS_TEMPLATE := hosts.j2 -endif export AI_DATA_TARGET := $(subst ",,$(CONFIG_AI_BENCHMARK_RESULTS_DIR)) export AI_ARGS :=
workflows/blktests/Makefile +0 -3
@@ -11,9 +11,6 @@ ID=$(shell id -u) BLKTESTS_ARGS := -ifeq (y,$(CONFIG_WORKFLOWS_DEDICATED_WORKFLOW)) -export KDEVOPS_HOSTS_TEMPLATE := blktests.j2 -endif BLKTESTS_GIT:=$(subst ",,$(CONFIG_BLKTESTS_GIT)) BLKTESTS_DATA:=$(subst ",,$(CONFIG_BLKTESTS_DATA))
workflows/cxl/Makefile +0 -2
@@ -1,7 +1,5 @@ # SPDX-License-Identifier: copyleft-next-0.3.1 -export KDEVOPS_HOSTS_TEMPLATE := cxl.j2 - CXL_ARGS := CXL_ARGS += ndctl_git='$(subst ",,$(CONFIG_NDCTL_GIT))' CXL_ARGS += ndctl_data=\"$(subst ",,$(CONFIG_NDCTL_DATA))\"
workflows/demos/reboot-limit/Kconfig +5 -0
@@ -8,6 +8,11 @@ config WORKFLOWS_REBOOT_LIMIT you really have no idea clearly if you can reboot without issues forever and may end up with a false positive on an unidentified issue. +config KDEVOPS_WORKFLOW_NAME + string + output yaml + default "reboot-limit" if WORKFLOWS_REBOOT_LIMIT + if WORKFLOWS_REBOOT_LIMIT menu "Configure and reboot-limit"
workflows/fio-tests/Makefile +0 -3
@@ -1,6 +1,3 @@ -ifeq (y,$(CONFIG_WORKFLOWS_DEDICATED_WORKFLOW)) -export KDEVOPS_HOSTS_TEMPLATE := fio-tests.j2 -endif fio-tests: $(Q)ansible-playbook $(ANSIBLE_VERBOSE) \
workflows/fstests/Makefile +0 -3
@@ -8,9 +8,6 @@ FSTESTS_BASELINE_EXTRA := export FSTYP:=$(subst ",,$(CONFIG_FSTESTS_FSTYP)) -ifeq (y,$(CONFIG_WORKFLOWS_DEDICATED_WORKFLOW)) -export KDEVOPS_HOSTS_TEMPLATE := fstests.j2 -endif FSTESTS_ARGS += fstests_fstyp='$(FSTYP)' FS_CONFIG='$(FSTYP)/$(FSTYP).config'
workflows/gitr/Makefile +0 -3
@@ -1,6 +1,3 @@ -ifeq (y,$(CONFIG_WORKFLOWS_DEDICATED_WORKFLOW)) -export KDEVOPS_HOSTS_TEMPLATE := gitr.j2 -endif GITR_MNT:=$(subst ",,$(CONFIG_GITR_MNT)) GITR_ARGS += gitr_mnt=$(GITR_MNT)
workflows/linux/Makefile +0 -1
@@ -14,7 +14,6 @@ TREE_CONFIG:=config-$(TREE_REF)-pure-iomap endif ifeq (y,$(CONFIG_BOOTLINUX_BUILDER)) -KDEVOPS_HOSTS_TEMPLATE=builder.j2 endif # Describes the Linux clone
workflows/ltp/Makefile +0 -3
@@ -1,6 +1,3 @@ -ifeq (y,$(CONFIG_WORKFLOWS_DEDICATED_WORKFLOW)) -export KDEVOPS_HOSTS_TEMPLATE := ltp.j2 -endif LTP_REPO:=$(subst ",,$(CONFIG_LTP_REPO)) LTP_ARGS += ltp_repo=$(LTP_REPO)
workflows/mmtests/Makefile +0 -3
@@ -1,8 +1,5 @@ MMTESTS_ARGS := -ifeq (y,$(CONFIG_WORKFLOWS_DEDICATED_WORKFLOW)) -export KDEVOPS_HOSTS_TEMPLATE := mmtests.j2 -endif mmtests: $(Q)ansible-playbook $(ANSIBLE_VERBOSE) \
workflows/nfstest/Makefile +0 -3
@@ -1,6 +1,3 @@ -ifeq (y,$(CONFIG_WORKFLOWS_DEDICATED_WORKFLOW)) -export KDEVOPS_HOSTS_TEMPLATE := nfstest.j2 -endif # CONFIG_WORKFLOWS_DEDICATED_WORKFLOW ifeq (y,$(CONFIG_NFSTEST_USE_KDEVOPS_NFSD)) NFSTEST_ARGS += nfstest_nfs_server_host='$(subst ",,$(CONFIG_KDEVOPS_HOSTS_PREFIX))-nfsd'
workflows/pynfs/Makefile +0 -3
@@ -1,6 +1,3 @@ -ifeq (y,$(CONFIG_WORKFLOWS_DEDICATED_WORKFLOW)) -export KDEVOPS_HOSTS_TEMPLATE := pynfs.j2 -endif PYNFS_GIT:=$(subst ",,$(CONFIG_PYNFS_GIT)) PYNFS_ARGS += pynfs_git=$(PYNFS_GIT)
workflows/selftests/Makefile +0 -3
@@ -2,9 +2,6 @@ SELFTESTS_ARGS := -ifeq (y,$(CONFIG_WORKFLOWS_DEDICATED_WORKFLOW)) -export KDEVOPS_HOSTS_TEMPLATE := selftests.j2 -endif SELFTESTS_DYNAMIC_RUNTIME_VARS := "kdevops_run_selftests": True
workflows/sysbench/Makefile +0 -3
@@ -1,8 +1,5 @@ PHONY += sysbench sysbench-test sysbench-telemetry sysbench-help-menu -ifeq (y,$(CONFIG_WORKFLOWS_DEDICATED_WORKFLOW)) -export KDEVOPS_HOSTS_TEMPLATE := sysbench.j2 -endif TAGS_SYSBENCH_RUN := db_start TAGS_SYSBENCH_RUN += db_test_connection
Signature · 1 line
2.50.1
PATCH v2 2/4 declared_hosts: add support for pre-existing infrastructure
In reply to Luis ChamberlainThis adds comprehensive support for using pre-existing infrastructure (bare metal servers, pre-provisioned VMs, cloud instances) that users already have SSH access to, bypassing the kdevops bringup process.
The declared hosts feature allows kdevops to work with systems that are already provisioned and accessible, which is essential for:
- Bare metal testing environments
- Pre-existing cloud instances
- Systems managed by other infrastructure tools
- Development environments where bringup isn't needed
Key implementation details:
1. Configuration (Kconfig):
- New KDEVOPS_USE_DECLARED_HOSTS option that can be enabled via SKIP_BRINGUP or DECLARED_HOSTS CLI variable
- KDEVOPS_DECLARED_HOSTS accepts space or comma-separated host lists
- Automatically selects WORKFLOW_INFER_USER_AND_GROUP for proper user/group detection on target systems
- Python interpreter path configuration for declared hosts
2. Template system integration:
- Seamlessly integrates with the simplified gen_hosts template system
- Uses dedicated declared-hosts.j2 template when declared hosts are enabled
- Properly handles host parsing for both string and list formats
- Maintains compatibility with A/B testing configurations
3. Data partition handling:
- Disables data partition creation for declared hosts (assumes pre-configured storage)
- Adds DATA_PATH CLI override support for custom data paths
- Ensures data directory exists with proper permissions when using declared hosts
4. Workflow restrictions:
- All workflows are restricted when using declared hosts pending individual review and testing
- Each workflow needs verification for declared hosts compatibility
- This ensures stability while the feature is gradually rolled out
5. CLI variable support:
- DECLARED_HOSTS environment variable for specifying hosts
- DATA_PATH environment variable for custom data paths
- Follows kdevops pattern of CLI overrides for configuration
The implementation maintains backward compatibility while providing a clean path for using kdevops with existing infrastructure. Future work will involve reviewing and enabling individual workflows for declared hosts support after proper testing.
Note: Currently no workflows are fully supported with declared hosts. Each workflow requires individual review and testing to ensure proper operation with pre-existing infrastructure before being enabled.
--- Makefile | 8 + defconfigs/xfs_reflink_16k_4ks_declared | 19 ++ kconfigs/Kconfig.bringup | 9 +- kconfigs/Kconfig.declared_hosts | 81 ++++++ kconfigs/workflows/Kconfig | 23 ++ kconfigs/workflows/Kconfig.data_partition | 11 + .../create_data_partition/tasks/main.yml | 23 ++ playbooks/roles/devconfig/defaults/main.yml | 2 + playbooks/roles/devconfig/tasks/main.yml | 25 ++ playbooks/roles/gen_hosts/defaults/main.yml | 1 + playbooks/roles/gen_hosts/tasks/main.yml | 17 ++ playbooks/roles/gen_hosts/templates/hosts.j2 | 6 + .../templates/workflows/declared-hosts.j2 | 239 ++++++++++++++++++ playbooks/roles/gen_nodes/defaults/main.yml | 1 + playbooks/roles/gen_nodes/tasks/main.yml | 4 +- 15 files changed, 467 insertions(+), 2 deletions(-) create mode 100644 defconfigs/xfs_reflink_16k_4ks_declared create mode 100644 kconfigs/Kconfig.declared_hosts create mode 100644 playbooks/roles/gen_hosts/templates/workflows/declared-hosts.j2
Makefile +8 -0
@@ -19,6 +19,14 @@ export KDEVOPS_NODES := export PYTHONUNBUFFERED=1 export TOPDIR=./ export TOPDIR_PATH = $(shell readlink -f $(TOPDIR)) + +# Export CLI override variables for Kconfig to detect them +# Note: We accept DECLARE_HOSTS but export as DECLARED_HOSTS for consistency +ifdef DECLARE_HOSTS +export DECLARED_HOSTS := $(DECLARE_HOSTS) +endif +export DATA_PATH + include scripts/refs.Makefile KDEVOPS_NODES_ROLE_TEMPLATE_DIR := $(KDEVOPS_PLAYBOOKS_DIR)/roles/gen_nodes/templates
defconfigs/xfs_reflink_16k_4ks_declared new file +19 -0
@@ -0,0 +1,19 @@ +CONFIG_WORKFLOWS=y +CONFIG_WORKFLOW_LINUX_CUSTOM=y + +CONFIG_BOOTLINUX=y +CONFIG_BOOTLINUX_9P=y + +CONFIG_WORKFLOWS_TESTS=y +CONFIG_WORKFLOWS_LINUX_TESTS=y +CONFIG_WORKFLOWS_DEDICATED_WORKFLOW=n +CONFIG_KDEVOPS_WORKFLOW_NOT_DEDICATED_ENABLE_FSTESTS=y + +CONFIG_FSTESTS_XFS=y +CONFIG_FSTESTS_FSTYP="xfs" +CONFIG_FSTESTS_XFS_MANUAL_COVERAGE=y +CONFIG_FSTESTS_XFS_ENABLE_LBS=y +CONFIG_FSTESTS_XFS_ENABLE_LBS_4KS=y +CONFIG_FSTESTS_XFS_SECTION_REFLINK_ENABLED=y + +CONFIG_FSTESTS_XFS_SECTION_REFLINK_16K_4KS=y
kconfigs/Kconfig.bringup +8 -1
@@ -13,10 +13,16 @@ config CLOUD_INITIALIZED bool default $(shell, test -f .cloud.initialized && echo y || echo n) = "y" +# CLI override detection for DECLARED_HOSTS which should enable SKIP_BRINGUP +config SKIP_BRINGUP_SET_BY_CLI + bool + default $(shell, scripts/check-cli-set-var.sh DECLARED_HOSTS) + select SKIP_BRINGUP + choice prompt "Node bring up method" default TERRAFORM if CLOUD_INITIALIZED - default GUESTFS + default GUESTFS if !CLOUD_INITIALIZED config GUESTFS bool "Use guestfs-tools for local virtualization via KVM and libvirt"
@@ -85,6 +91,7 @@ config LIBVIRT source "kconfigs/Kconfig.guestfs" source "kconfigs/Kconfig.nixos" source "terraform/Kconfig" +source "kconfigs/Kconfig.declared_hosts" if LIBVIRT source "kconfigs/Kconfig.libvirt" endif
kconfigs/Kconfig.declared_hosts new file +81 -0
81 lines not on this page · raw message
kconfigs/workflows/Kconfig +23 -0
@@ -124,6 +124,7 @@ choice config KDEVOPS_WORKFLOW_DEDICATE_FSTESTS bool "fstests" select KDEVOPS_WORKFLOW_ENABLE_FSTESTS + depends on !KDEVOPS_USE_DECLARED_HOSTS help This will dedicate your configuration only to fstests.
@@ -139,12 +140,14 @@ config KDEVOPS_WORKFLOW_DEDICATE_FSTESTS config KDEVOPS_WORKFLOW_DEDICATE_BLKTESTS bool "blktests" + depends on !KDEVOPS_USE_DECLARED_HOSTS select KDEVOPS_WORKFLOW_ENABLE_BLKTESTS help This will dedicate your configuration only to blktests. config KDEVOPS_WORKFLOW_DEDICATE_CXL bool "cxl" + depends on !KDEVOPS_USE_DECLARED_HOSTS select KDEVOPS_WORKFLOW_ENABLE_CXL help This will dedicate your configuration only to cxl work.
@@ -159,6 +162,7 @@ config KDEVOPS_WORKFLOW_DEDICATE_CXL config KDEVOPS_WORKFLOW_DEDICATE_PYNFS bool "pynfs" + depends on !KDEVOPS_USE_DECLARED_HOSTS select KDEVOPS_WORKFLOW_ENABLE_PYNFS help This will dedicate your configuration only to running pynfs
@@ -166,6 +170,7 @@ config KDEVOPS_WORKFLOW_DEDICATE_PYNFS config KDEVOPS_WORKFLOW_DEDICATE_SELFTESTS bool "Linux kernel selftests" + depends on !KDEVOPS_USE_DECLARED_HOSTS select KDEVOPS_WORKFLOW_ENABLE_SELFTESTS help This will dedicate your configuration only to Linux kernel
@@ -174,6 +179,7 @@ config KDEVOPS_WORKFLOW_DEDICATE_SELFTESTS config KDEVOPS_WORKFLOW_DEDICATE_GITR bool "gitr" + depends on !KDEVOPS_USE_DECLARED_HOSTS select KDEVOPS_WORKFLOW_ENABLE_GITR help This will dedicate your configuration to running only the
@@ -181,6 +187,7 @@ config KDEVOPS_WORKFLOW_DEDICATE_GITR config KDEVOPS_WORKFLOW_DEDICATE_LTP bool "ltp" + depends on !KDEVOPS_USE_DECLARED_HOSTS select KDEVOPS_WORKFLOW_ENABLE_LTP help This will dedicate your configuration to running only the
@@ -188,6 +195,7 @@ config KDEVOPS_WORKFLOW_DEDICATE_LTP config KDEVOPS_WORKFLOW_DEDICATE_NFSTEST bool "nfstest" + depends on !KDEVOPS_USE_DECLARED_HOSTS select KDEVOPS_WORKFLOW_ENABLE_NFSTEST help This will dedicate your configuration to running only the
@@ -195,6 +203,7 @@ config KDEVOPS_WORKFLOW_DEDICATE_NFSTEST config KDEVOPS_WORKFLOW_DEDICATE_SYSBENCH bool "sysbench" + depends on !KDEVOPS_USE_DECLARED_HOSTS select KDEVOPS_WORKFLOW_ENABLE_SYSBENCH help This will dedicate your configuration to running only the
@@ -202,6 +211,7 @@ config KDEVOPS_WORKFLOW_DEDICATE_SYSBENCH config KDEVOPS_WORKFLOW_DEDICATE_MMTESTS bool "mmtests" + depends on !KDEVOPS_USE_DECLARED_HOSTS select KDEVOPS_WORKFLOW_ENABLE_MMTESTS help This will dedicate your configuration to running only the
@@ -209,6 +219,7 @@ config KDEVOPS_WORKFLOW_DEDICATE_MMTESTS config KDEVOPS_WORKFLOW_DEDICATE_FIO_TESTS bool "fio-tests" + depends on !KDEVOPS_USE_DECLARED_HOSTS select KDEVOPS_WORKFLOW_ENABLE_FIO_TESTS help This will dedicate your configuration to running only the
@@ -216,6 +227,7 @@ config KDEVOPS_WORKFLOW_DEDICATE_FIO_TESTS config KDEVOPS_WORKFLOW_DEDICATE_AI bool "ai" + depends on !KDEVOPS_USE_DECLARED_HOSTS select KDEVOPS_WORKFLOW_ENABLE_AI help This will dedicate your configuration to running only the
@@ -264,6 +276,7 @@ config KDEVOPS_WORKFLOW_NOT_DEDICATED_ENABLE_FSTESTS config KDEVOPS_WORKFLOW_NOT_DEDICATED_ENABLE_BLKTESTS bool "blktests" + depends on !KDEVOPS_USE_DECLARED_HOSTS select KDEVOPS_WORKFLOW_ENABLE_BLKTESTS help Select this option if you are doing block layer development and want
@@ -272,6 +285,7 @@ config KDEVOPS_WORKFLOW_NOT_DEDICATED_ENABLE_BLKTESTS config KDEVOPS_WORKFLOW_NOT_DEDICATED_ENABLE_CXL bool "cxl" + depends on !KDEVOPS_USE_DECLARED_HOSTS select KDEVOPS_WORKFLOW_ENABLE_CXL help Select this option if you are doing cxl development and testing.
@@ -285,6 +299,7 @@ config KDEVOPS_WORKFLOW_NOT_DEDICATED_ENABLE_CXL config KDEVOPS_WORKFLOW_NOT_DEDICATED_ENABLE_PYNFS bool "pynfs" + depends on !KDEVOPS_USE_DECLARED_HOSTS select KDEVOPS_WORKFLOW_ENABLE_PYNFS depends on LIBVIRT || TERRAFORM_PRIVATE_NET help
@@ -294,6 +309,7 @@ config KDEVOPS_WORKFLOW_NOT_DEDICATED_ENABLE_PYNFS config KDEVOPS_WORKFLOW_NOT_DEDICATED_ENABLE_SELFTESTS bool "Linux kernel selftest" + depends on !KDEVOPS_USE_DECLARED_HOSTS select KDEVOPS_WORKFLOW_ENABLE_SELFTESTS help Select this option if you are doing Linux kernel developent and
@@ -301,6 +317,7 @@ config KDEVOPS_WORKFLOW_NOT_DEDICATED_ENABLE_SELFTESTS config KDEVOPS_WORKFLOW_NOT_DEDICATED_ENABLE_GITR bool "gitr" + depends on !KDEVOPS_USE_DECLARED_HOSTS select KDEVOPS_WORKFLOW_ENABLE_GITR depends on LIBVIRT || TERRAFORM_PRIVATE_NET help
@@ -309,6 +326,7 @@ config KDEVOPS_WORKFLOW_NOT_DEDICATED_ENABLE_GITR config KDEVOPS_WORKFLOW_NOT_DEDICATED_ENABLE_LTP bool "ltp" + depends on !KDEVOPS_USE_DECLARED_HOSTS select KDEVOPS_WORKFLOW_ENABLE_LTP depends on LIBVIRT || TERRAFORM_PRIVATE_NET help
@@ -317,6 +335,7 @@ config KDEVOPS_WORKFLOW_NOT_DEDICATED_ENABLE_LTP config KDEVOPS_WORKFLOW_NOT_DEDICATED_ENABLE_NFSTEST bool "nfstest" + depends on !KDEVOPS_USE_DECLARED_HOSTS select KDEVOPS_WORKFLOW_ENABLE_NFSTEST depends on LIBVIRT || TERRAFORM_PRIVATE_NET help
@@ -325,6 +344,7 @@ config KDEVOPS_WORKFLOW_NOT_DEDICATED_ENABLE_NFSTEST config KDEVOPS_WORKFLOW_NOT_DEDICATED_ENABLE_SYSBENCH bool "sysbench" + depends on !KDEVOPS_USE_DECLARED_HOSTS select KDEVOPS_WORKFLOW_ENABLE_SYSBENCH depends on LIBVIRT || TERRAFORM_PRIVATE_NET help
@@ -333,6 +353,7 @@ config KDEVOPS_WORKFLOW_NOT_DEDICATED_ENABLE_SYSBENCH config KDEVOPS_WORKFLOW_NOT_DEDICATED_ENABLE_MMTESTS bool "mmtests" + depends on !KDEVOPS_USE_DECLARED_HOSTS select KDEVOPS_WORKFLOW_ENABLE_MMTESTS depends on LIBVIRT || TERRAFORM_PRIVATE_NET help
@@ -341,6 +362,7 @@ config KDEVOPS_WORKFLOW_NOT_DEDICATED_ENABLE_MMTESTS config KDEVOPS_WORKFLOW_NOT_DEDICATED_ENABLE_FIO_TESTS bool "fio-tests" + depends on !KDEVOPS_USE_DECLARED_HOSTS select KDEVOPS_WORKFLOW_ENABLE_FIO_TESTS depends on LIBVIRT || TERRAFORM_PRIVATE_NET help
@@ -349,6 +371,7 @@ config KDEVOPS_WORKFLOW_NOT_DEDICATED_ENABLE_FIO_TESTS config KDEVOPS_WORKFLOW_NOT_DEDICATED_ENABLE_AI bool "ai" + depends on !KDEVOPS_USE_DECLARED_HOSTS select KDEVOPS_WORKFLOW_ENABLE_AI depends on LIBVIRT || TERRAFORM_PRIVATE_NET help
kconfigs/workflows/Kconfig.data_partition +11 -0
@@ -1,5 +1,10 @@ +config WORKFLOW_DATA_PATH_SET_BY_CLI + bool + default $(shell, scripts/check-cli-set-var.sh DATA_PATH) + config WORKFLOW_DATA_DEVICE_ENABLE_CUSTOM bool "Enable custom device to use to create the workflow data parition" + depends on !KDEVOPS_USE_DECLARED_HOSTS help Enable this if you want to override the default data device. Typically we have enough heuristics with kconfig to get this right
@@ -29,6 +34,7 @@ config WORKFLOW_DATA_DEVICE_CUSTOM config WORKFLOW_DATA_DEVICE string + depends on !KDEVOPS_USE_DECLARED_HOSTS default "/dev/disk/by-id/nvme-QEMU_NVMe_Ctrl_kdevops0" if LIBVIRT && LIBVIRT_EXTRA_STORAGE_DRIVE_NVME default "/dev/disk/by-id/virtio-kdevops0" if LIBVIRT && LIBVIRT_EXTRA_STORAGE_DRIVE_VIRTIO default "/dev/disk/by-id/ata-QEMU_HARDDISK_kdevops0" if LIBVIRT && LIBVIRT_EXTRA_STORAGE_DRIVE_IDE
@@ -37,9 +43,11 @@ config WORKFLOW_DATA_DEVICE default TERRAFORM_AWS_DATA_VOLUME_DEVICE_FILE_NAME if TERRAFORM_AWS default TERRAFORM_OCI_DATA_VOLUME_DEVICE_FILE_NAME if TERRAFORM_OCI default WORKFLOW_DATA_DEVICE_CUSTOM if WORKFLOW_DATA_DEVICE_ENABLE_CUSTOM + default "" if KDEVOPS_USE_DECLARED_HOSTS config WORKFLOW_DATA_PATH string "Directory path to place data for workflows" + default "$(shell, echo ${DATA_PATH})" if WORKFLOW_DATA_PATH_SET_BY_CLI default "/data" help The data workflow is kept then in a location other than your default
@@ -47,6 +55,9 @@ config WORKFLOW_DATA_PATH will use to place your workflow data. This will be the mount point for the new worfklow data partition created. + When using declared hosts, this path should already exist on the + target systems. + config WORKFLOW_INFER_USER_AND_GROUP bool "Infer user and group to use for the workflow data partition" default y
playbooks/roles/create_data_partition/tasks/main.yml +23 -0
@@ -1,15 +1,23 @@ --- +- name: Skip data partition creation for declared hosts + ansible.builtin.debug: + msg: "Skipping data partition creation - using declared hosts with pre-existing infrastructure" + when: + - kdevops_use_declared_hosts|default(false)|bool + - name: Include common role ansible.builtin.include_role: name: common when: - infer_uid_and_group|bool + - not kdevops_use_declared_hosts|default(false)|bool - name: Establish the fixed device name of the data device tags: ["data_partition"] when: - kdevops_enable_terraform|bool - kdevops_terraform_provider == "aws" + - not kdevops_use_declared_hosts|default(false)|bool block: - name: Retrieve the block_device_map from terraform delegate_to: localhost
@@ -52,3 +60,18 @@ disk_setup_user: "{{ data_user }}" disk_setup_group: "{{ data_group }}" tags: ["data_partition"] + when: + - not kdevops_use_declared_hosts|default(false)|bool + +- name: Ensure data path exists and has correct permissions for declared hosts + ansible.builtin.file: + path: "{{ data_path }}" + state: directory + owner: "{{ data_user }}" + group: "{{ data_group }}" + mode: "0755" + become: true + become_method: sudo + when: + - kdevops_use_declared_hosts|default(false)|bool + tags: ["data_partition"]
playbooks/roles/devconfig/defaults/main.yml +2 -0
@@ -57,3 +57,5 @@ kdevops_enable_guestfs: false guestfs_copy_sources_from_host_to_guest: false distro_debian_has_hop1_sources: false unattended_upgrades_installed: false +workflow_infer_user_and_group: false +kdevops_use_declared_hosts: false
playbooks/roles/devconfig/tasks/main.yml +25 -0
@@ -17,6 +17,31 @@ ansible.builtin.setup: tags: always +# For declared hosts, infer user and group from the target systems +- name: Infer user on declared hosts + ansible.builtin.command: "whoami" + register: declared_host_user + when: + - kdevops_use_declared_hosts + - workflow_infer_user_and_group + changed_when: false + +- name: Infer group on declared hosts + ansible.builtin.command: "id -g -n" + register: declared_host_group + when: + - kdevops_use_declared_hosts + - workflow_infer_user_and_group + changed_when: false + +- name: Set inferred user and group for declared hosts + set_fact: + data_user: "{{ declared_host_user.stdout | default(data_user) }}" + data_group: "{{ declared_host_group.stdout | default(data_group) }}" + when: + - kdevops_use_declared_hosts + - workflow_infer_user_and_group + # Update /etc/hostname first so the change gets picked up by the reboot # that occurs during the distro-specific tasks
playbooks/roles/gen_hosts/defaults/main.yml +1 -0
@@ -31,6 +31,7 @@ kdevops_workflow_enable_fio_tests: false kdevops_workflow_enable_mmtests: false kdevops_workflow_enable_ai: false workflows_reboot_limit: false +kdevops_use_declared_hosts: false is_fstests: false fstests_fstyp: "bogus"
playbooks/roles/gen_hosts/tasks/main.yml +17 -0
@@ -10,6 +10,19 @@ skip: true tags: vars +- name: Parse declared hosts list when using declared hosts + set_fact: + kdevops_declared_hosts: >- + {%- if kdevops_declared_hosts is string -%} + {{ (kdevops_declared_hosts | default('')) | regex_replace(',', ' ') | split() }} + {%- else -%} + {{ kdevops_declared_hosts }} + {%- endif -%} + when: + - kdevops_use_declared_hosts + - kdevops_declared_hosts is defined + tags: vars + - name: Get our user ansible.builtin.command: "whoami" register: my_user
@@ -75,6 +88,7 @@ when: - is_fstests - ansible_hosts_template.stat.exists + - not kdevops_use_declared_hosts - name: Infer enabled blktests test section types ansible.builtin.set_fact:
@@ -89,6 +103,7 @@ - kdevops_workflows_dedicated_workflow - kdevops_workflow_enable_blktests - ansible_hosts_template.stat.exists + - not kdevops_use_declared_hosts - name: Debug inferring block test types ansible.builtin.debug:
@@ -112,6 +127,7 @@ - kdevops_workflows_dedicated_workflow - kdevops_workflow_enable_selftests - ansible_hosts_template.stat.exists + - not kdevops_use_declared_hosts - name: Collect dynamically supported filesystems vars:
@@ -155,6 +171,7 @@ - kdevops_workflows_dedicated_workflow - kdevops_workflow_enable_mmtests - ansible_hosts_template.stat.exists + - not kdevops_use_declared_hosts - name: Load AI nodes configuration for multi-filesystem setup include_vars:
playbooks/roles/gen_hosts/templates/hosts.j2 +6 -0
@@ -5,4 +5,10 @@ proper identation. We don't need identation for the ansible hosts file. Each workflow which has its own custom ansible host file generated should use its own jinja2 template file and define its own ansible task for its generation. #} +{% if kdevops_declared_hosts is defined and kdevops_declared_hosts %} +{# Use declared hosts that skip bringup process - for bare metal or pre-existing infrastructure #} +{% include 'workflows/declared-hosts.j2' %} +{% else %} +{# Include workflow-specific template dynamically based on workflow name #} {% include 'workflows/' + kdevops_workflow_name + '.j2' %} +{% endif %}
playbooks/roles/gen_hosts/templates/workflows/declared-hosts.j2 new file +239 -0
240 lines not on this page · raw message
playbooks/roles/gen_nodes/defaults/main.yml +1 -0
@@ -18,6 +18,7 @@ kdevops_smbd_enable: false kdevops_krb5_enable: false kdevops_enable_iscsi: false workflows_reboot_limit: false +kdevops_use_declared_hosts: false virtualbox_provider: false libvirt_provider: false
playbooks/roles/gen_nodes/tasks/main.yml +3 -1
@@ -25,7 +25,9 @@ path: "{{ guestfs_path }}" state: directory mode: "0755" - when: kdevops_enable_guestfs|bool + when: + - kdevops_enable_guestfs|bool + - not kdevops_use_declared_hosts - name: Create nixos directory ansible.builtin.file:
Signature · 1 line
2.50.1
PATCH v2 3/4 Makefile: add missing extra_vars.yaml dependencies
In reply to Luis ChamberlainThe ANSIBLE_INVENTORY_FILE and KDEVOPS_NODES targets both use '--extra-vars=@./extra_vars.yaml' in their ansible-playbook commands but didn't declare extra_vars.yaml as a dependency. This caused build failures when running targets like 'make minio' from a clean state.
The missing dependency meant that ansible-playbook would fail with:
'No such file or directory: /data/minio/kdevops/extra_vars.yaml'
This fix ensures that extra_vars.yaml is properly generated before any ansible-playbook commands that require it are executed.
--- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
Makefile +2 -2
@@ -234,14 +234,14 @@ include scripts/bringup.Makefile endif DEFAULT_DEPS += $(ANSIBLE_INVENTORY_FILE) -$(ANSIBLE_INVENTORY_FILE): .config $(ANSIBLE_CFG_FILE) $(KDEVOPS_HOSTS_TEMPLATE) $(KDEVOPS_NODES) +$(ANSIBLE_INVENTORY_FILE): .config $(ANSIBLE_CFG_FILE) $(KDEVOPS_HOSTS_TEMPLATE) $(KDEVOPS_NODES) $(KDEVOPS_EXTRA_VARS) $(Q)ANSIBLE_LOCALHOST_WARNING=False ANSIBLE_INVENTORY_UNPARSED_WARNING=False \ ansible-playbook $(ANSIBLE_VERBOSE) \ $(KDEVOPS_PLAYBOOKS_DIR)/gen_hosts.yml \ --extra-vars=@./extra_vars.yaml DEFAULT_DEPS += $(KDEVOPS_NODES) -$(KDEVOPS_NODES): .config $(ANSIBLE_CFG_FILE) $(KDEVOPS_NODES_TEMPLATE) +$(KDEVOPS_NODES): .config $(ANSIBLE_CFG_FILE) $(KDEVOPS_NODES_TEMPLATE) $(KDEVOPS_EXTRA_VARS) $(Q)ANSIBLE_LOCALHOST_WARNING=False ANSIBLE_INVENTORY_UNPARSED_WARNING=False \ ansible-playbook $(ANSIBLE_VERBOSE) --connection=local \ --inventory localhost, \
Signature · 1 line
2.50.1
PATCH v2 4/4 minio: add MinIO Warp S3 benchmarking with declared hosts support
In reply to Luis ChamberlainAdd MinIO Warp S3 benchmarking workflow with support for declared hosts (pre-existing infrastructure) and fix critical issues in template generation and benchmark execution.
MinIO Warp Workflow:
- Add MinIO server deployment via Docker containers
- Implement Warp S3 benchmark suite with configurable parameters
- Support both single and comprehensive benchmark modes
- Add storage configuration for XFS/Btrfs/ext4 filesystems
- Include benchmark result analysis and visualization tools
- Fix benchmark duration handling (was terminating after 45s due to --autoterm flag with --objects parameter)
- Fix async timeout calculation for long-running benchmarks
- Add proper help targets to Makefile
Declared Hosts Support:
- Enable using pre-existing infrastructure (bare metal, cloud VMs)
- Skip bringup/teardown for systems with existing SSH access
- Add DECLARED_HOSTS and DATA_PATH CLI variable overrides
- Disable data partition creation when using declared hosts
- Restrict unreviewed workflows pending compatibility testing
- Auto-infer user/group settings on target systems
Template System Improvements:
- Simplify gen_hosts template selection using kdevops_workflow_name
- Reduce 40+ lines of conditionals to single dynamic inclusion
- Fix fstests host generation regression (was generating 251 hosts)
- Add workflow-specific template structure under workflows/*/
Build System Fixes:
- Add missing extra_vars.yaml dependencies to prevent build failures
- Fix Kconfig yaml output for minio_warp_run_comprehensive_suite
- Ensure proper task ordering in Ansible playbooks
- Fix Jinja2 syntax errors in benchmark scripts
The workflow now properly runs for configured durations (e.g., 30m) and supports both dedicated test infrastructure and pre-existing systems via declared hosts.
--- .gitignore | 2 + defconfigs/minio-warp | 52 ++ defconfigs/minio-warp-ab | 41 + defconfigs/minio-warp-btrfs | 35 + defconfigs/minio-warp-declared-hosts | 56 ++ defconfigs/minio-warp-multifs | 74 ++ defconfigs/minio-warp-storage | 65 ++ defconfigs/minio-warp-xfs | 35 + defconfigs/minio-warp-xfs-16k | 65 ++ defconfigs/minio-warp-xfs-lbs | 65 ++ kconfigs/workflows/Kconfig | 19 + playbooks/minio.yml | 53 ++ playbooks/roles/ai_setup/tasks/main.yml | 40 +- playbooks/roles/gen_hosts/tasks/main.yml | 19 +- .../gen_hosts/templates/workflows/minio.j2 | 173 ++++ playbooks/roles/gen_nodes/tasks/main.yml | 128 ++- playbooks/roles/minio_destroy/tasks/main.yml | 34 + playbooks/roles/minio_install/tasks/main.yml | 61 ++ playbooks/roles/minio_results/tasks/main.yml | 86 ++ playbooks/roles/minio_setup/defaults/main.yml | 16 + playbooks/roles/minio_setup/tasks/main.yml | 100 ++ .../roles/minio_uninstall/tasks/main.yml | 17 + playbooks/roles/minio_warp_run/tasks/main.yml | 249 +++++ .../templates/warp_config.json.j2 | 14 + workflows/Makefile | 4 + workflows/minio/Kconfig | 23 + workflows/minio/Kconfig.docker | 66 ++ workflows/minio/Kconfig.storage | 364 ++++++++ workflows/minio/Kconfig.warp | 141 +++ workflows/minio/Makefile | 76 ++ .../minio/scripts/analyze_warp_results.py | 858 ++++++++++++++++++ .../minio/scripts/generate_warp_report.py | 404 +++++++++ .../minio/scripts/run_benchmark_suite.sh | 116 +++ 33 files changed, 3517 insertions(+), 34 deletions(-) create mode 100644 defconfigs/minio-warp create mode 100644 defconfigs/minio-warp-ab create mode 100644 defconfigs/minio-warp-btrfs create mode 100644 defconfigs/minio-warp-declared-hosts create mode 100644 defconfigs/minio-warp-multifs create mode 100644 defconfigs/minio-warp-storage create mode 100644 defconfigs/minio-warp-xfs create mode 100644 defconfigs/minio-warp-xfs-16k create mode 100644 defconfigs/minio-warp-xfs-lbs create mode 100644 playbooks/minio.yml create mode 100644 playbooks/roles/gen_hosts/templates/workflows/minio.j2 create mode 100644 playbooks/roles/minio_destroy/tasks/main.yml create mode 100644 playbooks/roles/minio_install/tasks/main.yml create mode 100644 playbooks/roles/minio_results/tasks/main.yml create mode 100644 playbooks/roles/minio_setup/defaults/main.yml create mode 100644 playbooks/roles/minio_setup/tasks/main.yml create mode 100644 playbooks/roles/minio_uninstall/tasks/main.yml create mode 100644 playbooks/roles/minio_warp_run/tasks/main.yml create mode 100644 playbooks/roles/minio_warp_run/templates/warp_config.json.j2 create mode 100644 workflows/minio/Kconfig create mode 100644 workflows/minio/Kconfig.docker create mode 100644 workflows/minio/Kconfig.storage create mode 100644 workflows/minio/Kconfig.warp create mode 100644 workflows/minio/Makefile create mode 100755 workflows/minio/scripts/analyze_warp_results.py create mode 100755 workflows/minio/scripts/generate_warp_report.py create mode 100755 workflows/minio/scripts/run_benchmark_suite.sh
.gitignore +2 -0
@@ -89,6 +89,8 @@ playbooks/roles/linux-mirror/linux-mirror-systemd/mirrors.yaml # yet. workflows/selftests/results/ +workflows/minio/results/ + workflows/linux/refs/default/Kconfig.linus workflows/linux/refs/default/Kconfig.next workflows/linux/refs/default/Kconfig.stable
defconfigs/minio-warp new file +52 -0
53 lines not on this page · raw message
defconfigs/minio-warp-ab new file +41 -0
42 lines not on this page · raw message
defconfigs/minio-warp-btrfs new file +35 -0
@@ -0,0 +1,35 @@ +CONFIG_WORKFLOWS=y +CONFIG_WORKFLOWS_DEDICATED_WORKFLOW=y +CONFIG_KDEVOPS_WORKFLOW_ENABLE_MINIO=y +CONFIG_KDEVOPS_WORKFLOW_ENABLE_MINIO_WARP=y + +# MinIO Configuration for Btrfs testing +CONFIG_MINIO_ENABLE=y +CONFIG_MINIO_CONTAINER_IMAGE="minio/minio:latest" +CONFIG_MINIO_CONTAINER_NAME="minio-server" +CONFIG_MINIO_API_PORT=9000 +CONFIG_MINIO_CONSOLE_PORT=9001 +CONFIG_MINIO_ACCESS_KEY="minioadmin" +CONFIG_MINIO_SECRET_KEY="minioadmin" + +# Configure Btrfs filesystem for MinIO storage +CONFIG_MINIO_USE_CUSTOM_FILESYSTEM=y +CONFIG_MINIO_STORAGE_DEVICE="/dev/nvme0n1" +CONFIG_MINIO_STORAGE_FSTYPE="btrfs" +CONFIG_MINIO_STORAGE_FS_OPTS="--nodesize 16k" +CONFIG_MINIO_STORAGE_LABEL="minio-btrfs" +CONFIG_MINIO_DATA_PATH="/data/minio" + +CONFIG_MINIO_MEMORY_LIMIT="4g" +CONFIG_MINIO_DOCKER_NETWORK_NAME="minio-network" + +# Comprehensive benchmark suite +CONFIG_MINIO_WARP_RUN_COMPREHENSIVE_SUITE=y +CONFIG_MINIO_WARP_DURATION="2m" +CONFIG_MINIO_WARP_CONCURRENT_REQUESTS=20 +CONFIG_MINIO_WARP_OBJECT_SIZE="10MB" +CONFIG_MINIO_WARP_OBJECTS_PER_REQUEST=100 +CONFIG_MINIO_WARP_BUCKET_NAME="warp-benchmark-bucket" +CONFIG_MINIO_WARP_AUTO_TERMINATE=y +CONFIG_MINIO_WARP_ENABLE_CLEANUP=n +CONFIG_MINIO_WARP_OUTPUT_FORMAT="json"
defconfigs/minio-warp-declared-hosts new file +56 -0
57 lines not on this page · raw message
defconfigs/minio-warp-multifs new file +74 -0
74 lines not on this page · raw message
defconfigs/minio-warp-storage new file +65 -0
66 lines not on this page · raw message
defconfigs/minio-warp-xfs new file +35 -0
@@ -0,0 +1,35 @@ +CONFIG_WORKFLOWS=y +CONFIG_WORKFLOWS_DEDICATED_WORKFLOW=y +CONFIG_KDEVOPS_WORKFLOW_ENABLE_MINIO=y +CONFIG_KDEVOPS_WORKFLOW_ENABLE_MINIO_WARP=y + +# MinIO Configuration for XFS testing +CONFIG_MINIO_ENABLE=y +CONFIG_MINIO_CONTAINER_IMAGE="minio/minio:latest" +CONFIG_MINIO_CONTAINER_NAME="minio-server" +CONFIG_MINIO_API_PORT=9000 +CONFIG_MINIO_CONSOLE_PORT=9001 +CONFIG_MINIO_ACCESS_KEY="minioadmin" +CONFIG_MINIO_SECRET_KEY="minioadmin" + +# Configure XFS filesystem for MinIO storage +CONFIG_MINIO_USE_CUSTOM_FILESYSTEM=y +CONFIG_MINIO_STORAGE_DEVICE="/dev/nvme0n1" +CONFIG_MINIO_STORAGE_FSTYPE="xfs" +CONFIG_MINIO_STORAGE_FS_OPTS="-b size=4k -s size=4k" +CONFIG_MINIO_STORAGE_LABEL="minio-xfs" +CONFIG_MINIO_DATA_PATH="/data/minio" + +CONFIG_MINIO_MEMORY_LIMIT="4g" +CONFIG_MINIO_DOCKER_NETWORK_NAME="minio-network" + +# Comprehensive benchmark suite +CONFIG_MINIO_WARP_RUN_COMPREHENSIVE_SUITE=y +CONFIG_MINIO_WARP_DURATION="2m" +CONFIG_MINIO_WARP_CONCURRENT_REQUESTS=20 +CONFIG_MINIO_WARP_OBJECT_SIZE="10MB" +CONFIG_MINIO_WARP_OBJECTS_PER_REQUEST=100 +CONFIG_MINIO_WARP_BUCKET_NAME="warp-benchmark-bucket" +CONFIG_MINIO_WARP_AUTO_TERMINATE=y +CONFIG_MINIO_WARP_ENABLE_CLEANUP=n +CONFIG_MINIO_WARP_OUTPUT_FORMAT="json"
defconfigs/minio-warp-xfs-16k new file +65 -0
65 lines not on this page · raw message
defconfigs/minio-warp-xfs-lbs new file +65 -0
66 lines not on this page · raw message
kconfigs/workflows/Kconfig +19 -0
@@ -233,6 +233,13 @@ config KDEVOPS_WORKFLOW_DEDICATE_AI This will dedicate your configuration to running only the AI workflow for vector database performance testing. +config KDEVOPS_WORKFLOW_DEDICATE_MINIO + bool "minio" + select KDEVOPS_WORKFLOW_ENABLE_MINIO + help + This will dedicate your configuration to running only the + MinIO workflow for S3 storage benchmarking with Warp testing. + endchoice config KDEVOPS_WORKFLOW_NAME
@@ -250,6 +257,7 @@ config KDEVOPS_WORKFLOW_NAME default "mmtests" if KDEVOPS_WORKFLOW_DEDICATE_MMTESTS default "fio-tests" if KDEVOPS_WORKFLOW_DEDICATE_FIO_TESTS default "ai" if KDEVOPS_WORKFLOW_DEDICATE_AI + default "minio" if KDEVOPS_WORKFLOW_DEDICATE_MINIO endif
@@ -513,6 +521,17 @@ source "workflows/ai/Kconfig" endmenu endif # KDEVOPS_WORKFLOW_ENABLE_AI +config KDEVOPS_WORKFLOW_ENABLE_MINIO + bool + output yaml + default y if KDEVOPS_WORKFLOW_NOT_DEDICATED_ENABLE_MINIO || KDEVOPS_WORKFLOW_DEDICATE_MINIO + +if KDEVOPS_WORKFLOW_ENABLE_MINIO +menu "Configure and run MinIO S3 benchmarks" +source "workflows/minio/Kconfig" +endmenu +endif # KDEVOPS_WORKFLOW_ENABLE_MINIO + config KDEVOPS_WORKFLOW_ENABLE_SSD_STEADY_STATE bool "Attain SSD steady state prior to tests" output yaml
playbooks/minio.yml new file +53 -0
53 lines not on this page · raw message
playbooks/roles/ai_setup/tasks/main.yml +14 -26
@@ -15,7 +15,6 @@ loop: - "{{ ai_docker_data_path }}" - "{{ ai_docker_etcd_data_path }}" - - "{{ ai_docker_minio_data_path }}" when: ai_milvus_docker | bool become: true
@@ -50,24 +49,20 @@ memory: "{{ ai_etcd_memory_limit }}" when: ai_milvus_docker | bool -- name: Start MinIO container - community.docker.docker_container: - name: "{{ ai_minio_container_name }}" - image: "{{ ai_minio_container_image_string }}" - state: started - restart_policy: unless-stopped - networks: - - name: "{{ ai_docker_network_name }}" - ports: - - "{{ ai_minio_api_port }}:9000" - - "{{ ai_minio_console_port }}:9001" - env: - MINIO_ACCESS_KEY: "{{ ai_minio_access_key }}" - MINIO_SECRET_KEY: "{{ ai_minio_secret_key }}" - ansible.builtin.command: server /minio_data --console-address ":9001" - volumes: - - "{{ ai_docker_minio_data_path }}:/minio_data" - memory: "{{ ai_minio_memory_limit }}" +- name: Setup MinIO using shared role + include_role: + name: minio_setup + vars: + minio_container_image: "{{ ai_minio_container_image_string }}" + minio_container_name: "{{ ai_minio_container_name }}" + minio_api_port: "{{ ai_minio_api_port }}" + minio_console_port: "{{ ai_minio_console_port }}" + minio_access_key: "{{ ai_minio_access_key }}" + minio_secret_key: "{{ ai_minio_secret_key }}" + minio_data_path: "{{ ai_docker_minio_data_path }}" + minio_memory_limit: "{{ ai_minio_memory_limit }}" + minio_docker_network: "{{ ai_docker_network_name }}" + minio_create_network: false # Network already created above when: ai_milvus_docker | bool - name: Wait for etcd to be ready
@@ -77,13 +72,6 @@ timeout: 60 when: ai_milvus_docker | bool -- name: Wait for MinIO to be ready - ansible.builtin.wait_for: - host: localhost - port: "{{ ai_minio_api_port }}" - timeout: 60 - when: ai_milvus_docker | bool - - name: Start Milvus container community.docker.docker_container: name: "{{ ai_milvus_container_name }}"
playbooks/roles/gen_hosts/tasks/main.yml +17 -2
@@ -179,7 +179,7 @@ name: guestfs_nodes when: - kdevops_workflows_dedicated_workflow - - kdevops_workflow_enable_ai + - kdevops_workflow_enable_ai|default(false)|bool - ai_enable_multifs_testing|default(false)|bool - ansible_hosts_template.stat.exists
@@ -188,7 +188,7 @@ all_generic_nodes: "{{ guestfs_nodes.guestfs_nodes | map(attribute='name') | list }}" when: - kdevops_workflows_dedicated_workflow - - kdevops_workflow_enable_ai + - kdevops_workflow_enable_ai|default(false)|bool - ai_enable_multifs_testing|default(false)|bool - guestfs_nodes is defined
@@ -221,6 +221,21 @@ state: touch mode: "0755" +- name: Generate the Ansible hosts file for a dedicated MinIO setup + tags: ['hosts'] + ansible.builtin.template: + src: "{{ kdevops_hosts_template }}" + dest: "{{ ansible_cfg_inventory }}" + force: true + trim_blocks: True + lstrip_blocks: True + mode: '0644' + when: + - kdevops_workflows_dedicated_workflow + - kdevops_workflow_enable_minio|default(false)|bool + - ansible_hosts_template.stat.exists + - not kdevops_use_declared_hosts|default(false)|bool + - name: Verify if final host file exists ansible.builtin.stat: path: "{{ ansible_cfg_inventory }}"
playbooks/roles/gen_hosts/templates/workflows/minio.j2 new file +173 -0
173 lines not on this page · raw message
playbooks/roles/gen_nodes/tasks/main.yml +122 -6
169 lines not on this page · raw message
playbooks/roles/minio_destroy/tasks/main.yml new file +34 -0
@@ -0,0 +1,34 @@ +--- +- name: Import optional extra_args file + include_vars: "{{ item }}" + ignore_errors: yes + with_items: + - "../extra_vars.yaml" + tags: vars + +- name: Stop and remove MinIO container + community.docker.docker_container: + name: "{{ minio_container_name }}" + state: absent + ignore_errors: yes + +- name: Remove Docker network + community.docker.docker_network: + name: "{{ minio_docker_network_name }}" + state: absent + ignore_errors: yes + +- name: Clean up MinIO data directory + file: + path: "{{ minio_data_path }}" + state: absent + when: minio_warp_enable_cleanup | default(true) | bool + +- name: Clean up temporary Warp results + file: + path: "/tmp/warp-results" + state: absent + +- name: Display MinIO destroy complete + debug: + msg: "MinIO containers and data have been cleaned up"
playbooks/roles/minio_install/tasks/main.yml new file +61 -0
61 lines not on this page · raw message
playbooks/roles/minio_results/tasks/main.yml new file +86 -0
86 lines not on this page · raw message
playbooks/roles/minio_setup/defaults/main.yml new file +16 -0
@@ -0,0 +1,16 @@ +--- +# MinIO Docker container defaults +minio_container_image: "minio/minio:RELEASE.2023-03-20T20-16-18Z" +minio_container_name: "minio-server" +minio_api_port: 9000 +minio_console_port: 9001 +minio_access_key: "minioadmin" +minio_secret_key: "minioadmin" +minio_data_path: "/data/minio" +minio_memory_limit: "2g" +minio_docker_network: "minio-network" + +# MinIO service configuration +minio_enable: true +minio_create_network: true +minio_wait_for_ready: true
playbooks/roles/minio_setup/tasks/main.yml new file +100 -0
100 lines not on this page · raw message
playbooks/roles/minio_uninstall/tasks/main.yml new file +17 -0
@@ -0,0 +1,17 @@ +--- +- name: Import optional extra_args file + include_vars: "{{ item }}" + ignore_errors: yes + with_items: + - "../extra_vars.yaml" + tags: vars + +- name: Stop MinIO container + community.docker.docker_container: + name: "{{ minio_container_name }}" + state: stopped + ignore_errors: yes + +- name: Display MinIO uninstallation complete + debug: + msg: "MinIO container stopped"
playbooks/roles/minio_warp_run/tasks/main.yml new file +249 -0
249 lines not on this page · raw message
playbooks/roles/minio_warp_run/templates/warp_config.json.j2 new file +14 -0
@@ -0,0 +1,14 @@ +{ + "benchmark": "{{ minio_warp_benchmark_type }}", + "endpoint": "http://localhost:{{ minio_api_port }}", + "access_key": "{{ minio_access_key }}", + "secret_key": "{{ minio_secret_key }}", + "bucket": "{{ minio_warp_bucket_name }}", + "duration": "{{ minio_warp_duration }}", + "concurrent": {{ minio_warp_concurrent_requests }}, + "object_size": "{{ minio_warp_object_size }}", + "objects": {{ minio_warp_objects_per_request }}, + "auto_terminate": {{ minio_warp_auto_terminate | lower }}, + "cleanup": {{ minio_warp_enable_cleanup | lower }}, + "output_format": "{{ minio_warp_output_format }}" +}
workflows/Makefile +4 -0
@@ -70,6 +70,10 @@ ifeq (y,$(CONFIG_KDEVOPS_WORKFLOW_ENABLE_AI)) include workflows/ai/Makefile endif # CONFIG_KDEVOPS_WORKFLOW_ENABLE_AI == y +ifeq (y,$(CONFIG_KDEVOPS_WORKFLOW_ENABLE_MINIO)) +include workflows/minio/Makefile +endif # CONFIG_KDEVOPS_WORKFLOW_ENABLE_MINIO == y + ANSIBLE_EXTRA_ARGS += $(WORKFLOW_ARGS) ANSIBLE_EXTRA_ARGS_SEPARATED += $(WORKFLOW_ARGS_SEPARATED) ANSIBLE_EXTRA_ARGS_DIRECT += $(WORKFLOW_ARGS_DIRECT)
workflows/minio/Kconfig new file +23 -0
@@ -0,0 +1,23 @@ +if KDEVOPS_WORKFLOW_ENABLE_MINIO + +menu "MinIO S3 Storage Testing" + +config KDEVOPS_WORKFLOW_ENABLE_MINIO_WARP + bool "Enable MinIO Warp benchmarking" + default y + help + Enable MinIO Warp for S3 storage benchmarking. Warp provides + comprehensive S3 API performance testing with multiple benchmark + types including GET, PUT, DELETE, LIST, and MULTIPART operations. + +if KDEVOPS_WORKFLOW_ENABLE_MINIO_WARP + +source "workflows/minio/Kconfig.docker" +source "workflows/minio/Kconfig.storage" +source "workflows/minio/Kconfig.warp" + +endif # KDEVOPS_WORKFLOW_ENABLE_MINIO_WARP + +endmenu + +endif # KDEVOPS_WORKFLOW_ENABLE_MINIO
workflows/minio/Kconfig.docker new file +66 -0
66 lines not on this page · raw message
workflows/minio/Kconfig.storage new file +364 -0
364 lines not on this page · raw message
workflows/minio/Kconfig.warp new file +141 -0
141 lines not on this page · raw message
workflows/minio/Makefile new file +76 -0
76 lines not on this page · raw message
workflows/minio/scripts/analyze_warp_results.py new file +858 -0
713 lines not on this page · raw message
workflows/minio/scripts/generate_warp_report.py new file +404 -0
404 lines not on this page · raw message
workflows/minio/scripts/run_benchmark_suite.sh new file +116 -0
116 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Signature · 1 line
2.50.1
Part of the diff is not shown here. View the raw message.