Re: [PATCH 09/14] bootlinux: fix os detection for 9p delegated tasks with registered facts
Chuck Lever <[email protected]> Tue, 28 Oct 2025 15:57:19 -0400
| Newsgroups | dev.linux.lists.kdevops |
|---|---|
| Message-ID | <[email protected]> |
On 10/28/25 3:53 PM, Daniel Gomez wrote: >>> When using 9P builds, the Linux kernel is built once on the control >>> host (delegate_to: localhost, run_once: true) and shared to all guests. >>> The dependency installation tasks reference ansible_os_family which >>> gets overwritten when gathering facts from localhost, causing the wrong >>> distribution's packages to be installed. >> Just curious: Doesn't kdevops already have variables (eg, distro_debian) >> that contain this state? > You're spot on. > > To be clear, I don't like this approach, but I couldn't "gather" > ansible_os_family from the localhost and use it directly. The reason is because > of the inventory scope we run this playbook on: > > Example: > > make linux > ... > + ansible-playbook --limit baseline:dev playbooks/bootlinux.yml \ > '--extra-vars=target_linux_git=/mirror/linux.git target_linux_tree=linux \ > target_linux_ref=v6.15... > ==> [linux] > PLAY: BOOTLINUX > TASK: Gathering Facts [kci-18884852820-153-nvme] > ⠀⠀✓ [kci-18884852820-153-nvme] > TASK: Import optional extra_args file [kci-18884852820-153-nvme] > ⠀⠀✓ [kci-18884852820-153-nvme] > TASK: Select the .config file for building the test kernel [kci-18884852820-153-nvme] > ⠀⠀✓ [kci-18884852820-153-nvme] > ... > > That is gathering facts for the baseline and dev groups. Adding localhost (or > all hosts) shouldn't work either, since we don't want the playbook to run on the > localhost (controller node), except for some specific tasks. My guess is that it > worked before because the guest and the localhost (controller node) happened to > match, but we weren't actually collecting the controller node's facts correctly. That seems quite plausible. > That gets me thinking if we should run bootlinux.yml localhosts tasks first with > a tag (e.g. setup), then run bootlinux on baseline and dev. Or what do you think > would be the right approach? Kconfig controls where the kernel build runs now. It could run a distinct playbook for 9p (and maybe it does already, I just can't remember at the moment). -- Chuck Lever