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 7E0CE7346F for ; Mon, 28 Jul 2025 00:18:05 +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=1753661888; cv=none; b=QAC+JlQSRKuVb3uAL7tdFiowrIsmtdD+f1Vh+sxxm5vAuerOxR+sFC5pZyckxtoRWHDvqR3B92MobZ/JoBybB3CDqH9tODr9G4j3h5SgX7IPF8Ka5CAfNXMOv5um8EcU2zrQN9oQQzNU0ES6pnAIgVewOJuloOjH6iCjlhg2eCE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1753661888; c=relaxed/simple; bh=ZaKNYvwy1+6/KhXtxjkDwGuO8N+kgFUzYlCB7w7Hc8I=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=CCghDsraz9NEqgyVrl/HqecY0POqR32HmYp0aSSXxdjEs23tb22+ztLJTmlHQZzSI0hv7xXztPtj8V3U+S4ww/j6wT7jiYlw8cCjwlW5rsoXVSZUY/Bf76hvqNR+/22KCpLGvtdAlBmRYQ/tMaVSZk1cIK+PUQQlnVw4C0tKG+M= 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=cIWKqbTL; 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="cIWKqbTL" 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=cIWKqbTLK8dQlQ6DQeAfCqdfQp EeZWKY65k9N+s4j5oz2KOLsrCK9X9yC3B8hNU1RRR07GnWXHznbkZ1Edetj2WUX6/AUDwfOfbZz8V e4vV535xpYKMvRDp5fUlnu936RqoqVnVDBfeg+Iv/jWjYtknva/upqK0h4HE7tnB8ktLdNMYAAdE9 W69ftb13GLXJUjh+Mkvk5U51NKYZRULTH5QBR3pWyJAPeLtutUoSS/M8ITdjUNTizpay8pvH/SEAT OXoYY7aXje41VE4e8BsmoKjxBDJDyKS8djKPrMV+S3OQF3ECk02J9adG2F/n3pfXoJ+1bP510SQtl Y+DsYOrQ==; Received: from mcgrof by bombadil.infradead.org with local (Exim 4.98.2 #2 (Red Hat Linux)) id 1ugBZ5-0000000DNXy-0wQV; Mon, 28 Jul 2025 00:18:03 +0000 From: Luis Chamberlain To: Chuck Lever , Daniel Gomez , kdevops@lists.linux.dev Cc: Chuck Lever Subject: [PATCH 30/40] Add a guest/instance for building the test kernel Date: Sun, 27 Jul 2025 17:17:49 -0700 Message-ID: <20250728001800.3188617-31-mcgrof@kernel.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250728001800.3188617-1-mcgrof@kernel.org> References: <20250728001800.3188617-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