Re: [PATCH v2 09/15] bootlinux: fix os detection for 9p build dependency installation

Chuck Lever <[email protected]> Sat, 8 Nov 2025 11:11:02 -0500
Newsgroups dev.linux.lists.kdevops
Message-ID <[email protected]>
On 11/7/25 6:20 PM, Daniel Gomez wrote:
>>> +- name: Red Hat-specific setup (controller node)
>>>    ansible.builtin.import_tasks: redhat/main.yml
>>>    when:
>>>      - distro_redhat_based|bool
>>> +    - bootlinux_9p|bool
>>> +
>>> +- name: Red Hat-specific setup (builder node)
>>> +  ansible.builtin.import_tasks: redhat/main.yml
>>> +  when:
>>> +    - bootlinux_builder|bool
>>> +    - ansible_os_family == "RedHat"
>>>
>>> IIUC, this should return the correct ansible_os_family value when builder target
>>> is selected because the task is executed on the guest with --limit baseline:dev.
>> Hi Daniel -
>>
>> None of these tasks will execute if bootlinux_targets == true, AFAICT.
> Sorry, I missed that target. I meant to add that condition too when we use
> ansible_os_family case.
> 
>> Why can't this work based on which host the install-deps tasks are
>> running on? That was the original design I had in mind, and seems
>> most Ansible-like.
> I can't replicate the issue. I think we can revert the patch. Here my tests:
> 
> fedora: https://github.com/linux-kdevops/kdevops/actions/runs/19183690762
> debian: https://github.com/linux-kdevops/kdevops/actions/runs/19183543710

OK, let me try to be less terse.  :-)

I'd like to see this instance of install-deps look like most of the
others: basically, key off only the ansible_os_family settings. I think
that will be more maintainable.

Those settings, however, need to properly reflect the environment where
install-deps is running. For the 9p case, it will run on both the
controller (where the kernel is built) and the targets (where the kernel
is installed); and I think bootlinux even runs the install-deps steps
twice for 9p to deal exactly with that duplication.

The same is true for the "separate builder" case: the kernel builder
runs on one target node, and the built artifacts are installed on other
target nodes; and bootlinux has to ensure the correct dependencies are
installed everywhere they are needed.

The way I tried to deal with that was to use "delegate_to:". But I think
you might have advanced a different mechanism, and I missed the
subtleties of that. Or, maybe providing execution locale information on
the Ansible command line just isn't appropriate in these cases. I
haven't thought it through.

I'm very happy to help drill into the 9p case that was not working for
you, instead of standing nearby lobbing uninformed suggestions.
Meanwhile, I'll keep a patch that reverts 0e9c8ac8bc68 in my private
tree.

-- 
Chuck Lever