Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 21 additions & 1 deletion .github/actions/configure/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ inputs:
required: false
type: string
default: 'kdevops-ci'
guest_os:
required: false
type: string
default: 'default'

runs:
using: "composite"
Expand Down Expand Up @@ -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
Expand Down
10 changes: 10 additions & 0 deletions .github/workflows/kdevops.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
7 changes: 0 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions defconfigs/configs/guestfs-debian-13.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
CONFIG_GUESTFS_DEBIAN=y
CONFIG_GUESTFS_DEBIAN_TRIXIE=y
2 changes: 2 additions & 0 deletions defconfigs/configs/guestfs-fedora-41.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
CONFIG_GUESTFS_FEDORA=y
CONFIG_VIRT_BUILDER_OS_VERSION="fedora-41"
58 changes: 30 additions & 28 deletions kconfigs/Kconfig.ansible_provisioning
Original file line number Diff line number Diff line change
Expand Up @@ -37,42 +37,42 @@ 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

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

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

Expand All @@ -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

Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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.
Expand All @@ -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
Expand All @@ -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.
Expand All @@ -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

Expand Down Expand Up @@ -238,20 +238,22 @@ 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"
default ""
output yaml
depends on KDEVOPS_DEVCONFIG_ENABLE_CUSTOM_REPOS=y
help
Comma separated list of custom repositories to be enabled

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
Expand Down
68 changes: 28 additions & 40 deletions kconfigs/Kconfig.guestfs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -118,12 +120,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.
Expand All @@ -132,7 +134,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

Expand Down Expand Up @@ -194,26 +196,26 @@ 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
depends on GUESTFS_DEBIAN_HOST_GUEST_MATCH || GUESTFS_DEBIAN_HOST_UPDATES_GUEST
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.

Expand All @@ -222,35 +224,21 @@ 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.

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_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 GUESTFS_BRINGUP_DEBUG_1
bool "set -euxo pipefile"
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
Enables 'set -euxo pipefile' when running scripts/guestfs_bringup.sh.

endchoice
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.

endif # GUESTFS
1 change: 1 addition & 0 deletions kconfigs/Kconfig.kdevops
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading
Loading