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 8F0A74B1E5D for ; Mon, 19 May 2025 13:15:41 +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=1747660541; cv=none; b=ceqHIP3Q8y69kYqQ6LKn4byoGxzI6GrzLolelDUBzq2mW7lWV4j1NoCf7wfl5ruRQyiRxaRgl3NgBt2SnPcQ/dMGEj9M6gRQeP7PFqJWS7EnKwCRKNL8KQiRI26tvUdSY30I7C/NfbMLHlQMmZ5wa7hdI5pe7QOH6scuRmCqAjA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1747660541; c=relaxed/simple; bh=KXd7g1w7xZvex5mfH5JEYazCfbj9l2MEKtzWaSHOZNs=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=LtvWjFF67qynv1JZeAGSuCiZJiJwHqNTyQF3YlAHVQrPm1QaQkAcDqO8DY/yXQVsmRtL+zw6k6FQT8y83SukuW4E4YpmIKKstxIppSEfQc7iUpuVEJx7fqeucSm4Y085XXsiwBK2kHaagf9v9uYMJYOWb0rm93HyKILwSe63rHI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=DkMN18md; 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="DkMN18md" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 07804C4CEE4; Mon, 19 May 2025 13:15:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1747660541; bh=KXd7g1w7xZvex5mfH5JEYazCfbj9l2MEKtzWaSHOZNs=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=DkMN18mdKAEadHSEc59M6V1V2nAhhPRCz3zDpzHmbi+1z8mAaZjXzppVFGH8kBm1r lnkbbWbPCnF5onurudP0RZh6dCswZz+AGb+j05Lnr7YvTFghhuDR/uNTLZDm9psjuM 9ls2+06iutvpV8x48siyp0EAkyJLUXdUrhmQikNwxE6vikiEwyklkRytJk6Tf+k1tP LIykIBFZKGnKzW4EsdNZQ9lcHeGCfzfbkLjwQy8Xbb/GTZEXyQimDKKbn+R8cSmJmu ZdSRdG3xgY/qLShCmH2oJe6mdLPLNepkP1b7tUsFpcb3V5z27xvuy13/zyr6wFLXB6 hBuv9R50Qa9yw== Message-ID: Date: Mon, 19 May 2025 09:15:39 -0400 Precedence: bulk X-Mailing-List: kdevops@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v1 2/2] bootlinux: Fold bootlinux-local into the bootlinux role To: da.gomez@kernel.org, kdevops@lists.linux.dev Cc: Chuck Lever References: <20250518141838.176772-1-cel@kernel.org> <20250518141838.176772-2-cel@kernel.org> <2be43e67-d8c6-49d2-905e-8ce847d300eb@kernel.org> Content-Language: en-US From: Chuck Lever Organization: kernel.org In-Reply-To: <2be43e67-d8c6-49d2-905e-8ce847d300eb@kernel.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit On 5/19/25 5:32 AM, Daniel Gomez wrote: > > > On 18/05/2025 16.18, cel@kernel.org wrote: >> From: Chuck Lever >> >> Rather than running a separate play, adopt the more common mechanism >> for running a local action. >> >> Signed-off-by: Chuck Lever >> --- >>   playbooks/bootlinux-local.yml                 |  5 ----- >>   .../roles/bootlinux-local/defaults/main.yml   |  3 --- >>   .../roles/bootlinux-local/tasks/install-deps  |  1 - >>   .../roles/bootlinux-local/tasks/main.yml      | 19 ---------------- >>   playbooks/roles/bootlinux/tasks/main.yml      | 22 ++++++++++++++++--- >>   workflows/linux/Makefile                      |  3 --- >>   6 files changed, 19 insertions(+), 34 deletions(-) >>   delete mode 100644 playbooks/bootlinux-local.yml >>   delete mode 100644 playbooks/roles/bootlinux-local/defaults/main.yml >>   delete mode 120000 playbooks/roles/bootlinux-local/tasks/install-deps >>   delete mode 100644 playbooks/roles/bootlinux-local/tasks/main.yml >> >> diff --git a/playbooks/bootlinux-local.yml b/playbooks/bootlinux- >> local.yml >> deleted file mode 100644 >> index e342f0e56fb1..000000000000 >> --- a/playbooks/bootlinux-local.yml >> +++ /dev/null >> @@ -1,5 +0,0 @@ >> ---- >> -- hosts: localhost >> -  connection: local >> -  roles: >> -    - role: bootlinux-local >> diff --git a/playbooks/roles/bootlinux-local/defaults/main.yml b/ >> playbooks/roles/bootlinux-local/defaults/main.yml >> deleted file mode 100644 >> index d7c41f4c3e90..000000000000 >> --- a/playbooks/roles/bootlinux-local/defaults/main.yml >> +++ /dev/null >> @@ -1,3 +0,0 @@ >> -# SPDX-License-Identifier copyleft-next-0.3.1 >> ---- >> -bootlinux_9p: False >> diff --git a/playbooks/roles/bootlinux-local/tasks/install-deps b/ >> playbooks/roles/bootlinux-local/tasks/install-deps >> deleted file mode 120000 >> index 492aaaa0174a..000000000000 >> --- a/playbooks/roles/bootlinux-local/tasks/install-deps >> +++ /dev/null >> @@ -1 +0,0 @@ >> -../../bootlinux/tasks/install-deps/ >> \ No newline at end of file >> diff --git a/playbooks/roles/bootlinux-local/tasks/main.yml b/ >> playbooks/roles/bootlinux-local/tasks/main.yml >> deleted file mode 100644 >> index 367b3af46ec6..000000000000 >> --- a/playbooks/roles/bootlinux-local/tasks/main.yml >> +++ /dev/null >> @@ -1,19 +0,0 @@ >> ---- >> -- name: Import optional extra_args file >> -  include_vars: "{{ item }}" >> -  ignore_errors: yes >> -  with_first_found: >> -    - files: >> -      - "../extra_vars.yml" >> -      - "../extra_vars.yaml" >> -      - "../extra_vars.json" >> -      skip: true >> -  tags: vars >> - >> -- name: Install dependencies to build Linux on host >> -  tags: [ 'deps' ] >> -  run_once: true >> -  local_action: import_tasks install-deps/main.yml >> -  when: >> -    - bootlinux_9p|bool >> - >> diff --git a/playbooks/roles/bootlinux/tasks/main.yml b/playbooks/ >> roles/bootlinux/tasks/main.yml >> index 9ad675b3f278..3741b16aa33c 100644 >> --- a/playbooks/roles/bootlinux/tasks/main.yml >> +++ b/playbooks/roles/bootlinux/tasks/main.yml >> @@ -10,11 +10,23 @@ >>         skip: true >>     tags: vars >>   -# Distro specific >> -- name: Install dependencies >> -  include_tasks: >> +- name: Install dependencies to build and install the Linux kernel >> +  ansible.builtin.include_tasks: >>       file: install-deps/main.yml >>   > > Same comment as in the other patch. Either we are missing deps tags > here, at the Makefile target and at task level (and replace it with the > current linux tag) or just remove all of them. > >> +# Needs root on the controller >> +# >> +# Someday this should be done only once when installing kdevops >> +# on the Ansible control node. >> +- name: Install dependencies to build the Linux kernel >> +  run_once: true >> +  ansible.builtin.include_tasks: >> +    file: install-deps/main.yml >> +    apply: >> +      delegate_to: localhost >> +  when: >> +    - bootlinux_9p|bool >> + >>   # We do this regardless of what distro you use >>   - name: Install b4 >>     become: yes >> @@ -28,6 +40,10 @@ >>       - ansible_facts['os_family']|lower != 'debian' >>     tags: linux >>   +# Needs root on the controller >> +# >> +# Someday this should be done only once when installing kdevops >> +# on the Ansible control node. > > @yawn_brendan shared this idea of running kdevops inside LXC with kvm > support. Otherwise, host setup may become a bit complex to do it manually. > > Thoughts? Where I'm going with this is to ultimately remove the use of "sudo" for all local actions. The biggest user of sudo for that purpose seems to be installing dependencies on the controller. That can instead be done when kdevops is installed. But LXC/kvm is outside of my everyday usage, so perhaps I don't understand @yawn_brendan's suggestion. >>   - name: Install b4 on host >>     become: yes >>     become_method: sudo >> diff --git a/workflows/linux/Makefile b/workflows/linux/Makefile >> index ecce273a4f67..aaf604a1071a 100644 >> --- a/workflows/linux/Makefile >> +++ b/workflows/linux/Makefile >> @@ -90,9 +90,6 @@ LINUX_HELP_EXTRA := >>     PHONY += linux >>   linux: $(KDEVOPS_NODES) >> -    $(Q)ansible-playbook $(ANSIBLE_VERBOSE) \ >> -        $(KDEVOPS_PLAYBOOKS_DIR)/bootlinux-local.yml \ >> -        --extra-vars="$(BOOTLINUX_ARGS)" >>       $(Q)ansible-playbook $(ANSIBLE_VERBOSE) -i \ >>           $(KDEVOPS_HOSTFILE) $(KDEVOPS_PLAYBOOKS_DIR)/bootlinux.yml \ >>           --extra-vars="$(BOOTLINUX_ARGS)" $(LIMIT_HOSTS) > -- Chuck Lever