From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 4D51F18A6DF for ; Mon, 28 Jul 2025 01:14:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.137.202.133 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1753665280; cv=none; b=X6q8bs1UCpGiREKbPLrdggk8oTd3ESZvJbOvXL4FSeF+Ikafc7lOVrNx1McukBA9o8PyayQv0cDB8ThE5zcD7RcmYfIGaKSmsAWiDjP/gNq2QizSIwoparAMYoCu5MGvPCsKZUUJqGBg9yrpKfovTserjHD1PehzdM9eAa2R1tA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1753665280; c=relaxed/simple; bh=ZaKNYvwy1+6/KhXtxjkDwGuO8N+kgFUzYlCB7w7Hc8I=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=hMlhLvi7nf31rlWaGrkzoKaASfU2kY6etAPBtnaziamA5XKj9HDJU8Z34BcdIDeercvYnirUJmsh1PkiAFzr7TMm+2c6/kYXw0RkZquz6QytAsT3qPN5NMNOMG+rPHjbPTTLN9+MBw1JFhohVF5SerCyRPWLqArjN8148bnLvuk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=kernel.org; spf=none smtp.mailfrom=infradead.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b=0KsbN8iT; arc=none smtp.client-ip=198.137.202.133 Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=kernel.org Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=infradead.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="0KsbN8iT" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Sender:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description; bh=LQt7Imxme/qjTleM2vHnsGFUBp0GhHiU/b9ajgUHKw0=; b=0KsbN8iTy4ScctcGTH6mGLMYTa fV2431HvVyXw5V567w6jffYXyQTdOiYR0NYlT1ifBn24rX6XBsGr/gGrxSpQwHXkZR7LJkwK25UPl 3ffA9mYqf8wjB4IJYmxA6hxIWYytc1AizBKMOQQFEPpdfz4h4WebTxJ2lS3PltXDPWg/pXiGrw1kA ef40oa3lyDzyzX2AYpF3uEDBDxyYpo76TqWEgoQZLxDRuCS/9xAMNx21T4QuCVPpPCuAxtmGkgBdb 4EH2MIjqMHD8c8k6LVGQ0t9oaUOKnG6k+/+mzvXLijzkvDldDPev6ZaQBVMbh0Jm58urwPN0rgdwQ aer1lJkg==; Received: from mcgrof by bombadil.infradead.org with local (Exim 4.98.2 #2 (Red Hat Linux)) id 1ugCRo-0000000DPki-1RdX; Mon, 28 Jul 2025 01:14:36 +0000 From: Luis Chamberlain To: Chuck Lever , Daniel Gomez , kdevops@lists.linux.dev Cc: Chuck Lever Subject: [PATCH v2 23/33] Add a guest/instance for building the test kernel Date: Sun, 27 Jul 2025 18:14:23 -0700 Message-ID: <20250728011434.3197091-24-mcgrof@kernel.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250728011434.3197091-1-mcgrof@kernel.org> References: <20250728011434.3197091-1-mcgrof@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 Sender: Luis Chamberlain From: Chuck Lever Provision a separate guest/instance for the purpose of building the Linux kernel under test. This builder guest is 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 | 3 +++ playbooks/roles/gen_nodes/tasks/main.yml | 22 +++++++++++++++++++ workflows/linux/Kconfig | 14 ++++++++++++ workflows/linux/Makefile | 4 ++++ 7 files changed, 70 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 1cf906d3..d9479552 100644 --- a/playbooks/roles/gen_hosts/defaults/main.yml +++ b/playbooks/roles/gen_hosts/defaults/main.yml @@ -41,3 +41,5 @@ kdevops_loopback_nfs_enable: False kdevops_smbd_enable: False kdevops_krb5_enable: False kdevops_enable_iscsi: false + +bootlinux_builder: false diff --git a/playbooks/roles/gen_hosts/tasks/main.yml b/playbooks/roles/gen_hosts/tasks/main.yml index 58ebd1d4..70d543ad 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 00000000..0c9ba1e8 --- /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 3368cf61..6aed5303 100644 --- a/playbooks/roles/gen_nodes/defaults/main.yml +++ b/playbooks/roles/gen_nodes/defaults/main.yml @@ -86,6 +86,7 @@ kdevops_workflows_dedicated_workflow: False kdevops_workflow_enable_fstests: False kdevops_workflow_enable_blktests: False +builder_nodes: [] iscsi_nodes: [] is_fstests: False @@ -101,6 +102,8 @@ bootlinux_9p_mount_tag: "ignore" bootlinux_9p_security_model: "none" bootlinux_9p_driver: "virtio-9p-pci" +bootlinux_builder: false + guestfs_requires_uefi: False kdevops_workflow_enable_sysbench: False diff --git a/playbooks/roles/gen_nodes/tasks/main.yml b/playbooks/roles/gen_nodes/tasks/main.yml index ebaba927..ae017ee8 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 27cba0a9..31f57017 100644 --- a/workflows/linux/Kconfig +++ b/workflows/linux/Kconfig @@ -77,6 +77,20 @@ config BOOTLINUX_9P However, 9p is available only when using a local virtualization method such as libvirt. +config BOOTLINUX_BUILDER + bool "Separate kernel builder" + output yaml + help + Enabling this option brings up a separate guest/instance + for building the Linux kernel to test. The new kernel is + packaged appropriately for installation on other systems, + but is not installed. Once the kernel is built, the kernel + packages are saved on the controller host and the builder + node can be destroyed. + + This choice is best when the test runners are resource- + limited or vastly different than the controller host. + endchoice if BOOTLINUX_9P diff --git a/workflows/linux/Makefile b/workflows/linux/Makefile index f5bc6490..01e3d3e4 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.47.2