Skip to content

Commit 01a18b7

Browse files
committed
linux: fix 9P workflow host targeting for build and deploy
The linux-build and linux-deploy targets were incorrectly targeting guest nodes instead of localhost when using 9P configuration, causing connectivity failures. This implements the same dynamic selection pattern used by linux-clone, creating separate client/9P variants that adapt based on CONFIG_BOOTLINUX_9P. The fix addresses three core issues: host targeting now uses localhost for 9P builds, task tagging ensures configuration and build tasks execute properly, and proper task inclusion allows tagged execution to work correctly. Generated-by: Claude AI Signed-off-by: Daniel Gomez <[email protected]>
1 parent 95306b4 commit 01a18b7

File tree

3 files changed

+35
-5
lines changed

3 files changed

+35
-5
lines changed

playbooks/roles/bootlinux/tasks/build/9p.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,7 @@
126126
run_once: true
127127
delegate_to: localhost
128128
when: not bootlinux_use_config_fragments|default(false)|bool
129+
tags: ["build-linux"]
129130

130131
- name: Use configuration fragments for Linux {{ target_linux_tree }} on the control node
131132
ansible.builtin.import_tasks: ../config-fragments.yml

playbooks/roles/bootlinux/tasks/main.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,11 @@
1111
tags: vars
1212

1313
- name: Select the .config file for building the test kernel
14-
ansible.builtin.include_tasks:
14+
ansible.builtin.import_tasks:
1515
file: "{{ role_path }}/tasks/config.yml"
1616
when:
1717
- not workflow_linux_packaged|bool
18+
tags: ["build-linux"]
1819

1920
# Distro specific
2021
- name: Install dependencies to build and install the Linux kernel
@@ -223,12 +224,14 @@
223224
file: "{{ role_path }}/tasks/build/9p.yml"
224225
when:
225226
- bootlinux_9p|bool
227+
tags: ["build-linux", "clone"]
226228

227229
- name: Build the Linux kernel on the target nodes
228230
ansible.builtin.include_tasks:
229231
file: "{{ role_path }}/tasks/build/targets.yml"
230232
when:
231233
- bootlinux_targets|bool
234+
tags: ["build-linux", "clone"]
232235

233236
- name: Build kernel on the builder node
234237
ansible.builtin.include_tasks:

workflows/linux/Makefile

Lines changed: 30 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@ BOOTLINUX_ARGS += target_linux_install_b4='$(CONFIG_BOOTLINUX_TEST_MESSAGE_ID_IN
4444
endif
4545

4646
LINUX_CLONE_DEFAULT_TYPE := linux-clone-clients
47+
LINUX_BUILD_DEFAULT_TYPE := linux-build-clients
48+
LINUX_DEPLOY_DEFAULT_TYPE := linux-deploy-clients
4749
ifeq (y,$(CONFIG_BOOTLINUX_9P))
4850
BOOTLINUX_ARGS += bootlinux_9p_host_path='$(subst ",,$(CONFIG_BOOTLINUX_9P_HOST_PATH))'
4951
BOOTLINUX_ARGS += bootlinux_9p_msize='$(subst ",,$(CONFIG_BOOTLINUX_9P_MSIZE))'
@@ -52,6 +54,8 @@ BOOTLINUX_ARGS += bootlinux_9p_security_model='$(subst ",,$(CONFIG_BOOTLINUX_9P_
5254
BOOTLINUX_ARGS += bootlinux_9p_driver='$(subst ",,$(CONFIG_BOOTLINUX_9P_DRIVER))'
5355
BOOTLINUX_ARGS += bootlinux_9p_mount_tag='$(subst ",,$(CONFIG_BOOTLINUX_9P_MOUNT_TAG))'
5456
LINUX_CLONE_DEFAULT_TYPE := linux-clone-9p
57+
LINUX_BUILD_DEFAULT_TYPE := linux-build-9p
58+
LINUX_DEPLOY_DEFAULT_TYPE := linux-deploy-9p
5559
endif
5660

5761
# XXX: I can't seem to use after this LINUX_DYNAMIC_RUNTIME_VARS += for other
@@ -148,22 +152,44 @@ linux-mount:
148152
--tags vars,9p_mount \
149153
--extra-vars="$(BOOTLINUX_ARGS)" $(LIMIT_HOSTS)
150154

151-
PHONY += linux-deploy
152-
linux-deploy:
155+
PHONY += linux-deploy-clients
156+
linux-deploy-clients: $(KDEVOPS_NODES)
153157
$(Q)ansible-playbook $(ANSIBLE_VERBOSE) \
154158
--limit 'baseline:dev' \
155159
$(KDEVOPS_PLAYBOOKS_DIR)/bootlinux.yml \
156160
--tags vars,build-linux,install-linux,manual-update-grub,saved,vars,reboot \
157161
--extra-vars="$(BOOTLINUX_ARGS)" $(LIMIT_HOSTS)
158162

159-
PHONY += linux-build
160-
linux-build:
163+
PHONY += linux-deploy-9p
164+
linux-deploy-9p: $(KDEVOPS_NODES)
165+
$(Q)ansible-playbook $(ANSIBLE_VERBOSE) \
166+
--limit 'localhost' \
167+
$(KDEVOPS_PLAYBOOKS_DIR)/bootlinux.yml \
168+
--tags vars,build-linux,install-linux,manual-update-grub,saved,vars,reboot \
169+
--extra-vars="$(BOOTLINUX_ARGS)"
170+
171+
PHONY += linux-deploy
172+
linux-deploy: $(KDEVOPS_NODES) $(LINUX_DEPLOY_DEFAULT_TYPE)
173+
174+
PHONY += linux-build-clients
175+
linux-build-clients: $(KDEVOPS_NODES)
161176
$(Q)ansible-playbook $(ANSIBLE_VERBOSE) \
162177
--limit 'baseline:dev' \
163178
$(KDEVOPS_PLAYBOOKS_DIR)/bootlinux.yml \
164179
--tags vars,build-linux,saved,vars \
165180
--extra-vars="$(BOOTLINUX_ARGS)" $(LIMIT_HOSTS)
166181

182+
PHONY += linux-build-9p
183+
linux-build-9p: $(KDEVOPS_NODES)
184+
$(Q)ansible-playbook $(ANSIBLE_VERBOSE) \
185+
--limit 'localhost' \
186+
$(KDEVOPS_PLAYBOOKS_DIR)/bootlinux.yml \
187+
--tags vars,build-linux \
188+
--extra-vars="$(BOOTLINUX_ARGS)"
189+
190+
PHONY += linux-build
191+
linux-build: $(KDEVOPS_NODES) $(LINUX_BUILD_DEFAULT_TYPE)
192+
167193
PHONY += linux-install
168194
linux-install:
169195
$(Q)ansible-playbook $(ANSIBLE_VERBOSE) \

0 commit comments

Comments
 (0)