* [PATCH 01/14] base_image: restore locales-all installation for Debian Trixie
2025-10-28 18:11 [PATCH 00/14] Fedora on Debian Daniel Gomez
@ 2025-10-28 18:11 ` Daniel Gomez
2025-10-28 18:11 ` [PATCH 02/14] guestfs: fix Kconfig indentation style Daniel Gomez
` (12 subsequent siblings)
13 siblings, 0 replies; 18+ messages in thread
From: Daniel Gomez @ 2025-10-28 18:11 UTC (permalink / raw)
To: Luis Chamberlain, Chuck Lever; +Cc: kdevops, Daniel Gomez
From: Daniel Gomez <da.gomez@samsung.com>
The virt-customize phase was failing with "update-locale: Error: invalid
locale settings" because commit 6bb3bfb2c257 removed the locales-all
package installation but left the locale configuration commands that
depend on it.
The update-locale command validates all settings in /etc/default/locale,
and without locales-all providing the necessary locale infrastructure, it
rejects the LANGUAGE=en_US:en setting as invalid during image build.
Restore the locales-all installation within the Debian Trixie conditional
block, placing it immediately before the locale configuration sequence so
the image has proper locale support from the start. This prevents SSH
locale warnings on first boot while keeping the package Debian-specific.
Generated-by: Claude AI
Signed-off-by: Daniel Gomez <da.gomez@samsung.com>
---
playbooks/roles/base_image/templates/virt-builder.j2 | 1 +
1 file changed, 1 insertion(+)
diff --git a/playbooks/roles/base_image/templates/virt-builder.j2 b/playbooks/roles/base_image/templates/virt-builder.j2
index 3069e95f..289ee9e5 100644
--- a/playbooks/roles/base_image/templates/virt-builder.j2
+++ b/playbooks/roles/base_image/templates/virt-builder.j2
@@ -73,6 +73,7 @@ append-line /etc/nsswitch.conf:ethers: db files
append-line /etc/nsswitch.conf:rpc: db files
append-line /etc/nsswitch.conf:netgroup: nis
uninstall cloud-init
+install locales-all
write /etc/default/locale:LANG=en_US.UTF-8
append-line /etc/default/locale:LANGUAGE=en_US:en
write /etc/locale.gen:en_US.UTF-8 UTF-8
--
2.51.0
^ permalink raw reply related [flat|nested] 18+ messages in thread* [PATCH 02/14] guestfs: fix Kconfig indentation style
2025-10-28 18:11 [PATCH 00/14] Fedora on Debian Daniel Gomez
2025-10-28 18:11 ` [PATCH 01/14] base_image: restore locales-all installation for Debian Trixie Daniel Gomez
@ 2025-10-28 18:11 ` Daniel Gomez
2025-10-28 18:11 ` [PATCH 03/14] guestfs: remove unused bringup debug Kconfig options Daniel Gomez
` (11 subsequent siblings)
13 siblings, 0 replies; 18+ messages in thread
From: Daniel Gomez @ 2025-10-28 18:11 UTC (permalink / raw)
To: Luis Chamberlain, Chuck Lever; +Cc: kdevops, Daniel Gomez
From: Daniel Gomez <da.gomez@samsung.com>
Fix help text indentation in Kconfig.guestfs to use tabs consistently
instead of mixed tabs and spaces. Kconfig style requires tabs for
indentation with tab+2spaces acceptable for help text continuation.
Signed-off-by: Daniel Gomez <da.gomez@samsung.com>
---
kconfigs/Kconfig.guestfs | 22 +++++++++++-----------
1 file changed, 11 insertions(+), 11 deletions(-)
diff --git a/kconfigs/Kconfig.guestfs b/kconfigs/Kconfig.guestfs
index d0ac66fc..451c3d38 100644
--- a/kconfigs/Kconfig.guestfs
+++ b/kconfigs/Kconfig.guestfs
@@ -194,9 +194,9 @@ config GUESTFS_DEBIAN_IMAGE_NAME
default "debian-12" if GUESTFS_DEBIAN_BUSTER
config GUESTFS_DEBIAN_BOX_SHORT
- string
- default "debian13" if GUESTFS_DEBIAN_TRIXIE
- default "debian12" if GUESTFS_DEBIAN_BUSTER
+ string
+ default "debian13" if GUESTFS_DEBIAN_TRIXIE
+ default "debian12" if GUESTFS_DEBIAN_BUSTER
config GUESTFS_DEBIAN_COPY_HOST_SOURCES
bool
@@ -223,14 +223,14 @@ config GUESTFS_DEBIAN_COPY_HOST_SOURCES
endif # GUESTFS_DEBIAN
config VIRT_BUILDER_OS_VERSION
- string "virt-builder os-version"
- default "fedora-39" if GUESTFS_FEDORA
- default GUESTFS_DEBIAN_IMAGE_NAME if GUESTFS_DEBIAN
- help
- Have virt-builder use this os-version string to
- build a root image for the guest. Run "virt-builder -l"
- to get a list of operating systems and versions supported
- by guestfs.
+ string "virt-builder os-version"
+ default "fedora-39" if GUESTFS_FEDORA
+ default GUESTFS_DEBIAN_IMAGE_NAME if GUESTFS_DEBIAN
+ help
+ Have virt-builder use this os-version string to
+ build a root image for the guest. Run "virt-builder -l"
+ to get a list of operating systems and versions supported
+ by guestfs.
choice
prompt "Guestfs bringup debug mode"
--
2.51.0
^ permalink raw reply related [flat|nested] 18+ messages in thread* [PATCH 03/14] guestfs: remove unused bringup debug Kconfig options
2025-10-28 18:11 [PATCH 00/14] Fedora on Debian Daniel Gomez
2025-10-28 18:11 ` [PATCH 01/14] base_image: restore locales-all installation for Debian Trixie Daniel Gomez
2025-10-28 18:11 ` [PATCH 02/14] guestfs: fix Kconfig indentation style Daniel Gomez
@ 2025-10-28 18:11 ` Daniel Gomez
2025-10-28 18:11 ` [PATCH 04/14] guestfs: fix spelling errors and Debian capitalization Daniel Gomez
` (10 subsequent siblings)
13 siblings, 0 replies; 18+ messages in thread
From: Daniel Gomez @ 2025-10-28 18:11 UTC (permalink / raw)
To: Luis Chamberlain, Chuck Lever; +Cc: kdevops, Daniel Gomez
From: Daniel Gomez <da.gomez@samsung.com>
Remove GUESTFS_BRINGUP_DEBUG_* configuration options as they reference
scripts/guestfs_bringup.sh which no longer exists after the migration to
Ansible-based bringup in the guestfs role.
Signed-off-by: Daniel Gomez <da.gomez@samsung.com>
---
kconfigs/Kconfig.guestfs | 21 ---------------------
1 file changed, 21 deletions(-)
diff --git a/kconfigs/Kconfig.guestfs b/kconfigs/Kconfig.guestfs
index 451c3d38..63262a8c 100644
--- a/kconfigs/Kconfig.guestfs
+++ b/kconfigs/Kconfig.guestfs
@@ -232,25 +232,4 @@ config VIRT_BUILDER_OS_VERSION
to get a list of operating systems and versions supported
by guestfs.
-choice
- prompt "Guestfs bringup debug mode"
- default GUESTFS_BRINGUP_DEBUG_DISABLED
-
-config GUESTFS_BRINGUP_DEBUG_DISABLED
- bool "Disabled"
- help
- Disables bringup debug.
-
-config GUESTFS_BRINGUP_DEBUG_0
- bool "set -x"
- help
- Enables 'set -x' when running scripts/guestfs_bringup.sh.
-
-config GUESTFS_BRINGUP_DEBUG_1
- bool "set -euxo pipefile"
- help
- Enables 'set -euxo pipefile' when running scripts/guestfs_bringup.sh.
-
-endchoice
-
endif # GUESTFS
--
2.51.0
^ permalink raw reply related [flat|nested] 18+ messages in thread* [PATCH 04/14] guestfs: fix spelling errors and Debian capitalization
2025-10-28 18:11 [PATCH 00/14] Fedora on Debian Daniel Gomez
` (2 preceding siblings ...)
2025-10-28 18:11 ` [PATCH 03/14] guestfs: remove unused bringup debug Kconfig options Daniel Gomez
@ 2025-10-28 18:11 ` Daniel Gomez
2025-10-28 18:11 ` [PATCH 05/14] base_image: set selinux to permissive for fedora on debian hosts Daniel Gomez
` (9 subsequent siblings)
13 siblings, 0 replies; 18+ messages in thread
From: Daniel Gomez @ 2025-10-28 18:11 UTC (permalink / raw)
To: Luis Chamberlain, Chuck Lever; +Cc: kdevops, Daniel Gomez
From: Daniel Gomez <da.gomez@samsung.com>
Fix multiple minor spelling errors in Kconfig help text.
Capitalize "Debian" when referring to the distribution name per proper
noun conventions, while keeping lowercase in technical contexts like
"debian-testing" repository names.
Signed-off-by: Daniel Gomez <da.gomez@samsung.com>
---
kconfigs/Kconfig.guestfs | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/kconfigs/Kconfig.guestfs b/kconfigs/Kconfig.guestfs
index 63262a8c..f7601bc9 100644
--- a/kconfigs/Kconfig.guestfs
+++ b/kconfigs/Kconfig.guestfs
@@ -118,12 +118,12 @@ config GUESTFS_DEBIAN_TRIXIE
select GUESTFS_HAS_CUSTOM_RAW_IMAGE_SHA512SUMS
select GUESTFS_HAS_CUSTOM_RAW_IMAGE_ROLLING
help
- Select this for debian trixie, debian 13. Since debian does not yet
- provie a virt-builder repo, we must download mock up our own URL
- for trixie release, as the default guestfs repo only has debian buster.
+ Select this for Debian Trixie, Debian 13. Since Debian does not yet
+ provide a virt-builder repo, we must download mock up our own URL
+ for trixie release, as the default guestfs repo only has Debian Buster.
We download the image for you once, and once its there we don't refresh
it. We can later add support to force a refresh using the latest URL,
- as trixie is debian-testing and debian testing always has an new
+ as trixie is debian-testing and Debian Testing always has a new
up to date image release, that is, its a rolling distribution release.
This doesn't work yet.. it gets stuck on the grub prompt.
@@ -132,7 +132,7 @@ config GUESTFS_DEBIAN_BUSTER
bool "Debian 12 - Buster"
output yaml
help
- Select this for debian buster, debian 12.
+ Select this for Debian Buster, Debian 12.
endchoice
@@ -204,16 +204,16 @@ config GUESTFS_DEBIAN_COPY_HOST_SOURCES
default DISTRO_DEBIAN_HAS_HOP1_SOURCES
select GUESTFS_COPY_SOURCES_FROM_HOST_TO_GUEST
help
- We have detected that you are running debian on the host, this option
+ We have detected that you are running Debian on the host, this option
will be enabled by default if we detect that your /etc/apt/sources.list
is using a source we determine has only one hop via traceroute to it,
for details of that heuristic see the script:
./scripts/get-distro-has-hop-count-sources.sh
- If your hop distance to your mirror is just 1, you are using debian on
- the host, want to use debian guests, both host and guest match the
- target release, then its a good assumtion you'd likely want to take
+ If your hop distance to your mirror is just 1, you are using Debian on
+ the host, want to use Debian guests, both host and guest match the
+ target release, then its a good assumption you'd likely want to take
advantage of that same mirror for your guests. So disable this if you
really don't want to take advantage of your sources.list.
--
2.51.0
^ permalink raw reply related [flat|nested] 18+ messages in thread* [PATCH 05/14] base_image: set selinux to permissive for fedora on debian hosts
2025-10-28 18:11 [PATCH 00/14] Fedora on Debian Daniel Gomez
` (3 preceding siblings ...)
2025-10-28 18:11 ` [PATCH 04/14] guestfs: fix spelling errors and Debian capitalization Daniel Gomez
@ 2025-10-28 18:11 ` Daniel Gomez
2025-10-28 18:11 ` [PATCH 06/14] ansible_provisioning: fix help text indentation style Daniel Gomez
` (8 subsequent siblings)
13 siblings, 0 replies; 18+ messages in thread
From: Daniel Gomez @ 2025-10-28 18:11 UTC (permalink / raw)
To: Luis Chamberlain, Chuck Lever; +Cc: kdevops, Daniel Gomez
From: Daniel Gomez <da.gomez@samsung.com>
When building Fedora guest images on Debian hosts, SELinux contexts
cannot be properly set because Debian lacks SELinux kernel support.
Libguestfs cannot persist security.selinux extended attributes to
filesystems when mounting from non-SELinux hosts, causing all files to
have unlabeled_t context.
This creates a boot failure where SELinux blocks all binary execution
(195 AVC denials, 211 exit 127 errors), including the autorelabel
service itself.
Configure Fedora images to use SELinux permissive mode instead of
enforcing when built on Debian/Ubuntu hosts. This allows guests to boot
successfully while still loading SELinux policy for development and
testing.
Add --no-selinux-relabel to virt-sysprep to prevent it from creating
.autorelabel files that would trigger failed relabeling attempts on
first boot.
Generated-by: Claude AI
Signed-off-by: Daniel Gomez <da.gomez@samsung.com>
---
playbooks/roles/base_image/tasks/base-image.yml | 34 +++++++++++++++++++++++++
playbooks/roles/guestfs/tasks/bringup/main.yml | 4 +++
2 files changed, 38 insertions(+)
diff --git a/playbooks/roles/base_image/tasks/base-image.yml b/playbooks/roles/base_image/tasks/base-image.yml
index fc022649..a7f2da2d 100644
--- a/playbooks/roles/base_image/tasks/base-image.yml
+++ b/playbooks/roles/base_image/tasks/base-image.yml
@@ -52,6 +52,7 @@
creates: "{{ base_image_pathname }}"
when:
- libvirt_uri_system|bool
+ register: virt_builder_result_system
- name: Generate a new base image for {{ base_image_os_version }}
ansible.builtin.command:
@@ -71,6 +72,39 @@
creates: "{{ base_image_pathname }}"
when:
- not libvirt_uri_system|bool
+ register: virt_builder_result_user
+
+- name: Set SELinux to permissive mode for Fedora images on non-SELinux hosts (system libvirt)
+ become: true
+ become_method: ansible.builtin.sudo
+ ansible.builtin.command:
+ argv:
+ - "virt-customize"
+ - "-a"
+ - "{{ base_image_pathname }}"
+ - "--run-command"
+ - "sed -i 's/^SELINUX=enforcing$/SELINUX=permissive/' /etc/selinux/config"
+ when:
+ - libvirt_uri_system|bool
+ - guestfs_fedora is defined
+ - guestfs_fedora|bool
+ - ansible_distribution|lower in ['debian', 'ubuntu']
+ - virt_builder_result_system is changed
+
+- name: Set SELinux to permissive mode for Fedora images on non-SELinux hosts (user libvirt)
+ ansible.builtin.command:
+ argv:
+ - "virt-customize"
+ - "-a"
+ - "{{ base_image_pathname }}"
+ - "--run-command"
+ - "sed -i 's/^SELINUX=enforcing$/SELINUX=permissive/' /etc/selinux/config"
+ when:
+ - not libvirt_uri_system|bool
+ - guestfs_fedora is defined
+ - guestfs_fedora|bool
+ - ansible_distribution|lower in ['debian', 'ubuntu']
+ - virt_builder_result_user is changed
- name: Set proper ownership on base image for rcloud access (system libvirt)
become: true
diff --git a/playbooks/roles/guestfs/tasks/bringup/main.yml b/playbooks/roles/guestfs/tasks/bringup/main.yml
index 510e1a7d..f3645b90 100644
--- a/playbooks/roles/guestfs/tasks/bringup/main.yml
+++ b/playbooks/roles/guestfs/tasks/bringup/main.yml
@@ -91,6 +91,10 @@
"--firstboot-command", "if command -v ufw >/dev/null 2>&1 && systemctl is-active ufw >/dev/null 2>&1; then ufw allow " + (ansible_cfg_ssh_port | string) + "/tcp; fi"
]
if ansible_cfg_ssh_port | int != 22 else []
+ ) + (
+ ["--no-selinux-relabel"]
+ if (guestfs_fedora is defined and guestfs_fedora|bool and ansible_distribution|lower in ['debian', 'ubuntu'])
+ else []
)
}}
--
2.51.0
^ permalink raw reply related [flat|nested] 18+ messages in thread* [PATCH 06/14] ansible_provisioning: fix help text indentation style
2025-10-28 18:11 [PATCH 00/14] Fedora on Debian Daniel Gomez
` (4 preceding siblings ...)
2025-10-28 18:11 ` [PATCH 05/14] base_image: set selinux to permissive for fedora on debian hosts Daniel Gomez
@ 2025-10-28 18:11 ` Daniel Gomez
2025-10-28 18:11 ` [PATCH 07/14] devconfig: fix undefined custom repos/packages variables Daniel Gomez
` (7 subsequent siblings)
13 siblings, 0 replies; 18+ messages in thread
From: Daniel Gomez @ 2025-10-28 18:11 UTC (permalink / raw)
To: Luis Chamberlain, Chuck Lever; +Cc: kdevops, Daniel Gomez
From: Daniel Gomez <da.gomez@samsung.com>
Fix Kconfig help text indentation to consistently use tabs. Several help
entries were using spaces instead of tabs for indentation, and one had
incorrect placement of the "help" keyword.
Signed-off-by: Daniel Gomez <da.gomez@samsung.com>
---
kconfigs/Kconfig.ansible_provisioning | 56 +++++++++++++++++------------------
1 file changed, 28 insertions(+), 28 deletions(-)
diff --git a/kconfigs/Kconfig.ansible_provisioning b/kconfigs/Kconfig.ansible_provisioning
index 52b64854..590a1148 100644
--- a/kconfigs/Kconfig.ansible_provisioning
+++ b/kconfigs/Kconfig.ansible_provisioning
@@ -37,7 +37,7 @@ config KDEVOPS_DEVCONFIG_ENABLE_CONSOLE
depends on KDEVOPS_DEVCONFIG_ENABLE
help
Enable this so that we configure and enable console serial settings
- for you on /etc/default/grub.
+ for you on /etc/default/grub.
if KDEVOPS_DEVCONFIG_ENABLE_CONSOLE
@@ -45,26 +45,26 @@ config KDEVOPS_DEVCONFIG_KERNEL_CONSOLE_SETTINGS
string "Kernel command line console kernel parameters to use"
default "console=tty0 console=tty1 console=ttyS0,115200n8"
help
- Linux kernel console kernel parameters to use. This will be appended
+ Linux kernel console kernel parameters to use. This will be appended
to the GRUB configuration file /etc/default/grub on the variable
- GRUB_CMDLINE_LINUX_DEFAULT, if and only if you did not have any
- console settings already set.
+ GRUB_CMDLINE_LINUX_DEFAULT, if and only if you did not have any
+ console settings already set.
config KDEVOPS_DEVCONFIG_GRUB_SERIAL_COMMAND
string "GRUB specific serial settings"
default "serial --speed=115200 --unit=0 --parity=no --stop=1"
help
- GRUB console settings to use. This will be appended to the GRUB
- configuration file /etc/default/grub on the variable
- GRUB_SERIAL_COMMAND, if and only if we did change the your console
- settings as per the above configured kernel parameters passed.
+ GRUB console settings to use. This will be appended to the GRUB
+ configuration file /etc/default/grub on the variable
+ GRUB_SERIAL_COMMAND, if and only if we did change the your console
+ settings as per the above configured kernel parameters passed.
config KDEVOPS_GRUB_TIMEOUT
int "GRUB timeout"
default 2
help
- GRUB timeout to wait for user interaction to let you pick another
- kernel or boot options.
+ GRUB timeout to wait for user interaction to let you pick another
+ kernel or boot options.
endif # KDEVOPS_DEVCONFIG_ENABLE_CONSOLE
@@ -72,7 +72,7 @@ config KDEVOPS_DEVCONFIG_ENABLE_SYSTEMD_WATCHDOG
bool "Enable systemd watchdog setup"
default y
depends on KDEVOPS_DEVCONFIG_ENABLE
- help
+ help
Enable this to allow you to configure your systemd watchdog configuration.
For details refer to: https://www.freedesktop.org/software/systemd/man/systemd-system.conf.html
@@ -81,20 +81,20 @@ if KDEVOPS_DEVCONFIG_ENABLE_SYSTEMD_WATCHDOG
config KDEVOPS_DEVCONFIG_SYSTEMD_WATCHDOG_TIMEOUT_RUNTIME
string "Configures the RuntimeWatchdogSec settting"
default "5min"
- help
- Configures the systemd watchdog RuntimeWatchdogSec setting.
+ help
+ Configures the systemd watchdog RuntimeWatchdogSec setting.
config KDEVOPS_DEVCONFIG_SYSTEMD_WATCHDOG_TIMEOUT_REBOOT
string "Configures the RebootWatchdogSec settting"
default "10min"
- help
- Configures the systemd watchdog RebootWatchdogSec setting.
+ help
+ Configures the systemd watchdog RebootWatchdogSec setting.
config KDEVOPS_DEVCONFIG_SYSTEMD_WATCHDOG_TIMEOUT_KEXEC
string "Configures the KexecWatchdogSec settting"
default "5min"
- help
- Configures the systemd watchdog KexecWatchdogSec setting.
+ help
+ Configures the systemd watchdog KexecWatchdogSec setting.
endif # KDEVOPS_DEVCONFIG_ENABLE_SYSTEMD_WATCHDOG
@@ -131,8 +131,8 @@ config DEVCONFIG_ENABLE_SYSTEMD_JOURNAL_REMOTE
select DEVCONFIG_ENABLE_SYSTEMD_TIMESYNCD
select DEVCONFIG_ENABLE_SYSTEMD_TIMESYNCD_NTP
help
- It is a pain to have to ssh to target nodes one is testing to check
- for kernel logs. Enable this to allow us to set up the host with
+ It is a pain to have to ssh to target nodes one is testing to check
+ for kernel logs. Enable this to allow us to set up the host with
systemd-journal-remote.service on then we will also congigure all
test nodes with systemd-journal-upload.service so to upload their
systemd journal to the host. By default we rely on insecure http
@@ -168,8 +168,8 @@ config DEVCONFIG_SYSTEMD_JOURNAL_USE_HTTP
bool "Use simple insecure http"
default y
help
- For a simple setup you don't want to set up SSL cert files.
- If you disable this you are on your own for now on setting up the
+ For a simple setup you don't want to set up SSL cert files.
+ If you disable this you are on your own for now on setting up the
SSL cert files. For cloud environments you may want to have a
command and control server within the network on the nodes, and assign
that node as the systemd service.
@@ -178,8 +178,8 @@ config DEVCONFIG_SYSTEMD_JOURNAL_REMOTE_URL
string "systemd-remote URL"
default $(shell, scripts/append-makefile-vars.sh http:// $(KDEVOPS_DEFAULT_BRIDGE_IP_GUESTFS)) if GUESTFS
help
- This is used for the client /etc/systemd/journal-upload.conf URL line.
- By default we won't use SSL for now. If you should make sure the
+ This is used for the client /etc/systemd/journal-upload.conf URL line.
+ By default we won't use SSL for now. If you should make sure the
IP address used here matches what the node should use. If using
libvirt then ensure it is the same for your virtualization setup.
If you are using libvirt on debian on the host it would seem the
@@ -191,7 +191,7 @@ config DEVCONFIG_ENABLE_SYSTEMD_TIMESYNCD
bool "Set up systemd-timesyncd"
default n
help
- It if often useful to have the host and target nodes on the same
+ It if often useful to have the host and target nodes on the same
time. This is usefult to optimize watchdogs so that we can use on
local time instead of remote time for a sense of how much time has
lapsed. Enable this if you want to benefit from this.
@@ -202,7 +202,7 @@ config DEVCONFIG_ENABLE_SYSTEMD_TIMESYNCD_NTP
bool "Enable systemd-timesyncd NTP"
default y
help
- Enable NTP service using systemd-timesyncd.
+ Enable NTP service using systemd-timesyncd.
if DEVCONFIG_ENABLE_SYSTEMD_TIMESYNCD_NTP
@@ -238,9 +238,9 @@ config KDEVOPS_DEVCONFIG_ENABLE_CUSTOM_REPOS
bool "Allow user to add custom repositories and install packages from them"
default n
help
- Enable Kconfig options to allow user to add custom package
- repositories and to also specify packages to be installed
- from them.
+ Enable Kconfig options to allow user to add custom package
+ repositories and to also specify packages to be installed
+ from them.
config KDEVOPS_DEVCONFIG_CUSTOM_REPOS
string "Comma separated list of custom repositories to be enabled"
--
2.51.0
^ permalink raw reply related [flat|nested] 18+ messages in thread* [PATCH 07/14] devconfig: fix undefined custom repos/packages variables
2025-10-28 18:11 [PATCH 00/14] Fedora on Debian Daniel Gomez
` (5 preceding siblings ...)
2025-10-28 18:11 ` [PATCH 06/14] ansible_provisioning: fix help text indentation style Daniel Gomez
@ 2025-10-28 18:11 ` Daniel Gomez
2025-10-28 18:11 ` [PATCH 08/14] devconfig: fix Ansible boolean conditional for custom repos Daniel Gomez
` (6 subsequent siblings)
13 siblings, 0 replies; 18+ messages in thread
From: Daniel Gomez @ 2025-10-28 18:11 UTC (permalink / raw)
To: Luis Chamberlain, Chuck Lever; +Cc: kdevops, Daniel Gomez
From: Daniel Gomez <da.gomez@samsung.com>
Ansible fails with "'kdevops_devconfig_custom_repos' is undefined" when
KDEVOPS_DEVCONFIG_ENABLE_CUSTOM_REPOS is disabled (the default).
Kconfig has a limitation where "output yaml" will not export variables that
have unmet "depends on" conditions, leaving them completely undefined in
extra_vars.yaml. This causes Ansible to fail when checking these variables
even though they have default values in Kconfig.
The fix migrates both variables to proper output yaml in Kconfig while removing
the redundant legacy Makefile ANSIBLE_EXTRA_ARGS exports. To ensure the
variables always exist regardless of kconfig conditions, the devconfig role's
defaults/main.yml now provides empty string fallbacks. This follows standard
Ansible patterns and makes the playbook portable for standalone use outside
kdevops.
Generated-by: Claude AI
Signed-off-by: Daniel Gomez <da.gomez@samsung.com>
---
Makefile | 7 -------
kconfigs/Kconfig.ansible_provisioning | 2 ++
playbooks/roles/devconfig/defaults/main.yml | 4 ++++
3 files changed, 6 insertions(+), 7 deletions(-)
diff --git a/Makefile b/Makefile
index bf72eee9..f8d36572 100644
--- a/Makefile
+++ b/Makefile
@@ -213,13 +213,6 @@ endif
KDEVOPS_ANSIBLE_PROVISION_PLAYBOOK:=$(subst ",,$(CONFIG_KDEVOPS_ANSIBLE_PROVISION_PLAYBOOK))
ifeq (y,$(CONFIG_KDEVOPS_ANSIBLE_PROVISION_ENABLE))
ANSIBLE_EXTRA_ARGS += kdevops_ansible_provision_playbook='$(KDEVOPS_ANSIBLE_PROVISION_PLAYBOOK)'
-
-KDEVOPS_DEVCONFIG_CUSTOM_REPOS:=$(subst ",,$(CONFIG_KDEVOPS_DEVCONFIG_CUSTOM_REPOS))
-ANSIBLE_EXTRA_ARGS += kdevops_devconfig_custom_repos='$(KDEVOPS_DEVCONFIG_CUSTOM_REPOS)'
-
-KDEVOPS_DEVCONFIG_CUSTOM_PACKAGES:=$(subst ",,$(CONFIG_KDEVOPS_DEVCONFIG_CUSTOM_PACKAGES))
-ANSIBLE_EXTRA_ARGS += kdevops_devconfig_custom_packages='$(KDEVOPS_DEVCONFIG_CUSTOM_PACKAGES)'
-
endif
include scripts/gen-hosts.Makefile
diff --git a/kconfigs/Kconfig.ansible_provisioning b/kconfigs/Kconfig.ansible_provisioning
index 590a1148..93cc395f 100644
--- a/kconfigs/Kconfig.ansible_provisioning
+++ b/kconfigs/Kconfig.ansible_provisioning
@@ -245,6 +245,7 @@ config KDEVOPS_DEVCONFIG_ENABLE_CUSTOM_REPOS
config KDEVOPS_DEVCONFIG_CUSTOM_REPOS
string "Comma separated list of custom repositories to be enabled"
default ""
+ output yaml
depends on KDEVOPS_DEVCONFIG_ENABLE_CUSTOM_REPOS=y
help
Comma separated list of custom repositories to be enabled
@@ -252,6 +253,7 @@ config KDEVOPS_DEVCONFIG_CUSTOM_REPOS
config KDEVOPS_DEVCONFIG_CUSTOM_PACKAGES
string "Comma separated list of custom packages to be installed"
default ""
+ output yaml
depends on KDEVOPS_DEVCONFIG_ENABLE_CUSTOM_REPOS=y
help
Comma separated list of custom packages to be installed
diff --git a/playbooks/roles/devconfig/defaults/main.yml b/playbooks/roles/devconfig/defaults/main.yml
index b5d4724d..122cb898 100644
--- a/playbooks/roles/devconfig/defaults/main.yml
+++ b/playbooks/roles/devconfig/defaults/main.yml
@@ -60,3 +60,7 @@ unattended_upgrades_installed: false
workflow_infer_user_and_group: false
kdevops_use_declared_hosts: false
kdevops_enable_terraform: false
+
+# Custom repository and package installation defaults
+kdevops_devconfig_custom_repos: ""
+kdevops_devconfig_custom_packages: ""
--
2.51.0
^ permalink raw reply related [flat|nested] 18+ messages in thread* [PATCH 08/14] devconfig: fix Ansible boolean conditional for custom repos
2025-10-28 18:11 [PATCH 00/14] Fedora on Debian Daniel Gomez
` (6 preceding siblings ...)
2025-10-28 18:11 ` [PATCH 07/14] devconfig: fix undefined custom repos/packages variables Daniel Gomez
@ 2025-10-28 18:11 ` Daniel Gomez
2025-10-28 18:11 ` [PATCH 09/14] bootlinux: fix os detection for 9p delegated tasks with registered facts Daniel Gomez
` (5 subsequent siblings)
13 siblings, 0 replies; 18+ messages in thread
From: Daniel Gomez @ 2025-10-28 18:11 UTC (permalink / raw)
To: Luis Chamberlain, Chuck Lever; +Cc: kdevops, Daniel Gomez
From: Daniel Gomez <da.gomez@samsung.com>
Newer Ansible versions reject string variables in conditionals without
explicit boolean expressions, producing "Conditional result was derived
from type 'str'" errors.
Remove the redundant string variable check. The length test already
evaluates to boolean (length > 1), properly handling empty strings by
skipping the task.
Generated-by: Claude AI
Signed-off-by: Daniel Gomez <da.gomez@samsung.com>
---
.../devconfig/tasks/config-custom-repos-and-packages/redhat/main.yml | 2 --
1 file changed, 2 deletions(-)
diff --git a/playbooks/roles/devconfig/tasks/config-custom-repos-and-packages/redhat/main.yml b/playbooks/roles/devconfig/tasks/config-custom-repos-and-packages/redhat/main.yml
index 0a772dd7..76d1ce3c 100644
--- a/playbooks/roles/devconfig/tasks/config-custom-repos-and-packages/redhat/main.yml
+++ b/playbooks/roles/devconfig/tasks/config-custom-repos-and-packages/redhat/main.yml
@@ -10,7 +10,6 @@
mode: "0644"
with_items: "{{ kdevops_devconfig_custom_repos | trim | split(',') }}"
when:
- - kdevops_devconfig_custom_repos
- kdevops_devconfig_custom_repos | trim | length > 1
- name: Install custom packages
@@ -24,5 +23,4 @@
until: result.rc == 0
with_items: "{{ kdevops_devconfig_custom_packages | trim | split(',') }}"
when:
- - kdevops_devconfig_custom_packages
- kdevops_devconfig_custom_packages | trim | length > 1
--
2.51.0
^ permalink raw reply related [flat|nested] 18+ messages in thread* [PATCH 09/14] bootlinux: fix os detection for 9p delegated tasks with registered facts
2025-10-28 18:11 [PATCH 00/14] Fedora on Debian Daniel Gomez
` (7 preceding siblings ...)
2025-10-28 18:11 ` [PATCH 08/14] devconfig: fix Ansible boolean conditional for custom repos Daniel Gomez
@ 2025-10-28 18:11 ` Daniel Gomez
2025-10-28 18:51 ` Chuck Lever
2025-10-28 18:11 ` [PATCH 10/14] guestfs: generate dedora distribution-specific hostname prefixes Daniel Gomez
` (4 subsequent siblings)
13 siblings, 1 reply; 18+ messages in thread
From: Daniel Gomez @ 2025-10-28 18:11 UTC (permalink / raw)
To: Luis Chamberlain, Chuck Lever; +Cc: kdevops, Daniel Gomez
From: Daniel Gomez <da.gomez@samsung.com>
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.
Register localhost facts to separate variables (localhost_os_family,
localhost_distribution) and refresh target host facts afterward to
ensure both contexts have correct values. Update all OS-specific
conditionals in install-deps to use the localhost_* variables since
packages are installed on the control host, not the target guests.
Change import_tasks to include_tasks in update-grub since the
conditionals reference runtime facts that aren't available at parse
time.
Generated-by: Claude AI
Signed-off-by: Daniel Gomez <da.gomez@samsung.com>
---
playbooks/roles/bootlinux/tasks/build/9p.yml | 18 ++++++++++++++++++
playbooks/roles/bootlinux/tasks/install-deps/main.yml | 6 +++---
.../roles/bootlinux/tasks/install-deps/redhat/main.yml | 4 ++--
playbooks/roles/bootlinux/tasks/update-grub/main.yml | 6 +++---
4 files changed, 26 insertions(+), 8 deletions(-)
diff --git a/playbooks/roles/bootlinux/tasks/build/9p.yml b/playbooks/roles/bootlinux/tasks/build/9p.yml
index f390f028..01c95cb7 100644
--- a/playbooks/roles/bootlinux/tasks/build/9p.yml
+++ b/playbooks/roles/bootlinux/tasks/build/9p.yml
@@ -1,4 +1,22 @@
---
+- name: Gather facts from localhost for dependency installation
+ ansible.builtin.setup:
+ filter: "ansible_os_family,ansible_distribution"
+ delegate_to: localhost
+ register: localhost_facts
+ run_once: true
+
+- name: Set localhost OS facts for 9P build
+ ansible.builtin.set_fact:
+ localhost_os_family: "{{ localhost_facts.ansible_facts.ansible_os_family }}"
+ localhost_distribution: "{{ localhost_facts.ansible_facts.ansible_distribution }}"
+ delegate_to: localhost
+ run_once: true
+
+- name: Refresh target host facts after localhost gathering
+ ansible.builtin.setup:
+ filter: "ansible_os_family,ansible_distribution,ansible_distribution_version"
+
- name: Install dependencies to build the Linux kernel
delegate_to: localhost
run_once: true
diff --git a/playbooks/roles/bootlinux/tasks/install-deps/main.yml b/playbooks/roles/bootlinux/tasks/install-deps/main.yml
index 51a20741..9a9af005 100644
--- a/playbooks/roles/bootlinux/tasks/install-deps/main.yml
+++ b/playbooks/roles/bootlinux/tasks/install-deps/main.yml
@@ -2,14 +2,14 @@
- name: Debian-specific setup
ansible.builtin.import_tasks: debian/main.yml
when:
- - ansible_os_family == "Debian"
+ - localhost_os_family == "Debian"
- name: SuSE-specific setup
ansible.builtin.import_tasks: suse/main.yml
when:
- - ansible_os_family == "Suse"
+ - localhost_os_family == "Suse"
- name: Red Hat-specific setup
ansible.builtin.import_tasks: redhat/main.yml
when:
- - ansible_os_family == "RedHat"
+ - localhost_os_family == "RedHat"
diff --git a/playbooks/roles/bootlinux/tasks/install-deps/redhat/main.yml b/playbooks/roles/bootlinux/tasks/install-deps/redhat/main.yml
index 7f1955bf..589b0b18 100644
--- a/playbooks/roles/bootlinux/tasks/install-deps/redhat/main.yml
+++ b/playbooks/roles/bootlinux/tasks/install-deps/redhat/main.yml
@@ -3,7 +3,7 @@
ansible.builtin.include_role:
name: epel-release
when:
- - ansible_distribution != "Fedora"
+ - localhost_distribution != "Fedora"
- name: Install packages we care about
become: true
@@ -67,7 +67,7 @@
vars:
packages:
- btrfs-progs
- when: ansible_distribution == 'Fedora'
+ when: localhost_distribution == 'Fedora'
- name: Install clang
become: true
diff --git a/playbooks/roles/bootlinux/tasks/update-grub/main.yml b/playbooks/roles/bootlinux/tasks/update-grub/main.yml
index d0455b00..b05996bf 100644
--- a/playbooks/roles/bootlinux/tasks/update-grub/main.yml
+++ b/playbooks/roles/bootlinux/tasks/update-grub/main.yml
@@ -1,9 +1,9 @@
---
# tasks to install update-grub
- name: Distro specific update of your GRUB boot file
- ansible.builtin.import_tasks: debian.yml
+ ansible.builtin.include_tasks: debian.yml
when: ansible_facts['os_family']|lower == 'debian'
-- ansible.builtin.import_tasks: suse.yml
+- ansible.builtin.include_tasks: suse.yml
when: ansible_facts['os_family']|lower == 'suse'
-- ansible.builtin.import_tasks: redhat.yml
+- ansible.builtin.include_tasks: redhat.yml
when: ansible_facts['os_family']|lower == 'redhat'
--
2.51.0
^ permalink raw reply related [flat|nested] 18+ messages in thread* Re: [PATCH 09/14] bootlinux: fix os detection for 9p delegated tasks with registered facts
2025-10-28 18:11 ` [PATCH 09/14] bootlinux: fix os detection for 9p delegated tasks with registered facts Daniel Gomez
@ 2025-10-28 18:51 ` Chuck Lever
2025-10-28 19:53 ` Daniel Gomez
0 siblings, 1 reply; 18+ messages in thread
From: Chuck Lever @ 2025-10-28 18:51 UTC (permalink / raw)
To: Daniel Gomez, Luis Chamberlain; +Cc: kdevops, Daniel Gomez
On 10/28/25 2:11 PM, Daniel Gomez wrote:
> From: Daniel Gomez <da.gomez@samsung.com>
>
> 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?
> Register localhost facts to separate variables (localhost_os_family,
> localhost_distribution) and refresh target host facts afterward to
> ensure both contexts have correct values. Update all OS-specific
> conditionals in install-deps to use the localhost_* variables since
> packages are installed on the control host, not the target guests.
>
> Change import_tasks to include_tasks in update-grub since the
> conditionals reference runtime facts that aren't available at parse
> time.
>
> Generated-by: Claude AI
> Signed-off-by: Daniel Gomez <da.gomez@samsung.com>
> ---
> playbooks/roles/bootlinux/tasks/build/9p.yml | 18 ++++++++++++++++++
> playbooks/roles/bootlinux/tasks/install-deps/main.yml | 6 +++---
> .../roles/bootlinux/tasks/install-deps/redhat/main.yml | 4 ++--
> playbooks/roles/bootlinux/tasks/update-grub/main.yml | 6 +++---
> 4 files changed, 26 insertions(+), 8 deletions(-)
>
> diff --git a/playbooks/roles/bootlinux/tasks/build/9p.yml b/playbooks/roles/bootlinux/tasks/build/9p.yml
> index f390f028..01c95cb7 100644
> --- a/playbooks/roles/bootlinux/tasks/build/9p.yml
> +++ b/playbooks/roles/bootlinux/tasks/build/9p.yml
> @@ -1,4 +1,22 @@
> ---
> +- name: Gather facts from localhost for dependency installation
> + ansible.builtin.setup:
> + filter: "ansible_os_family,ansible_distribution"
> + delegate_to: localhost
> + register: localhost_facts
> + run_once: true
> +
> +- name: Set localhost OS facts for 9P build
> + ansible.builtin.set_fact:
> + localhost_os_family: "{{ localhost_facts.ansible_facts.ansible_os_family }}"
> + localhost_distribution: "{{ localhost_facts.ansible_facts.ansible_distribution }}"
> + delegate_to: localhost
> + run_once: true
> +
> +- name: Refresh target host facts after localhost gathering
> + ansible.builtin.setup:
> + filter: "ansible_os_family,ansible_distribution,ansible_distribution_version"
> +
> - name: Install dependencies to build the Linux kernel
> delegate_to: localhost
> run_once: true
> diff --git a/playbooks/roles/bootlinux/tasks/install-deps/main.yml b/playbooks/roles/bootlinux/tasks/install-deps/main.yml
> index 51a20741..9a9af005 100644
> --- a/playbooks/roles/bootlinux/tasks/install-deps/main.yml
> +++ b/playbooks/roles/bootlinux/tasks/install-deps/main.yml
> @@ -2,14 +2,14 @@
> - name: Debian-specific setup
> ansible.builtin.import_tasks: debian/main.yml
> when:
> - - ansible_os_family == "Debian"
> + - localhost_os_family == "Debian"
>
> - name: SuSE-specific setup
> ansible.builtin.import_tasks: suse/main.yml
> when:
> - - ansible_os_family == "Suse"
> + - localhost_os_family == "Suse"
>
> - name: Red Hat-specific setup
> ansible.builtin.import_tasks: redhat/main.yml
> when:
> - - ansible_os_family == "RedHat"
> + - localhost_os_family == "RedHat"
> diff --git a/playbooks/roles/bootlinux/tasks/install-deps/redhat/main.yml b/playbooks/roles/bootlinux/tasks/install-deps/redhat/main.yml
> index 7f1955bf..589b0b18 100644
> --- a/playbooks/roles/bootlinux/tasks/install-deps/redhat/main.yml
> +++ b/playbooks/roles/bootlinux/tasks/install-deps/redhat/main.yml
> @@ -3,7 +3,7 @@
> ansible.builtin.include_role:
> name: epel-release
> when:
> - - ansible_distribution != "Fedora"
> + - localhost_distribution != "Fedora"
>
> - name: Install packages we care about
> become: true
> @@ -67,7 +67,7 @@
> vars:
> packages:
> - btrfs-progs
> - when: ansible_distribution == 'Fedora'
> + when: localhost_distribution == 'Fedora'
>
> - name: Install clang
> become: true
> diff --git a/playbooks/roles/bootlinux/tasks/update-grub/main.yml b/playbooks/roles/bootlinux/tasks/update-grub/main.yml
> index d0455b00..b05996bf 100644
> --- a/playbooks/roles/bootlinux/tasks/update-grub/main.yml
> +++ b/playbooks/roles/bootlinux/tasks/update-grub/main.yml
> @@ -1,9 +1,9 @@
> ---
> # tasks to install update-grub
> - name: Distro specific update of your GRUB boot file
> - ansible.builtin.import_tasks: debian.yml
> + ansible.builtin.include_tasks: debian.yml
> when: ansible_facts['os_family']|lower == 'debian'
> -- ansible.builtin.import_tasks: suse.yml
> +- ansible.builtin.include_tasks: suse.yml
> when: ansible_facts['os_family']|lower == 'suse'
> -- ansible.builtin.import_tasks: redhat.yml
> +- ansible.builtin.include_tasks: redhat.yml
> when: ansible_facts['os_family']|lower == 'redhat'
>
--
Chuck Lever
^ permalink raw reply [flat|nested] 18+ messages in thread* Re: [PATCH 09/14] bootlinux: fix os detection for 9p delegated tasks with registered facts
2025-10-28 18:51 ` Chuck Lever
@ 2025-10-28 19:53 ` Daniel Gomez
2025-10-28 19:57 ` Chuck Lever
0 siblings, 1 reply; 18+ messages in thread
From: Daniel Gomez @ 2025-10-28 19:53 UTC (permalink / raw)
To: Chuck Lever, Luis Chamberlain; +Cc: kdevops, Daniel Gomez
On 28/10/2025 19.51, Chuck Lever wrote:
> On 10/28/25 2:11 PM, Daniel Gomez wrote:
>> From: Daniel Gomez <da.gomez@samsung.com>
>>
>> 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 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?
>> @@ -1,4 +1,22 @@
>> ---
>> +- name: Gather facts from localhost for dependency installation
>> + ansible.builtin.setup:
>> + filter: "ansible_os_family,ansible_distribution"
>> + delegate_to: localhost
>> + register: localhost_facts
>> + run_once: true
>> +
>> +- name: Set localhost OS facts for 9P build
>> + ansible.builtin.set_fact:
>> + localhost_os_family: "{{ localhost_facts.ansible_facts.ansible_os_family }}"
>> + localhost_distribution: "{{ localhost_facts.ansible_facts.ansible_distribution }}"
>> + delegate_to: localhost
>> + run_once: true
^ permalink raw reply [flat|nested] 18+ messages in thread* Re: [PATCH 09/14] bootlinux: fix os detection for 9p delegated tasks with registered facts
2025-10-28 19:53 ` Daniel Gomez
@ 2025-10-28 19:57 ` Chuck Lever
0 siblings, 0 replies; 18+ messages in thread
From: Chuck Lever @ 2025-10-28 19:57 UTC (permalink / raw)
To: Daniel Gomez, Luis Chamberlain; +Cc: kdevops, Daniel Gomez
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
^ permalink raw reply [flat|nested] 18+ messages in thread
* [PATCH 10/14] guestfs: generate dedora distribution-specific hostname prefixes
2025-10-28 18:11 [PATCH 00/14] Fedora on Debian Daniel Gomez
` (8 preceding siblings ...)
2025-10-28 18:11 ` [PATCH 09/14] bootlinux: fix os detection for 9p delegated tasks with registered facts Daniel Gomez
@ 2025-10-28 18:11 ` Daniel Gomez
2025-10-28 18:11 ` [PATCH 11/14] defconfigs: add fedora-41 fragment for guestfs Daniel Gomez
` (3 subsequent siblings)
13 siblings, 0 replies; 18+ messages in thread
From: Daniel Gomez @ 2025-10-28 18:11 UTC (permalink / raw)
To: Luis Chamberlain, Chuck Lever; +Cc: kdevops, Daniel Gomez
From: Daniel Gomez <da.gomez@samsung.com>
Add GUESTFS_FEDORA_BOX_SHORT configuration to generate version-specific
short prefixes (fedora41, fedora40, fedora39) for Fedora guests,
matching the existing Debian implementation.
Enable HAVE_CUSTOM_DISTRO_HOST_PREFIX and
HAVE_DISTRO_PREFERS_CUSTOM_HOST_PREFIX for Fedora to allow automatic
hostname prefix generation based on the selected Fedora version,
helping distinguish different distribution releases in multi-VM test
environments.
Generated-by: Claude AI
Signed-off-by: Daniel Gomez <da.gomez@samsung.com>
---
kconfigs/Kconfig.guestfs | 9 +++++++++
kconfigs/Kconfig.kdevops | 1 +
2 files changed, 10 insertions(+)
diff --git a/kconfigs/Kconfig.guestfs b/kconfigs/Kconfig.guestfs
index f7601bc9..3bc4b060 100644
--- a/kconfigs/Kconfig.guestfs
+++ b/kconfigs/Kconfig.guestfs
@@ -78,6 +78,8 @@ choice
config GUESTFS_FEDORA
bool "Fedora (or derived distro)"
output yaml
+ select HAVE_CUSTOM_DISTRO_HOST_PREFIX
+ select HAVE_DISTRO_PREFERS_CUSTOM_HOST_PREFIX
select HAVE_DISTRO_XFS_PREFERS_MANUAL if FSTESTS_XFS
select HAVE_DISTRO_BTRFS_PREFERS_MANUAL if FSTESTS_BTRFS
select HAVE_DISTRO_EXT4_PREFERS_MANUAL if FSTESTS_EXT4
@@ -222,6 +224,13 @@ config GUESTFS_DEBIAN_COPY_HOST_SOURCES
endif # GUESTFS_DEBIAN
+config GUESTFS_FEDORA_BOX_SHORT
+ string
+ default "fedora41" if VIRT_BUILDER_OS_VERSION = "fedora-41"
+ default "fedora40" if VIRT_BUILDER_OS_VERSION = "fedora-40"
+ default "fedora39" if VIRT_BUILDER_OS_VERSION = "fedora-39"
+ default "fedora"
+
config VIRT_BUILDER_OS_VERSION
string "virt-builder os-version"
default "fedora-39" if GUESTFS_FEDORA
diff --git a/kconfigs/Kconfig.kdevops b/kconfigs/Kconfig.kdevops
index 1b40db5b..68e91193 100644
--- a/kconfigs/Kconfig.kdevops
+++ b/kconfigs/Kconfig.kdevops
@@ -25,6 +25,7 @@ config HAVE_DISTRO_REQUIRES_CUSTOM_SSH_KEXALGORITHMS
config CUSTOM_DISTRO_HOST_PREFIX
string
depends on HAVE_CUSTOM_DISTRO_HOST_PREFIX
+ default GUESTFS_FEDORA_BOX_SHORT if GUESTFS_FEDORA
default GUESTFS_DEBIAN_BOX_SHORT if GUESTFS_DEBIAN
config CUSTOM_SSH_KEXALGORITHMS
--
2.51.0
^ permalink raw reply related [flat|nested] 18+ messages in thread* [PATCH 11/14] defconfigs: add fedora-41 fragment for guestfs
2025-10-28 18:11 [PATCH 00/14] Fedora on Debian Daniel Gomez
` (9 preceding siblings ...)
2025-10-28 18:11 ` [PATCH 10/14] guestfs: generate dedora distribution-specific hostname prefixes Daniel Gomez
@ 2025-10-28 18:11 ` Daniel Gomez
2025-10-28 18:11 ` [PATCH 12/14] defconfigs: add debian-13 " Daniel Gomez
` (2 subsequent siblings)
13 siblings, 0 replies; 18+ messages in thread
From: Daniel Gomez @ 2025-10-28 18:11 UTC (permalink / raw)
To: Luis Chamberlain, Chuck Lever; +Cc: kdevops, Daniel Gomez
From: Daniel Gomez <da.gomez@samsung.com>
Add configuration fragment for selecting Fedora 41 as the guest OS. This
allows overriding defconfig guest OS choices via merge_config.sh and
enables CI workflows to test Fedora-specific configurations.
Signed-off-by: Daniel Gomez <da.gomez@samsung.com>
---
defconfigs/configs/guestfs-fedora-41.config | 2 ++
1 file changed, 2 insertions(+)
diff --git a/defconfigs/configs/guestfs-fedora-41.config b/defconfigs/configs/guestfs-fedora-41.config
new file mode 100644
index 00000000..bfbd4cf8
--- /dev/null
+++ b/defconfigs/configs/guestfs-fedora-41.config
@@ -0,0 +1,2 @@
+CONFIG_GUESTFS_FEDORA=y
+CONFIG_VIRT_BUILDER_OS_VERSION="fedora-41"
--
2.51.0
^ permalink raw reply related [flat|nested] 18+ messages in thread* [PATCH 12/14] defconfigs: add debian-13 fragment for guestfs
2025-10-28 18:11 [PATCH 00/14] Fedora on Debian Daniel Gomez
` (10 preceding siblings ...)
2025-10-28 18:11 ` [PATCH 11/14] defconfigs: add fedora-41 fragment for guestfs Daniel Gomez
@ 2025-10-28 18:11 ` Daniel Gomez
2025-10-28 18:11 ` [PATCH 13/14] github: add guest OS selection for CI testing Daniel Gomez
2025-10-28 18:11 ` [PATCH 14/14] guestfs: increase SSH config timeout for Fedora on Debian hosts Daniel Gomez
13 siblings, 0 replies; 18+ messages in thread
From: Daniel Gomez @ 2025-10-28 18:11 UTC (permalink / raw)
To: Luis Chamberlain, Chuck Lever; +Cc: kdevops, Daniel Gomez
From: Daniel Gomez <da.gomez@samsung.com>
Add configuration fragment for selecting Debian 13 (Trixie) as the
guest OS. This allows overriding defconfig guest OS choices via
merge_config.sh and enables CI workflows to test Debian-specific
configurations.
Signed-off-by: Daniel Gomez <da.gomez@samsung.com>
---
defconfigs/configs/guestfs-debian-13.config | 2 ++
1 file changed, 2 insertions(+)
diff --git a/defconfigs/configs/guestfs-debian-13.config b/defconfigs/configs/guestfs-debian-13.config
new file mode 100644
index 00000000..b638304a
--- /dev/null
+++ b/defconfigs/configs/guestfs-debian-13.config
@@ -0,0 +1,2 @@
+CONFIG_GUESTFS_DEBIAN=y
+CONFIG_GUESTFS_DEBIAN_TRIXIE=y
--
2.51.0
^ permalink raw reply related [flat|nested] 18+ messages in thread* [PATCH 13/14] github: add guest OS selection for CI testing
2025-10-28 18:11 [PATCH 00/14] Fedora on Debian Daniel Gomez
` (11 preceding siblings ...)
2025-10-28 18:11 ` [PATCH 12/14] defconfigs: add debian-13 " Daniel Gomez
@ 2025-10-28 18:11 ` Daniel Gomez
2025-10-28 18:11 ` [PATCH 14/14] guestfs: increase SSH config timeout for Fedora on Debian hosts Daniel Gomez
13 siblings, 0 replies; 18+ messages in thread
From: Daniel Gomez @ 2025-10-28 18:11 UTC (permalink / raw)
To: Luis Chamberlain, Chuck Lever; +Cc: kdevops, Daniel Gomez
From: Daniel Gomez <da.gomez@samsung.com>
Add manual guest OS selection to GitHub Actions workflows, allowing
testing of distribution-specific fixes across Debian and Fedora
guests. The workflow_dispatch trigger accepts 'default', 'debian-13',
or 'fedora-41', merging the corresponding guestfs config fragment to
override the defconfig's guest OS choice.
This enables validation of cross-distribution compatibility for fixes
like the locale and SELinux changes in this series.
Link: https://lore.kernel.org/kdevops/7e469eeb-1c96-47e2-8a7a-ccf1aa1245fa@kernel.org/
Generated-by: Claude AI
Signed-off-by: Daniel Gomez <da.gomez@samsung.com>
---
.github/actions/configure/action.yml | 22 +++++++++++++++++++++-
.github/workflows/kdevops.yml | 10 ++++++++++
2 files changed, 31 insertions(+), 1 deletion(-)
diff --git a/.github/actions/configure/action.yml b/.github/actions/configure/action.yml
index 68c4e743..9c35b4a6 100644
--- a/.github/actions/configure/action.yml
+++ b/.github/actions/configure/action.yml
@@ -20,6 +20,10 @@ inputs:
required: false
type: string
default: 'kdevops-ci'
+ guest_os:
+ required: false
+ type: string
+ default: 'default'
runs:
using: "composite"
@@ -112,11 +116,27 @@ runs:
echo "Using Linux CI configuration (4GB/8core VMs)"
fi
+ # Configure guest OS if specified
+ GUEST_OS_CONFIG=
+ if [[ "${{ inputs.guest_os }}" != "default" ]]; then
+ GUEST_OS_CONFIG="defconfigs/configs/guestfs-${{ inputs.guest_os }}.config"
+
+ if [[ ! -f "$GUEST_OS_CONFIG" ]]; then
+ echo "Error: Guest OS config not found: $GUEST_OS_CONFIG"
+ exit 1
+ fi
+
+ echo "Using guest OS configuration: $GUEST_OS_CONFIG"
+ else
+ echo "Using default guest OS from defconfig"
+ fi
+
./scripts/kconfig/merge_config.sh \
-n .config \
defconfigs/configs/diy.config \
defconfigs/configs/ci.config \
- ${VM_CONFIG_ARG}
+ ${VM_CONFIG_ARG} \
+ ${GUEST_OS_CONFIG}
- name: Run kdevops make
shell: bash
diff --git a/.github/workflows/kdevops.yml b/.github/workflows/kdevops.yml
index 6fc583c6..d94a7e7f 100644
--- a/.github/workflows/kdevops.yml
+++ b/.github/workflows/kdevops.yml
@@ -88,6 +88,15 @@ on:
options:
- 'kdevops-ci'
- 'linux-ci'
+ guest_os:
+ description: 'Guest OS for testing'
+ required: false
+ default: 'default'
+ type: choice
+ options:
+ - default # Use defconfig's default (typically Debian 13 on debian hosts)
+ - debian-13 # Force Debian 13 Trixie
+ - fedora-41 # Force Fedora 41
tests:
description: 'Custom test to run (for kdevops-ci mode only)'
required: false
@@ -231,6 +240,7 @@ jobs:
uses: ./.github/actions/configure
with:
ci_workflow: ${{ matrix.ci_workflow }}
+ guest_os: ${{ github.event.inputs.guest_os || 'default' }}
kernel_ref: >-
${{
github.event_name == 'schedule' && needs.generate_kernel_ref.outputs.kernel_ref
--
2.51.0
^ permalink raw reply related [flat|nested] 18+ messages in thread* [PATCH 14/14] guestfs: increase SSH config timeout for Fedora on Debian hosts
2025-10-28 18:11 [PATCH 00/14] Fedora on Debian Daniel Gomez
` (12 preceding siblings ...)
2025-10-28 18:11 ` [PATCH 13/14] github: add guest OS selection for CI testing Daniel Gomez
@ 2025-10-28 18:11 ` Daniel Gomez
13 siblings, 0 replies; 18+ messages in thread
From: Daniel Gomez @ 2025-10-28 18:11 UTC (permalink / raw)
To: Luis Chamberlain, Chuck Lever; +Cc: kdevops, Daniel Gomez
From: Daniel Gomez <da.gomez@samsung.com>
Fedora guests running on Debian hosts timeout after 60 seconds while
waiting for network configuration during first boot. The 60-second
timeout is insufficient due to slower boot times caused by SELinux
permissive mode initialization on non-SELinux hosts.
Increase the default timeout from 60 to 180 seconds to
accommodate Fedora boot times. Make the timeout configurable via
KDEVOPS_SSH_CONFIG_TIMEOUT environment variable for flexibility in
different environments.
Improve the error message to include the configured timeout value and
suggest using 'virsh console' for boot diagnostics.
Generated-by: Claude AI
Signed-off-by: Daniel Gomez <da.gomez@samsung.com>
---
scripts/update_ssh_config_guestfs.py | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/scripts/update_ssh_config_guestfs.py b/scripts/update_ssh_config_guestfs.py
index 40f1ccad..0ec32959 100755
--- a/scripts/update_ssh_config_guestfs.py
+++ b/scripts/update_ssh_config_guestfs.py
@@ -33,11 +33,15 @@ ssh_template = """Host {name} {addr}
# We take the first IPv4 address on the first non-loopback interface.
def get_addr(name):
+ # Timeout increased to 180s to account for slower boot times with Fedora guests
+ # on Debian hosts (SELinux permissive mode initialization takes longer).
+ timeout_seconds = int(os.environ.get("KDEVOPS_SSH_CONFIG_TIMEOUT", "180"))
attempt = 0
while True:
attempt += 1
- if attempt > 60:
- raise Exception(f"Unable to get an address for {name} after 60s")
+ if attempt > timeout_seconds:
+ raise Exception(f"Unable to get an address for {name} after {timeout_seconds}s. "
+ f"VM may be taking longer to boot. Check 'virsh console {name}' for boot status.")
result = subprocess.run(
[
--
2.51.0
^ permalink raw reply related [flat|nested] 18+ messages in thread