From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A121128FFE2 for ; Tue, 22 Apr 2025 15:49:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1745336959; cv=none; b=HJdOIG759f1nVZRW87isgLHRgX1fqE59H2AKLbd8KTlSMYG0M3a5Ek0O2PLv83ZXYZBNwFyjbWy09xhJxJ2yH3bXcVAcuPKpsacsV9+ZOcb3xCNrlGTKiOGIrVAagQAFHvP4HyPLg13LE5M9eN5aEdb7sJUvavJ6FJvYIXluPwQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1745336959; c=relaxed/simple; bh=8Vg5OlObbGToRe7i+S5I2F/dpjMwlKcxrkETcbDFJBM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=YFf3t9tjcVgZmMCizQZel8Ni+C8Gu0z3d/dDcFd+cya5MhAuhoi2iNM2juph+xgUjqv70/SL1CWDePHyyBg7e1I+b0CsxrxNRJxgfeiJQe+5EPIO6roAqvfBzcWd+QxHTdUxD1RVVDKv1wA2w8EPHwcaOSi3bxeqcYxCipl9JwY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=O9Dnf3B6; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="O9Dnf3B6" Received: by smtp.kernel.org (Postfix) with ESMTPSA id A9264C4CEEB; Tue, 22 Apr 2025 15:49:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1745336959; bh=8Vg5OlObbGToRe7i+S5I2F/dpjMwlKcxrkETcbDFJBM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=O9Dnf3B6W7fAfaW63cIj+XxGslYKERcMxQmeMd7eXYPwu7OcAvEa/RrrNXFVPHijk 2+NzfUcwJ66TsgoQpshsmVzp5wQwbQmqqWXeZI8fZOL1yPY+3sMvyEREKf8NNLZJZ7 aRBd30x7ez5iAMxVJoOiDtbcukoqHeCPOdEyUjMxZ6EaQtVVkS9+lxeUwgs3exwlNT fGOs62JaxO4LDgBT+kccwG27DJOw8wjPC94lqtLscXUEEhxL+OXLBYuYshkXm2qTId LD7crJ8LKj5QdKy2GsdFdy67IUMlnjZzNK+dpSzGjrPqOxMwzrnmseaqTVCgJ0a0EJ TTKsKOZ0C0rrw== From: cel@kernel.org To: Luis Chamberlain , Daniel Gomez , Scott Mayhew Cc: , Chuck Lever Subject: [RFC PATCH 1/3] Add a guest/instance for building the test kernel Date: Tue, 22 Apr 2025 11:49:04 -0400 Message-ID: <20250422154906.526319-2-cel@kernel.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250422154906.526319-1-cel@kernel.org> References: <20250422154906.526319-1-cel@kernel.org> Precedence: bulk X-Mailing-List: kdevops@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: Chuck Lever Provision a separate guest/instance for the purpose of building the Linux kernel under test. It's not used yet. Signed-off-by: Chuck Lever --- playbooks/roles/gen_hosts/defaults/main.yml | 2 ++ playbooks/roles/gen_hosts/tasks/main.yml | 12 ++++++++++ .../roles/gen_hosts/templates/builder.j2 | 13 +++++++++++ playbooks/roles/gen_nodes/defaults/main.yml | 2 ++ playbooks/roles/gen_nodes/tasks/main.yml | 22 +++++++++++++++++++ workflows/linux/Kconfig | 10 +++++++++ workflows/linux/Makefile | 4 ++++ 7 files changed, 65 insertions(+) create mode 100644 playbooks/roles/gen_hosts/templates/builder.j2 diff --git a/playbooks/roles/gen_hosts/defaults/main.yml b/playbooks/roles/gen_hosts/defaults/main.yml index f6ab9bcce166..85afb35040e3 100644 --- a/playbooks/roles/gen_hosts/defaults/main.yml +++ b/playbooks/roles/gen_hosts/defaults/main.yml @@ -29,6 +29,8 @@ kdevops_workflow_enable_ltp: False kdevops_workflow_enable_nfstest: false kdevops_workflow_enable_sysbench: false +bootlinux_builder: false + is_fstests: False fstests_fstyp: "bogus" fs_config_role_path: "/dev/null" diff --git a/playbooks/roles/gen_hosts/tasks/main.yml b/playbooks/roles/gen_hosts/tasks/main.yml index a50355f72160..9182ac46f8c1 100644 --- a/playbooks/roles/gen_hosts/tasks/main.yml +++ b/playbooks/roles/gen_hosts/tasks/main.yml @@ -56,6 +56,18 @@ when: - is_fstests +- name: Generate the Ansible hosts file for a Linux kernel build + tags: [ 'hosts' ] + template: + src: "{{ kdevops_hosts_template }}" + dest: "{{ topdir_path }}/{{ kdevops_hosts }}" + force: yes + trim_blocks: True + lstrip_blocks: True + when: + - bootlinux_builder + - ansible_hosts_template.stat.exists + - name: Generate the Ansible hosts file tags: [ 'hosts' ] template: diff --git a/playbooks/roles/gen_hosts/templates/builder.j2 b/playbooks/roles/gen_hosts/templates/builder.j2 new file mode 100644 index 000000000000..0c9ba1e8e01a --- /dev/null +++ b/playbooks/roles/gen_hosts/templates/builder.j2 @@ -0,0 +1,13 @@ +[all] +{{ kdevops_hosts_prefix }}-builder +[all:vars] +ansible_python_interpreter = "{{ kdevops_python_interpreter }}" + +[baseline] +{{ kdevops_hosts_prefix }}-builder +[baseline:vars] +ansible_python_interpreter = "{{ kdevops_python_interpreter }}" + +[dev] +[dev:vars] +ansible_python_interpreter = "{{ kdevops_python_interpreter }}" diff --git a/playbooks/roles/gen_nodes/defaults/main.yml b/playbooks/roles/gen_nodes/defaults/main.yml index 8ff9b87993a7..d5fa444c995f 100644 --- a/playbooks/roles/gen_nodes/defaults/main.yml +++ b/playbooks/roles/gen_nodes/defaults/main.yml @@ -93,6 +93,8 @@ fstests_fstyp: "bogus" fs_config_role_path: "/dev/null" fs_config_data: "[section_1]" +bootlinux_builder: false +builder_nodes: [] bootlinux_9p: False bootlinux_9p_host_path: "/dev/null" bootlinux_9p_msize: 0 diff --git a/playbooks/roles/gen_nodes/tasks/main.yml b/playbooks/roles/gen_nodes/tasks/main.yml index d541dcbf1f54..e3d0127d1f65 100644 --- a/playbooks/roles/gen_nodes/tasks/main.yml +++ b/playbooks/roles/gen_nodes/tasks/main.yml @@ -43,6 +43,14 @@ when: - kdevops_baseline_and_dev +- name: Set builder nodes array + tags: vars + set_fact: + builder_nodes: + - "{{ kdevops_host_prefix + '-builder' }}" + when: + - bootlinux_builder + - name: Set iscsi_nodes list ansible.builtin.set_fact: iscsi_nodes: "{{ [kdevops_host_prefix + '-iscsi'] }}" @@ -138,6 +146,20 @@ - not kdevops_workflows_dedicated_workflow - ansible_nodes_template.stat.exists +- name: Generate the builder kdevops nodes file using {{ kdevops_nodes_template }} as jinja2 source template + tags: [ 'nodes' ] + vars: + node_template: "{{ kdevops_nodes_template | basename }}" + all_generic_nodes: "{{ builder_nodes }}" + nodes: "{{ all_generic_nodes }}" + template: + src: "{{ node_template }}" + dest: "{{ topdir_path }}/{{ kdevops_nodes }}" + force: yes + when: + - bootlinux_builder + - ansible_nodes_template.stat.exists + - name: Generate the pynfs kdevops nodes file using {{ kdevops_nodes_template }} as jinja2 source template tags: [ 'nodes' ] vars: diff --git a/workflows/linux/Kconfig b/workflows/linux/Kconfig index 797469e60d20..8a26eb2e2897 100644 --- a/workflows/linux/Kconfig +++ b/workflows/linux/Kconfig @@ -36,6 +36,16 @@ config BOOTLINUX_PURE_IOMAP endif # HAVE_SUPPORTS_PURE_IOMAP +config BOOTLINUX_BUILDER + bool "Build once, test many" + output yaml + default n + help + Enabling this option creates a separate guest/instance + where the Linux kernel is built. kdevops passes the + artifacts of this build to the test runner nodes to be + installed before each workflow runs. + config BOOTLINUX_9P bool "Use 9p to build Linux" depends on LIBVIRT && !GUESTFS_LACKS_9P diff --git a/workflows/linux/Makefile b/workflows/linux/Makefile index ecce273a4f67..65bbb8ae9a90 100644 --- a/workflows/linux/Makefile +++ b/workflows/linux/Makefile @@ -13,6 +13,10 @@ ifeq (y,$(CONFIG_BOOTLINUX_PURE_IOMAP)) TREE_CONFIG:=config-$(TREE_REF)-pure-iomap endif +ifeq (y,$(CONFIG_BOOTLINUX_BUILDER)) +KDEVOPS_HOSTS_TEMPLATE=builder.j2 +endif + # Describes the Linux clone BOOTLINUX_ARGS += target_linux_git=$(TREE_URL) # ifeq (y,$(CONFIG_BOOTLINUX_TREE_CUSTOM_NAME)) -- 2.49.0