remove vagrant and bootlinux shape up
v2 cover remove vagrant and bootlinux shape up
On this v2 I just dropped the accidental patches which Chuck asked for and merged the fixes onto his patches. That's it.
Chuck Lever (21):
terraform: Clean up the destroy tasks
Switch to the cloud.terraform.terraform module
terraform: Make use of the new "terraform_output" module
terraform: Move "wait_for_connection" out of the terraform playbook
terraform: Remove "delegate_to: localhost"
terraform: Replace scripts/status_terraform.sh
Kconfig: Convert the 9p option to a choice menu
bootlinux: Relocate tasks that select a kernel .config
bootlinux: Simplify tasks that select the kernel .config to build
bootlinux: Select the kernel .config earlier
bootlinux: Move 9p build tasks to a subrole
bootlinux: Move tasks for building on target nodes to a subrole
bootlinux: Clean up a grub set-up task
bootlinux: Harden update-grub/install.yml
Add a guest/instance for building the test kernel
bootlinux: Add a new builder choice
workflows: Add a kconfig setting for installing kernels via package
bootlinux: Enclose tasks to find kernel release name in a block:
bootlinux: Pick up kernel release info for pre-built packages
bootlinux: Install pre-built kernels from packages
bootlinux: Add an option to build with clang instead of gcc
Luis Chamberlain (12):
vagrant: remove entire vagrant configuration directory
kconfigs: fix Kconfig references after vagrant removal
scripts: remove Vagrant-specific scripts and Makefiles
playbooks: remove Vagrant-specific playbooks and roles
gitignore: remove Vagrant-specific ignore patterns
docs: remove Vagrant-specific documentation files Remove all remaining Vagrant references from codebase
bootlinux: fix making 9p default if using libvirt
Makefile: add make style for style checking CLAUDE.md: new workflow guide for hosts and nodes CLAUDE.md: add don't BS rules
gen_nodes/gen_hosts: avoid usage of fs_config_path on task names
.gitignore | 5 - CLAUDE.md | 720 ++++++++++++++++++ ...e => Kconfig.passthrough_libvirt.generated | 0 Makefile | 12 +- Makefile.kdevops | 32 +- Makefile.subtrees | 4 +- docs/custom-vagrant-boxes.md | 581 -------------- docs/kdevops-vagrant.md | 130 ---- docs/the-gen-nodes-ansible-role-vagrant.md | 78 -- docs/why-vagrant.md | 66 -- kconfigs/Kconfig.ansible_provisioning | 3 +- kconfigs/Kconfig.bringup | 11 +- kconfigs/Kconfig.hypervisor | 4 +- kconfigs/Kconfig.kdevops | 5 - kconfigs/Kconfig.kernel-ci | 5 +- kconfigs/Kconfig.libvirt | 73 +- kconfigs/Kconfig.libvirt.largeio | 2 +- kconfigs/Kconfig.ssh | 6 +- kconfigs/workflows/Kconfig | 18 + kconfigs/workflows/Kconfig.data_partition | 8 +- kconfigs/workflows/Kconfig.shared | 4 - kdevops-ci | 1 + playbooks/install_vagrant_boxes.yml | 5 - .../blktests/augment_expunge_list.py | 3 +- .../workflows/fstests/augment_expunge_list.py | 5 +- playbooks/roles/bootlinux/defaults/main.yml | 16 +- playbooks/roles/bootlinux/tasks/build/9p.yml | 205 +++++ .../roles/bootlinux/tasks/build/builder.yml | 264 +++++++ .../roles/bootlinux/tasks/build/targets.yml | 125 +++ playbooks/roles/bootlinux/tasks/config.yml | 38 + .../tasks/install-deps/redhat/main.yml | 34 + .../install-minimal-deps/debian/main.yml | 19 + .../tasks/install-minimal-deps/main.yml | 15 + .../install-minimal-deps/redhat/main.yml | 27 + .../tasks/install-minimal-deps/suse/main.yml | 13 + .../bootlinux/tasks/install/packages.yml | 41 + playbooks/roles/bootlinux/tasks/main.yml | 477 +----------- .../bootlinux/tasks/update-grub/install.yml | 128 +++- playbooks/roles/devconfig/defaults/main.yml | 2 +- .../devconfig/scripts/prepare_suse_repos.sh | 2 +- playbooks/roles/gen_hosts/defaults/main.yml | 3 + playbooks/roles/gen_hosts/tasks/main.yml | 16 +- .../roles/gen_hosts/templates/builder.j2 | 13 + playbooks/roles/gen_nodes/defaults/main.yml | 14 +- playbooks/roles/gen_nodes/tasks/main.yml | 24 +- .../roles/gen_nodes/templates/Vagrantfile.j2 | 478 ------------ .../kdevops_nodes_split_start.j2.yaml | 171 ----- .../roles/gen_pci_kconfig/tasks/main.yml | 2 +- .../roles/guestfs/tasks/bringup/main.yml | 10 + .../roles/install_vagrant_boxes/README.md | 46 -- .../install_vagrant_boxes/defaults/main.yml | 6 - .../scripts/add-box-if-missing.sh | 48 -- .../install_vagrant_boxes/tasks/main.yml | 49 -- playbooks/roles/terraform/tasks/main.yml | 70 +- .../roles/terraform/templates/ssh_config.j2 | 4 +- .../roles/update_ssh_config_vagrant/README.md | 66 -- .../defaults/main.yml | 13 - .../python/update_ssh_config.py | 1 - .../update_ssh_config_vagrant/tasks/main.yml | 69 -- .../update_ssh_config/.gitignore | 6 - .../update_ssh_config/.travis.yml | 12 - .../update_ssh_config/CONTRIBUTING | 49 -- .../update_ssh_config/LICENSE | 239 ------ .../update_ssh_config/Makefile | 15 - .../update_ssh_config/README.md | 159 ---- .../test_update_ssh_config.py | 417 ---------- .../tests/0001_remove_hosts_top.orig | 53 -- .../tests/0001_remove_hosts_top.res | 33 - .../tests/0002_remove_hosts_middle.orig | 53 -- .../tests/0002_remove_hosts_middle.res | 33 - .../tests/0003_remove_hosts_bottom.orig | 53 -- .../tests/0003_remove_hosts_bottom.res | 33 - .../tests/0004_remove_hosts_missing.orig | 33 - .../tests/0004_remove_hosts_missing.res | 33 - .../tests/0005_remove_hosts_similar.orig | 53 -- .../tests/0005_remove_hosts_similar.res | 53 -- .../tests/0006_add_hosts_manual.orig | 33 - .../tests/0006_add_hosts_manual.res | 53 -- ..._remove_hosts_two_separate_ops_top.add.res | 53 -- ...add_remove_hosts_two_separate_ops_top.orig | 53 -- ...move_hosts_two_separate_ops_top.remove.res | 33 - .../0008_add_remove_hosts_one_shot_top.orig | 1 - .../0008_add_remove_hosts_one_shot_top.res | 1 - ..._hosts_vagrant_emulate_top.emulate_vagrant | 20 - .../0009_add_hosts_vagrant_emulate_top.orig | 1 - .../0009_add_hosts_vagrant_emulate_top.res | 53 -- ...rithms_vagrant_emulate_top.emulate_vagrant | 20 - ...sts_kexalgorithms_vagrant_emulate_top.orig | 53 -- ...osts_kexalgorithms_vagrant_emulate_top.res | 55 -- ...two_separate_ops_kexalgorithms_top.add.res | 55 -- ...ts_two_separate_ops_kexalgorithms_top.orig | 53 -- ..._separate_ops_kexalgorithms_top.remove.res | 33 - .../0012_add_remove_hosts_empty_file.res | 20 - .../update_ssh_config/update_ssh_config.py | 325 -------- .../update_ssh_config_vagrant/vars/main.yml | 1 - playbooks/terraform.yml | 3 +- playbooks/update_ssh_config_vagrant.yml | 4 - scripts/bringup.Makefile | 3 - scripts/bringup_vagrant.sh | 101 --- scripts/check_commit_format.py | 85 +++ scripts/check_distro_kconfig.sh | 6 +- scripts/check_pciepassthrough_kconfig.sh | 6 +- scripts/ci.Makefile | 8 + scripts/destroy_vagrant.sh | 30 - scripts/detect_whitespace_issues.py | 109 +++ scripts/dynamic-pci-kconfig.Makefile | 4 +- scripts/fix_whitespace_issues.py | 137 ++++ scripts/gen-nodes.Makefile | 5 - scripts/get-distro-default-bridge.sh | 11 +- scripts/provision.Makefile | 4 - scripts/prune_stale_vagrant.sh | 164 ---- scripts/status_terraform.sh | 17 - scripts/terraform.Makefile | 12 +- scripts/tests.Makefile | 1 - scripts/vagrant.Makefile | 109 --- scripts/workflows/generic/run_kernel_ci.sh | 4 +- terraform/azure/main.tf | 2 +- vagrant/.gitignore | 2 - vagrant/Kconfig | 295 ------- vagrant/Kconfig.debian | 46 -- vagrant/Kconfig.fedora | 29 - vagrant/Kconfig.kdevops | 42 - vagrant/Kconfig.opensuse | 144 ---- vagrant/Kconfig.pcie_passthrough_libvirt | 53 -- workflows/blktests/Kconfig | 9 +- workflows/demos/reboot-limit/Makefile | 2 +- workflows/fstests/Kconfig | 2 - .../xfs/unassigned/fstests-next-20230515 | 347 --------- workflows/fstests/xfs/Kconfig | 2 - workflows/linux/Kconfig | 90 ++- workflows/linux/Kconfig.linus | 1 - workflows/linux/Kconfig.mcgrof | 1 - workflows/linux/Kconfig.modules | 1 - workflows/linux/Kconfig.next | 1 - workflows/linux/Kconfig.stable | 1 - workflows/linux/Kconfig.vfs | 1 - workflows/linux/Kconfig.xfs | 1 - workflows/linux/Makefile | 5 +- 138 files changed, 2276 insertions(+), 6157 deletions(-) rename vagrant/Kconfig.suse => Kconfig.passthrough_libvirt.generated (100%) delete mode 100644 docs/custom-vagrant-boxes.md delete mode 100644 docs/kdevops-vagrant.md delete mode 100644 docs/the-gen-nodes-ansible-role-vagrant.md delete mode 100644 docs/why-vagrant.md create mode 160000 kdevops-ci delete mode 100644 playbooks/install_vagrant_boxes.yml create mode 100644 playbooks/roles/bootlinux/tasks/build/9p.yml create mode 100644 playbooks/roles/bootlinux/tasks/build/builder.yml create mode 100644 playbooks/roles/bootlinux/tasks/build/targets.yml create mode 100644 playbooks/roles/bootlinux/tasks/config.yml create mode 100644 playbooks/roles/bootlinux/tasks/install-minimal-deps/debian/main.yml create mode 100644 playbooks/roles/bootlinux/tasks/install-minimal-deps/main.yml create mode 100644 playbooks/roles/bootlinux/tasks/install-minimal-deps/redhat/main.yml create mode 100644 playbooks/roles/bootlinux/tasks/install-minimal-deps/suse/main.yml create mode 100644 playbooks/roles/bootlinux/tasks/install/packages.yml create mode 100644 playbooks/roles/gen_hosts/templates/builder.j2 delete mode 100644 playbooks/roles/gen_nodes/templates/Vagrantfile.j2 delete mode 100644 playbooks/roles/gen_nodes/templates/kdevops_nodes_split_start.j2.yaml delete mode 100644 playbooks/roles/install_vagrant_boxes/README.md delete mode 100644 playbooks/roles/install_vagrant_boxes/defaults/main.yml delete mode 100755 playbooks/roles/install_vagrant_boxes/scripts/add-box-if-missing.sh delete mode 100644 playbooks/roles/install_vagrant_boxes/tasks/main.yml delete mode 100644 playbooks/roles/update_ssh_config_vagrant/README.md delete mode 100644 playbooks/roles/update_ssh_config_vagrant/defaults/main.yml delete mode 120000 playbooks/roles/update_ssh_config_vagrant/python/update_ssh_config.py delete mode 100644 playbooks/roles/update_ssh_config_vagrant/tasks/main.yml delete mode 100644 playbooks/roles/update_ssh_config_vagrant/update_ssh_config/.gitignore delete mode 100644 playbooks/roles/update_ssh_config_vagrant/update_ssh_config/.travis.yml delete mode 100644 playbooks/roles/update_ssh_config_vagrant/update_ssh_config/CONTRIBUTING delete mode 100644 playbooks/roles/update_ssh_config_vagrant/update_ssh_config/LICENSE delete mode 100644 playbooks/roles/update_ssh_config_vagrant/update_ssh_config/Makefile delete mode 100644 playbooks/roles/update_ssh_config_vagrant/update_ssh_config/README.md delete mode 100755 playbooks/roles/update_ssh_config_vagrant/update_ssh_config/test_update_ssh_config.py delete mode 100644 playbooks/roles/update_ssh_config_vagrant/update_ssh_config/tests/0001_remove_hosts_top.orig delete mode 100644 playbooks/roles/update_ssh_config_vagrant/update_ssh_config/tests/0001_remove_hosts_top.res delete mode 100644 playbooks/roles/update_ssh_config_vagrant/update_ssh_config/tests/0002_remove_hosts_middle.orig delete mode 100644 playbooks/roles/update_ssh_config_vagrant/update_ssh_config/tests/0002_remove_hosts_middle.res delete mode 100644 playbooks/roles/update_ssh_config_vagrant/update_ssh_config/tests/0003_remove_hosts_bottom.orig delete mode 100644 playbooks/roles/update_ssh_config_vagrant/update_ssh_config/tests/0003_remove_hosts_bottom.res delete mode 100644 playbooks/roles/update_ssh_config_vagrant/update_ssh_config/tests/0004_remove_hosts_missing.orig delete mode 100644 playbooks/roles/update_ssh_config_vagrant/update_ssh_config/tests/0004_remove_hosts_missing.res delete mode 100644 playbooks/roles/update_ssh_config_vagrant/update_ssh_config/tests/0005_remove_hosts_similar.orig delete mode 100644 playbooks/roles/update_ssh_config_vagrant/update_ssh_config/tests/0005_remove_hosts_similar.res delete mode 100644 playbooks/roles/update_ssh_config_vagrant/update_ssh_config/tests/0006_add_hosts_manual.orig delete mode 100644 playbooks/roles/update_ssh_config_vagrant/update_ssh_config/tests/0006_add_hosts_manual.res delete mode 100644 playbooks/roles/update_ssh_config_vagrant/update_ssh_config/tests/0007_add_remove_hosts_two_separate_ops_top.add.res delete mode 100644 playbooks/roles/update_ssh_config_vagrant/update_ssh_config/tests/0007_add_remove_hosts_two_separate_ops_top.orig delete mode 100644 playbooks/roles/update_ssh_config_vagrant/update_ssh_config/tests/0007_add_remove_hosts_two_separate_ops_top.remove.res delete mode 120000 playbooks/roles/update_ssh_config_vagrant/update_ssh_config/tests/0008_add_remove_hosts_one_shot_top.orig delete mode 120000 playbooks/roles/update_ssh_config_vagrant/update_ssh_config/tests/0008_add_remove_hosts_one_shot_top.res delete mode 100644 playbooks/roles/update_ssh_config_vagrant/update_ssh_config/tests/0009_add_hosts_vagrant_emulate_top.emulate_vagrant delete mode 120000 playbooks/roles/update_ssh_config_vagrant/update_ssh_config/tests/0009_add_hosts_vagrant_emulate_top.orig delete mode 100644 playbooks/roles/update_ssh_config_vagrant/update_ssh_config/tests/0009_add_hosts_vagrant_emulate_top.res delete mode 100644 playbooks/roles/update_ssh_config_vagrant/update_ssh_config/tests/0010_add_hosts_kexalgorithms_vagrant_emulate_top.emulate_vagrant delete mode 100644 playbooks/roles/update_ssh_config_vagrant/update_ssh_config/tests/0010_add_hosts_kexalgorithms_vagrant_emulate_top.orig delete mode 100644 playbooks/roles/update_ssh_config_vagrant/update_ssh_config/tests/0010_add_hosts_kexalgorithms_vagrant_emulate_top.res delete mode 100644 playbooks/roles/update_ssh_config_vagrant/update_ssh_config/tests/0011_add_remove_hosts_two_separate_ops_kexalgorithms_top.add.res delete mode 100644 playbooks/roles/update_ssh_config_vagrant/update_ssh_config/tests/0011_add_remove_hosts_two_separate_ops_kexalgorithms_top.orig delete mode 100644 playbooks/roles/update_ssh_config_vagrant/update_ssh_config/tests/0011_add_remove_hosts_two_separate_ops_kexalgorithms_top.remove.res delete mode 100644 playbooks/roles/update_ssh_config_vagrant/update_ssh_config/tests/0012_add_remove_hosts_empty_file.res delete mode 100755 playbooks/roles/update_ssh_config_vagrant/update_ssh_config/update_ssh_config.py delete mode 100644 playbooks/roles/update_ssh_config_vagrant/vars/main.yml delete mode 100644 playbooks/update_ssh_config_vagrant.yml delete mode 100755 scripts/bringup_vagrant.sh create mode 100755 scripts/check_commit_format.py delete mode 100755 scripts/destroy_vagrant.sh create mode 100755 scripts/detect_whitespace_issues.py create mode 100755 scripts/fix_whitespace_issues.py delete mode 100755 scripts/prune_stale_vagrant.sh delete mode 100755 scripts/status_terraform.sh delete mode 100644 scripts/vagrant.Makefile delete mode 100644 vagrant/.gitignore delete mode 100644 vagrant/Kconfig delete mode 100644 vagrant/Kconfig.debian delete mode 100644 vagrant/Kconfig.fedora delete mode 100644 vagrant/Kconfig.kdevops delete mode 100644 vagrant/Kconfig.opensuse delete mode 100644 vagrant/Kconfig.pcie_passthrough_libvirt delete mode 100644 workflows/fstests/expunges/6.4.0-rc2-next-20230515/xfs/unassigned/fstests-next-20230515
Signature · 1 line
2.47.2
PATCH v2 1/33 vagrant: remove entire vagrant configuration directory
Remove the complete vagrant/ directory and all its configuration files as Vagrant support has been removed from kdevops. This includes:
- Kconfig files for various distributions
- PCIe passthrough configurations
- Main Vagrant configuration
--- vagrant/.gitignore | 2 - vagrant/Kconfig | 295 ----------------------- vagrant/Kconfig.debian | 46 ---- vagrant/Kconfig.fedora | 29 --- vagrant/Kconfig.kdevops | 42 ---- vagrant/Kconfig.opensuse | 144 ----------- vagrant/Kconfig.pcie_passthrough_libvirt | 53 ---- vagrant/Kconfig.suse | 0 8 files changed, 611 deletions(-) delete mode 100644 vagrant/.gitignore delete mode 100644 vagrant/Kconfig delete mode 100644 vagrant/Kconfig.debian delete mode 100644 vagrant/Kconfig.fedora delete mode 100644 vagrant/Kconfig.kdevops delete mode 100644 vagrant/Kconfig.opensuse delete mode 100644 vagrant/Kconfig.pcie_passthrough_libvirt delete mode 100644 vagrant/Kconfig.suse
vagrant/.gitignore deleted +0 -2
@@ -1,2 +0,0 @@ -.vagrant -*.img
vagrant/Kconfig deleted +0 -295
295 lines not on this page · raw message
vagrant/Kconfig.debian deleted +0 -46
46 lines not on this page · raw message
vagrant/Kconfig.fedora deleted +0 -29
@@ -1,29 +0,0 @@ -# SPDX-License-Identifier: copyleft-next-0.3.1 -if VAGRANT_FEDORA - -config VAGRANT_FEDORA_BOX_STRING - string "Vagrant box string" - default "fedora/38-cloud-base" - help - This is the box string that vagrant should use. This is typically - something like fedora/??-cloud-base or generic/rhel?. We default - to the latest Fedora cloud-base release. - -config VAGRANT_FEDORA_OLD_RELEASE - bool "Is this an old release (pre-Fedora 32)?" - default n - help - XFS on older Fedora releases lacked support for certain - features. Enabling this will disable testing certain - configurations by default in the fstests workflow. - -config VAGRANT_FEDORA_NEW_RELEASE - bool - default y - depends on !VAGRANT_FEDORA_OLD_RELEASE - select HAVE_DISTRO_XFS_SUPPORTS_CRC if FSTESTS_XFS - select HAVE_DISTRO_XFS_SUPPORTS_EXTERNAL_LOG if FSTESTS_XFS - select HAVE_DISTRO_XFS_SUPPORTS_REFLINKS if FSTESTS_XFS - select HAVE_DISTRO_XFS_SUPPORTS_BIGBLOCKS if FSTESTS_XFS - -endif # VAGRANT_FEDORA
vagrant/Kconfig.kdevops deleted +0 -42
42 lines not on this page · raw message
vagrant/Kconfig.opensuse deleted +0 -144
144 lines not on this page · raw message
vagrant/Kconfig.pcie_passthrough_libvirt deleted +0 -53
53 lines not on this page · raw message
vagrant/Kconfig.suse deleted +0 -0
Signature · 1 line
2.47.2
PATCH v2 2/33 kconfigs: fix Kconfig references after vagrant removal
In reply to Luis ChamberlainRemove Vagrant references from Kconfig files that were causing build failures after the vagrant directory was removed:
- Remove vagrant/Kconfig source line from Kconfig.bringup
- Remove VAGRANT_LIBVIRT_SELECT dependency from LIBVIRT config
- Remove PCIe passthrough Vagrant references from Kconfig.libvirt
- Remove VAGRANT-dependent machine type options
- Update help text to remove Vagrant mentions
--- kconfigs/Kconfig.bringup | 11 +++++------ kconfigs/Kconfig.libvirt | 20 -------------------- 2 files changed, 5 insertions(+), 26 deletions(-)
kconfigs/Kconfig.bringup +5 -6
@@ -14,8 +14,8 @@ config GUESTFS select KDEVOPS_ENABLE_GUESTFS select EXTRA_STORAGE_SUPPORTS_LARGEIO help - This option will use libguestfs utilities instead of Vagrant to build - guest images and spin them up using libvirt with KVM. + This option will use libguestfs utilities to build guest images and + spin them up using libvirt with KVM. config TERRAFORM bool "Terraform for cloud environments"
@@ -24,8 +24,8 @@ config TERRAFORM select EXTRA_STORAGE_SUPPORTS_2K select EXTRA_STORAGE_SUPPORTS_4K help - This option will enable use of Vagrant. Enable this if you want to - use terraform to create nodes on a cloud environment such as: + Enable this if you want to use terraform to create nodes on a cloud + environment such as: * Azure * AWS
@@ -55,11 +55,10 @@ endchoice config LIBVIRT bool - depends on VAGRANT_LIBVIRT_SELECT || GUESTFS + depends on GUESTFS default y source "kconfigs/Kconfig.guestfs" -source "vagrant/Kconfig" source "terraform/Kconfig" if LIBVIRT source "kconfigs/Kconfig.libvirt"
kconfigs/Kconfig.libvirt +0 -20
@@ -463,32 +463,12 @@ config HAVE_LIBVIRT_PCIE_PASSTHROUGH bool default $(shell, scripts/check_pciepassthrough_kconfig.sh passthrough_libvirt.generated) -if HAVE_LIBVIRT_PCIE_PASSTHROUGH -source "vagrant/Kconfig.pcie_passthrough_libvirt" -endif # HAVE_LIBVIRT_PCIE_PASSTHROUGH choice prompt "Machine type to use" default LIBVIRT_MACHINE_TYPE_Q35 if TARGET_ARCH_X86_64 default LIBVIRT_MACHINE_TYPE_VIRT if TARGET_ARCH_ARM64 -config LIBVIRT_MACHINE_TYPE_DEFAULT - bool "Use the default machine type" - depends on VAGRANT - help - Use whatever default the guest was intended to use. This will either - be the machine type used at virt-install time or some other default - by QEMU / libvirt. This is important for backward compatibility with - older kernels. For example if you enable q35 on an old kernel the old - kernel may not boot. For details refer to kdevops commit 83952e2e532e - ("vagrant/kdevops_nodes.yaml.in: remove machine_type)". - - It would seem today's default for libvirt is to still use "pc" which - is the old i440x, so you will not get PCIe support. - - We only want to support PCI-E capable guests with libguest so the - default is not allowed on libguest. - config LIBVIRT_MACHINE_TYPE_Q35 bool "q35" depends on TARGET_ARCH_X86_64
Signature · 1 line
2.47.2
PATCH v2 3/33 scripts: remove Vagrant-specific scripts and Makefiles
In reply to Luis ChamberlainRemove all Vagrant-related scripts as Vagrant support has been removed:
- vagrant.Makefile - Vagrant build targets
- bringup_vagrant.sh - Vagrant VM bringup script
- destroy_vagrant.sh - Vagrant VM cleanup script
- prune_stale_vagrant.sh - Vagrant state cleanup script
--- scripts/bringup_vagrant.sh | 101 -------------------- scripts/destroy_vagrant.sh | 30 ------ scripts/prune_stale_vagrant.sh | 164 --------------------------------- scripts/vagrant.Makefile | 109 ---------------------- 4 files changed, 404 deletions(-) delete mode 100755 scripts/bringup_vagrant.sh delete mode 100755 scripts/destroy_vagrant.sh delete mode 100755 scripts/prune_stale_vagrant.sh delete mode 100644 scripts/vagrant.Makefile
scripts/bringup_vagrant.sh deleted +0 -101
@@ -1,101 +0,0 @@ -#!/bin/bash -# SPDX-License-Identifier: copyleft-next-0.3.1 - -set -e - -source ${TOPDIR}/.config -source ${TOPDIR}/scripts/lib.sh - -# Convert the version string x.y.z to a canonical 5 or 6-digit form. -# Inspired by ld-version.sh on linux. This is the way. -get_canonical_version() -{ - IFS=. - set -- $1 - - # If the 2nd or 3rd field is missing, fill it with a zero. - # - # The 4th field, if present, is ignored. - # This occurs in development snapshots as in 2.35.1.20201116 - echo $((10000 * $1 + 100 * ${2:-0} + ${3:-0})) -} - -_vagrant_lacks_parallel() -{ - PARALLEL_MISSING="0.7.0" - VAGRANT_LIBVIRT_VERSION="$(vagrant plugin list | sed -e 's|(| |g' | sed -e 's|,| |g' | awk '{print $2}')" - - OLD=$(get_canonical_version $PARALLEL_MISSING) - CURRENT=$(get_canonical_version $VAGRANT_LIBVIRT_VERSION) - if [[ "$CURRENT" -le "$OLD" ]]; then - return 1 - fi - return 0 -} - -vagrant_check_dups() -{ - NEW_POSSIBLE_INSTANCES=$(vagrant status --machine-readable | grep ",state," | awk -F"," '{print $2}') - EXISTING_USER_INSTANCES=$(vagrant global-status | grep -A 200 -e "-----" | grep -v -e "----" | grep -B 200 " " | awk '{print $2}') - for instance in $NEW_POSSIBLE_INSTANCES ; do - INSTANCE_STATE=$(vagrant status --machine-readable | grep ",state," | awk -F",${instance}," '{print $2}' |awk -F"," '{print $2}') - # We're dealing with a new local instance which is not created - # yet. Now we check to see if globally this user doesn't have - # an existing instance already created. - if [[ "$INSTANCE_STATE" == "not_created" ]]; then - INSTANCE_NEW="true" - for old_instance in $EXISTING_USER_INSTANCES; do - # An older instance already exists, complain - if [[ "$instance" == "$old_instance" ]]; then - INSTANCE_NEW="false" - break - fi - done - # At this point we're only dealing with not_created - # instances *and* we know one does not exist in another - # directory for this user. - - kdevops_pool_path="$CONFIG_LIBVIRT_STORAGE_POOL_PATH" - # For libvirt we can do one more global sanity check - if [[ "$CONFIG_LIBVIRT" == "y" ]]; then - possible_image="${kdevops_pool_path}/vagrant_${instance}.img" - if [[ -f $possible_image ]]; then - echo "Image for instance $instance already exists ($possible_image), skippin bringup wipe of spare drives ..." - continue - fi - fi - - # If we don't do this, old spare drives might be - # left over and we'd be using them up again. - spare_drive_instance_dir="${kdevops_pool_path}/kdevops/$instance" - if [[ -d ${spare_drive_instance_dir} ]]; then - echo "Wiping old instance spare drive directory ... $spare_drive_instance_dir" - rm -rf ${kdevops_pool_path}/kdevops/$instance - fi - fi - done -} - -# This is just a workaround for fedora since we have an old vagrant-libvirt -# plugin that doesn't work with parallel -ARG= -if ! _vagrant_lacks_parallel; then - ARG='--no-parallel' -fi -cd vagrant -if [[ "$CONFIG_VAGRANT_BOX_UPDATE_ON_BRINGUP" == "y" ]]; then - if [[ ! -f $(basename "$KDEVOPS_VAGRANT_PROVISIONED") ]]; then - vagrant box update - fi -fi -if [[ "$CONFIG_VAGRANT_VALIDATE_BEFORE_BRINGUP" == "y" ]]; then - vagrant validate - if [[ $? -ne 0 ]]; then - echo "kdevops: Failed to validate Vagrantfile, stopping here" - exit 1 - fi -fi - -vagrant_check_dups - -vagrant up $ARG
scripts/destroy_vagrant.sh deleted +0 -30
@@ -1,30 +0,0 @@ -#!/bin/bash -# SPDX-License-Identifier: copyleft-next-0.3.1 - -set -e - -source ${TOPDIR}/.config -source ${TOPDIR}/scripts/lib.sh - -cd vagrant -vagrant destroy -f -# Make sure the user can nuke this stuff -sudo chgrp $USER . .vagrant -sudo chmod g+rwx . .vagrant -rm -rf .vagrant - -# These are not initilized instances, our current directory possible -# instances. If you're running 'make destroy' you know what you are -# doing so we don't check for global dups or anything like that. -UNINIT_CURRENT_INSTANCES=$(vagrant status --machine-readable | grep ",state," | grep not_created | awk -F "," '{print $2}') -for i in $UNINIT_CURRENT_INSTANCES; do - UNINIT_INSTANCE_SPARE_DRIVE_DIR="${CONFIG_LIBVIRT_STORAGE_POOL_PATH}/kdevops/$i" - if [[ -d $UNINIT_INSTANCE_SPARE_DRIVE_DIR ]]; then - echo "Found unitialized (possibly old) instance spare drive directory, removing it ... $i" - rm -rf $UNINIT_INSTANCE_SPARE_DRIVE_DIR - fi -done - -if [[ -f $(basename "$KDEVOPS_VAGRANT_PROVISIONED") ]]; then - rm -f $(basename "$KDEVOPS_VAGRANT_PROVISIONED") ]]; -fi
scripts/prune_stale_vagrant.sh deleted +0 -164
164 lines not on this page · raw message
scripts/vagrant.Makefile deleted +0 -109
109 lines not on this page · raw message
Signature · 1 line
2.47.2
PATCH v2 4/33 playbooks: remove Vagrant-specific playbooks and roles
In reply to Luis ChamberlainRemove all Vagrant-related Ansible playbooks and roles:
- install_vagrant_boxes.yml playbook and role
- update_ssh_config_vagrant.yml playbook and role
- Vagrantfile.j2 template from gen_nodes role
This removes the complete Vagrant integration from the Ansible provisioning system.
--- playbooks/install_vagrant_boxes.yml | 5 - .../roles/gen_nodes/templates/Vagrantfile.j2 | 478 ------------------ .../roles/install_vagrant_boxes/README.md | 46 -- .../install_vagrant_boxes/defaults/main.yml | 6 - .../scripts/add-box-if-missing.sh | 48 -- .../install_vagrant_boxes/tasks/main.yml | 49 -- .../roles/update_ssh_config_vagrant/README.md | 66 --- .../defaults/main.yml | 13 - .../python/update_ssh_config.py | 1 - .../update_ssh_config_vagrant/tasks/main.yml | 69 --- .../update_ssh_config/.gitignore | 6 - .../update_ssh_config/.travis.yml | 12 - .../update_ssh_config/CONTRIBUTING | 49 -- .../update_ssh_config/LICENSE | 239 --------- .../update_ssh_config/Makefile | 15 - .../update_ssh_config/README.md | 159 ------ .../test_update_ssh_config.py | 417 --------------- .../tests/0001_remove_hosts_top.orig | 53 -- .../tests/0001_remove_hosts_top.res | 33 -- .../tests/0002_remove_hosts_middle.orig | 53 -- .../tests/0002_remove_hosts_middle.res | 33 -- .../tests/0003_remove_hosts_bottom.orig | 53 -- .../tests/0003_remove_hosts_bottom.res | 33 -- .../tests/0004_remove_hosts_missing.orig | 33 -- .../tests/0004_remove_hosts_missing.res | 33 -- .../tests/0005_remove_hosts_similar.orig | 53 -- .../tests/0005_remove_hosts_similar.res | 53 -- .../tests/0006_add_hosts_manual.orig | 33 -- .../tests/0006_add_hosts_manual.res | 53 -- ..._remove_hosts_two_separate_ops_top.add.res | 53 -- ...add_remove_hosts_two_separate_ops_top.orig | 53 -- ...move_hosts_two_separate_ops_top.remove.res | 33 -- .../0008_add_remove_hosts_one_shot_top.orig | 1 - .../0008_add_remove_hosts_one_shot_top.res | 1 - ..._hosts_vagrant_emulate_top.emulate_vagrant | 20 - .../0009_add_hosts_vagrant_emulate_top.orig | 1 - .../0009_add_hosts_vagrant_emulate_top.res | 53 -- ...rithms_vagrant_emulate_top.emulate_vagrant | 20 - ...sts_kexalgorithms_vagrant_emulate_top.orig | 53 -- ...osts_kexalgorithms_vagrant_emulate_top.res | 55 -- ...two_separate_ops_kexalgorithms_top.add.res | 55 -- ...ts_two_separate_ops_kexalgorithms_top.orig | 53 -- ..._separate_ops_kexalgorithms_top.remove.res | 33 -- .../0012_add_remove_hosts_empty_file.res | 20 - .../update_ssh_config/update_ssh_config.py | 325 ------------ .../update_ssh_config_vagrant/vars/main.yml | 1 - playbooks/update_ssh_config_vagrant.yml | 4 - 47 files changed, 3028 deletions(-) delete mode 100644 playbooks/install_vagrant_boxes.yml delete mode 100644 playbooks/roles/gen_nodes/templates/Vagrantfile.j2 delete mode 100644 playbooks/roles/install_vagrant_boxes/README.md delete mode 100644 playbooks/roles/install_vagrant_boxes/defaults/main.yml delete mode 100755 playbooks/roles/install_vagrant_boxes/scripts/add-box-if-missing.sh delete mode 100644 playbooks/roles/install_vagrant_boxes/tasks/main.yml delete mode 100644 playbooks/roles/update_ssh_config_vagrant/README.md delete mode 100644 playbooks/roles/update_ssh_config_vagrant/defaults/main.yml delete mode 120000 playbooks/roles/update_ssh_config_vagrant/python/update_ssh_config.py delete mode 100644 playbooks/roles/update_ssh_config_vagrant/tasks/main.yml delete mode 100644 playbooks/roles/update_ssh_config_vagrant/update_ssh_config/.gitignore delete mode 100644 playbooks/roles/update_ssh_config_vagrant/update_ssh_config/.travis.yml delete mode 100644 playbooks/roles/update_ssh_config_vagrant/update_ssh_config/CONTRIBUTING delete mode 100644 playbooks/roles/update_ssh_config_vagrant/update_ssh_config/LICENSE delete mode 100644 playbooks/roles/update_ssh_config_vagrant/update_ssh_config/Makefile delete mode 100644 playbooks/roles/update_ssh_config_vagrant/update_ssh_config/README.md delete mode 100755 playbooks/roles/update_ssh_config_vagrant/update_ssh_config/test_update_ssh_config.py delete mode 100644 playbooks/roles/update_ssh_config_vagrant/update_ssh_config/tests/0001_remove_hosts_top.orig delete mode 100644 playbooks/roles/update_ssh_config_vagrant/update_ssh_config/tests/0001_remove_hosts_top.res delete mode 100644 playbooks/roles/update_ssh_config_vagrant/update_ssh_config/tests/0002_remove_hosts_middle.orig delete mode 100644 playbooks/roles/update_ssh_config_vagrant/update_ssh_config/tests/0002_remove_hosts_middle.res delete mode 100644 playbooks/roles/update_ssh_config_vagrant/update_ssh_config/tests/0003_remove_hosts_bottom.orig delete mode 100644 playbooks/roles/update_ssh_config_vagrant/update_ssh_config/tests/0003_remove_hosts_bottom.res delete mode 100644 playbooks/roles/update_ssh_config_vagrant/update_ssh_config/tests/0004_remove_hosts_missing.orig delete mode 100644 playbooks/roles/update_ssh_config_vagrant/update_ssh_config/tests/0004_remove_hosts_missing.res delete mode 100644 playbooks/roles/update_ssh_config_vagrant/update_ssh_config/tests/0005_remove_hosts_similar.orig delete mode 100644 playbooks/roles/update_ssh_config_vagrant/update_ssh_config/tests/0005_remove_hosts_similar.res delete mode 100644 playbooks/roles/update_ssh_config_vagrant/update_ssh_config/tests/0006_add_hosts_manual.orig delete mode 100644 playbooks/roles/update_ssh_config_vagrant/update_ssh_config/tests/0006_add_hosts_manual.res delete mode 100644 playbooks/roles/update_ssh_config_vagrant/update_ssh_config/tests/0007_add_remove_hosts_two_separate_ops_top.add.res delete mode 100644 playbooks/roles/update_ssh_config_vagrant/update_ssh_config/tests/0007_add_remove_hosts_two_separate_ops_top.orig delete mode 100644 playbooks/roles/update_ssh_config_vagrant/update_ssh_config/tests/0007_add_remove_hosts_two_separate_ops_top.remove.res delete mode 120000 playbooks/roles/update_ssh_config_vagrant/update_ssh_config/tests/0008_add_remove_hosts_one_shot_top.orig delete mode 120000 playbooks/roles/update_ssh_config_vagrant/update_ssh_config/tests/0008_add_remove_hosts_one_shot_top.res delete mode 100644 playbooks/roles/update_ssh_config_vagrant/update_ssh_config/tests/0009_add_hosts_vagrant_emulate_top.emulate_vagrant delete mode 120000 playbooks/roles/update_ssh_config_vagrant/update_ssh_config/tests/0009_add_hosts_vagrant_emulate_top.orig delete mode 100644 playbooks/roles/update_ssh_config_vagrant/update_ssh_config/tests/0009_add_hosts_vagrant_emulate_top.res delete mode 100644 playbooks/roles/update_ssh_config_vagrant/update_ssh_config/tests/0010_add_hosts_kexalgorithms_vagrant_emulate_top.emulate_vagrant delete mode 100644 playbooks/roles/update_ssh_config_vagrant/update_ssh_config/tests/0010_add_hosts_kexalgorithms_vagrant_emulate_top.orig delete mode 100644 playbooks/roles/update_ssh_config_vagrant/update_ssh_config/tests/0010_add_hosts_kexalgorithms_vagrant_emulate_top.res delete mode 100644 playbooks/roles/update_ssh_config_vagrant/update_ssh_config/tests/0011_add_remove_hosts_two_separate_ops_kexalgorithms_top.add.res delete mode 100644 playbooks/roles/update_ssh_config_vagrant/update_ssh_config/tests/0011_add_remove_hosts_two_separate_ops_kexalgorithms_top.orig delete mode 100644 playbooks/roles/update_ssh_config_vagrant/update_ssh_config/tests/0011_add_remove_hosts_two_separate_ops_kexalgorithms_top.remove.res delete mode 100644 playbooks/roles/update_ssh_config_vagrant/update_ssh_config/tests/0012_add_remove_hosts_empty_file.res delete mode 100755 playbooks/roles/update_ssh_config_vagrant/update_ssh_config/update_ssh_config.py delete mode 100644 playbooks/roles/update_ssh_config_vagrant/vars/main.yml delete mode 100644 playbooks/update_ssh_config_vagrant.yml
playbooks/install_vagrant_boxes.yml deleted +0 -5
@@ -1,5 +0,0 @@ ---- -- hosts: localhost - tasks: - - include_role: - name: install_vagrant_boxes
playbooks/roles/gen_nodes/templates/Vagrantfile.j2 deleted +0 -478
478 lines not on this page · raw message
playbooks/roles/install_vagrant_boxes/README.md deleted +0 -46
46 lines not on this page · raw message
playbooks/roles/install_vagrant_boxes/defaults/main.yml deleted +0 -6
@@ -1,6 +0,0 @@ ---- -# Example boxes with URLs. You would override this. -kdevops_install_vagrant_boxes: False -vagrant_boxes: - - { name: 'suse/sle12sp5.x86_64', box_url: 'http://example.com/SLE-12-SP5-Vagrant-GM/SLES12-SP5-Vagrant.x86_64-12.5-libvirt-GM.vagrant.libvirt.box' } - - { name: 'suse/sle15sp2.x86_64', box_url: 'http://example.com/SLES15-SP2-Vagrant.x86_64-15.2-libvirt-Snapshot2.vagrant.libvirt.box' }
playbooks/roles/install_vagrant_boxes/scripts/add-box-if-missing.sh deleted +0 -48
48 lines not on this page · raw message
playbooks/roles/install_vagrant_boxes/tasks/main.yml deleted +0 -49
49 lines not on this page · raw message
playbooks/roles/update_ssh_config_vagrant/README.md deleted +0 -66
66 lines not on this page · raw message
playbooks/roles/update_ssh_config_vagrant/defaults/main.yml deleted +0 -13
@@ -1,13 +0,0 @@ -# SPDX-License-Identifier copyleft-next-0.3.1 ---- -# Our sensible defaults for dev_config. You can override them by putting -# your variables in these files, the later has major precedence: -# -# ansible/extra_vars.yml - -# On your own system -sshconfig: "~/.ssh/config" -sshconfig_backup: "{{sshconfig}}.backup.kdevops.vagrant" -vagrant_dir: "../vagrant" -use_kexalgorithms: False -kexalgorithms: ""
playbooks/roles/update_ssh_config_vagrant/python/update_ssh_config.py deleted +0 -1
@@ -1 +0,0 @@ -../update_ssh_config/update_ssh_config.py
playbooks/roles/update_ssh_config_vagrant/tasks/main.yml deleted +0 -69
69 lines not on this page · raw message
playbooks/roles/update_ssh_config_vagrant/update_ssh_config/.gitignore deleted +0 -6
@@ -1,6 +0,0 @@ -tests/*.copy -tests/*.bk - -*.swp -__pycache__/ -
playbooks/roles/update_ssh_config_vagrant/update_ssh_config/.travis.yml deleted +0 -12
@@ -1,12 +0,0 @@ -language: python -python: - - "3.6" -script: - - make test - - make flake8 -notifications: - email: - recipients: - - [email protected] - on_success: never - on_failure: always
playbooks/roles/update_ssh_config_vagrant/update_ssh_config/CONTRIBUTING deleted +0 -49
49 lines not on this page · raw message
playbooks/roles/update_ssh_config_vagrant/update_ssh_config/LICENSE deleted +0 -239
239 lines not on this page · raw message
playbooks/roles/update_ssh_config_vagrant/update_ssh_config/Makefile deleted +0 -15
@@ -1,15 +0,0 @@ -all: python-tests -PHONY += all - -python-tests: test flake8 -PHONY += python-tests - -test: - python3 -m unittest discover -v -PHONY += test - -flake8: - flake8 --statistics -PHONY += flake8 - -.PHONY: $(PHONY)
playbooks/roles/update_ssh_config_vagrant/update_ssh_config/README.md deleted +0 -159
159 lines not on this page · raw message
playbooks/roles/update_ssh_config_vagrant/update_ssh_config/test_update_ssh_config.py deleted +0 -417
417 lines not on this page · raw message
playbooks/roles/update_ssh_config_vagrant/update_ssh_config/tests/0001_remove_hosts_top.orig deleted +0 -53
53 lines not on this page · raw message
playbooks/roles/update_ssh_config_vagrant/update_ssh_config/tests/0001_remove_hosts_top.res deleted +0 -33
@@ -1,33 +0,0 @@ -Host * - ServerAliveInterval 60 - ServerAliveCountMax 2 -Host apples - User mcgrof - Port 22 - HostName 192.168.1.10 - IdentityFile ~/.ssh/apples -Host apples-pub - User mcgrof - Port 6913 - HostName 71.72.31.95 - IdentityFile ~/.ssh/apples -Host starwars - HostName 192.168.2.92 - User vagrant - Port 22 - UserKnownHostsFile /dev/null - StrictHostKeyChecking no - PasswordAuthentication no - IdentityFile /home/mcgrof/devel/kdevops/vagrant/.vagrant/machines/starwars/libvirt/private_key - IdentitiesOnly yes - LogLevel FATAL -Host starwars-dev - HostName 192.168.2.78 - User vagrant - Port 22 - UserKnownHostsFile /dev/null - StrictHostKeyChecking no - PasswordAuthentication no - IdentityFile /home/mcgrof/devel/kdevops/vagrant/.vagrant/machines/starwars-dev/libvirt/private_key - IdentitiesOnly yes - LogLevel FATAL
playbooks/roles/update_ssh_config_vagrant/update_ssh_config/tests/0002_remove_hosts_middle.orig deleted +0 -53
53 lines not on this page · raw message
playbooks/roles/update_ssh_config_vagrant/update_ssh_config/tests/0002_remove_hosts_middle.res deleted +0 -33
@@ -1,33 +0,0 @@ -Host * - ServerAliveInterval 60 - ServerAliveCountMax 2 -Host apples - User mcgrof - Port 22 - HostName 192.168.1.10 - IdentityFile ~/.ssh/apples -Host apples-pub - User mcgrof - Port 6913 - HostName 71.72.31.95 - IdentityFile ~/.ssh/apples -Host starwars - HostName 192.168.2.92 - User vagrant - Port 22 - UserKnownHostsFile /dev/null - StrictHostKeyChecking no - PasswordAuthentication no - IdentityFile /home/mcgrof/devel/kdevops/vagrant/.vagrant/machines/starwars/libvirt/private_key - IdentitiesOnly yes - LogLevel FATAL -Host starwars-dev - HostName 192.168.2.78 - User vagrant - Port 22 - UserKnownHostsFile /dev/null - StrictHostKeyChecking no - PasswordAuthentication no - IdentityFile /home/mcgrof/devel/kdevops/vagrant/.vagrant/machines/starwars-dev/libvirt/private_key - IdentitiesOnly yes - LogLevel FATAL
playbooks/roles/update_ssh_config_vagrant/update_ssh_config/tests/0003_remove_hosts_bottom.orig deleted +0 -53
53 lines not on this page · raw message
playbooks/roles/update_ssh_config_vagrant/update_ssh_config/tests/0003_remove_hosts_bottom.res deleted +0 -33
@@ -1,33 +0,0 @@ -Host * - ServerAliveInterval 60 - ServerAliveCountMax 2 -Host apples - User mcgrof - Port 22 - HostName 192.168.1.10 - IdentityFile ~/.ssh/apples -Host apples-pub - User mcgrof - Port 6913 - HostName 71.72.31.95 - IdentityFile ~/.ssh/apples -Host starwars - HostName 192.168.2.92 - User vagrant - Port 22 - UserKnownHostsFile /dev/null - StrictHostKeyChecking no - PasswordAuthentication no - IdentityFile /home/mcgrof/devel/kdevops/vagrant/.vagrant/machines/starwars/libvirt/private_key - IdentitiesOnly yes - LogLevel FATAL -Host starwars-dev - HostName 192.168.2.78 - User vagrant - Port 22 - UserKnownHostsFile /dev/null - StrictHostKeyChecking no - PasswordAuthentication no - IdentityFile /home/mcgrof/devel/kdevops/vagrant/.vagrant/machines/starwars-dev/libvirt/private_key - IdentitiesOnly yes - LogLevel FATAL
playbooks/roles/update_ssh_config_vagrant/update_ssh_config/tests/0004_remove_hosts_missing.orig deleted +0 -33
@@ -1,33 +0,0 @@ -Host * - ServerAliveInterval 60 - ServerAliveCountMax 2 -Host apples - User mcgrof - Port 22 - HostName 192.168.1.10 - IdentityFile ~/.ssh/apples -Host apples-pub - User mcgrof - Port 6913 - HostName 71.72.31.95 - IdentityFile ~/.ssh/apples -Host starwars - HostName 192.168.2.92 - User vagrant - Port 22 - UserKnownHostsFile /dev/null - StrictHostKeyChecking no - PasswordAuthentication no - IdentityFile /home/mcgrof/devel/kdevops/vagrant/.vagrant/machines/starwars/libvirt/private_key - IdentitiesOnly yes - LogLevel FATAL -Host starwars-dev - HostName 192.168.2.78 - User vagrant - Port 22 - UserKnownHostsFile /dev/null - StrictHostKeyChecking no - PasswordAuthentication no - IdentityFile /home/mcgrof/devel/kdevops/vagrant/.vagrant/machines/starwars-dev/libvirt/private_key - IdentitiesOnly yes - LogLevel FATAL
playbooks/roles/update_ssh_config_vagrant/update_ssh_config/tests/0004_remove_hosts_missing.res deleted +0 -33
@@ -1,33 +0,0 @@ -Host * - ServerAliveInterval 60 - ServerAliveCountMax 2 -Host apples - User mcgrof - Port 22 - HostName 192.168.1.10 - IdentityFile ~/.ssh/apples -Host apples-pub - User mcgrof - Port 6913 - HostName 71.72.31.95 - IdentityFile ~/.ssh/apples -Host starwars - HostName 192.168.2.92 - User vagrant - Port 22 - UserKnownHostsFile /dev/null - StrictHostKeyChecking no - PasswordAuthentication no - IdentityFile /home/mcgrof/devel/kdevops/vagrant/.vagrant/machines/starwars/libvirt/private_key - IdentitiesOnly yes - LogLevel FATAL -Host starwars-dev - HostName 192.168.2.78 - User vagrant - Port 22 - UserKnownHostsFile /dev/null - StrictHostKeyChecking no - PasswordAuthentication no - IdentityFile /home/mcgrof/devel/kdevops/vagrant/.vagrant/machines/starwars-dev/libvirt/private_key - IdentitiesOnly yes - LogLevel FATAL
playbooks/roles/update_ssh_config_vagrant/update_ssh_config/tests/0005_remove_hosts_similar.orig deleted +0 -53
53 lines not on this page · raw message
playbooks/roles/update_ssh_config_vagrant/update_ssh_config/tests/0005_remove_hosts_similar.res deleted +0 -53
53 lines not on this page · raw message
playbooks/roles/update_ssh_config_vagrant/update_ssh_config/tests/0006_add_hosts_manual.orig deleted +0 -33
@@ -1,33 +0,0 @@ -Host * - ServerAliveInterval 60 - ServerAliveCountMax 2 -Host apples - User mcgrof - Port 22 - HostName 192.168.1.10 - IdentityFile ~/.ssh/apples -Host apples-pub - User mcgrof - Port 6913 - HostName 71.72.31.95 - IdentityFile ~/.ssh/apples -Host starwars - HostName 192.168.2.92 - User vagrant - Port 22 - UserKnownHostsFile /dev/null - StrictHostKeyChecking no - PasswordAuthentication no - IdentityFile /home/mcgrof/devel/kdevops/vagrant/.vagrant/machines/starwars/libvirt/private_key - IdentitiesOnly yes - LogLevel FATAL -Host starwars-dev - HostName 192.168.2.78 - User vagrant - Port 22 - UserKnownHostsFile /dev/null - StrictHostKeyChecking no - PasswordAuthentication no - IdentityFile /home/mcgrof/devel/kdevops/vagrant/.vagrant/machines/starwars-dev/libvirt/private_key - IdentitiesOnly yes - LogLevel FATAL
playbooks/roles/update_ssh_config_vagrant/update_ssh_config/tests/0006_add_hosts_manual.res deleted +0 -53
53 lines not on this page · raw message
playbooks/roles/update_ssh_config_vagrant/update_ssh_config/tests/0007_add_remove_hosts_two_separate_ops_top.add.res deleted +0 -53
53 lines not on this page · raw message
playbooks/roles/update_ssh_config_vagrant/update_ssh_config/tests/0007_add_remove_hosts_two_separate_ops_top.orig deleted +0 -53
53 lines not on this page · raw message
playbooks/roles/update_ssh_config_vagrant/update_ssh_config/tests/0007_add_remove_hosts_two_separate_ops_top.remove.res deleted +0 -33
@@ -1,33 +0,0 @@ -Host * - ServerAliveInterval 60 - ServerAliveCountMax 2 -Host apples - User mcgrof - Port 22 - HostName 192.168.1.10 - IdentityFile ~/.ssh/apples -Host apples-pub - User mcgrof - Port 6913 - HostName 71.72.31.95 - IdentityFile ~/.ssh/apples -Host starwars - HostName 192.168.2.92 - User vagrant - Port 22 - UserKnownHostsFile /dev/null - StrictHostKeyChecking no - PasswordAuthentication no - IdentityFile /home/mcgrof/devel/kdevops/vagrant/.vagrant/machines/starwars/libvirt/private_key - IdentitiesOnly yes - LogLevel FATAL -Host starwars-dev - HostName 192.168.2.78 - User vagrant - Port 22 - UserKnownHostsFile /dev/null - StrictHostKeyChecking no - PasswordAuthentication no - IdentityFile /home/mcgrof/devel/kdevops/vagrant/.vagrant/machines/starwars-dev/libvirt/private_key - IdentitiesOnly yes - LogLevel FATAL
playbooks/roles/update_ssh_config_vagrant/update_ssh_config/tests/0008_add_remove_hosts_one_shot_top.orig deleted +0 -1
@@ -1 +0,0 @@ -0007_add_remove_hosts_two_separate_ops_top.orig
playbooks/roles/update_ssh_config_vagrant/update_ssh_config/tests/0008_add_remove_hosts_one_shot_top.res deleted +0 -1
@@ -1 +0,0 @@ -0007_add_remove_hosts_two_separate_ops_top.add.res
playbooks/roles/update_ssh_config_vagrant/update_ssh_config/tests/0009_add_hosts_vagrant_emulate_top.emulate_vagrant deleted +0 -20
@@ -1,20 +0,0 @@ -Host kdevops - HostName 51.179.89.243 - User alpha - Port 25 - IdentityFile ~alpha/.ssh/go - UserKnownHostsFile /dev/null - StrictHostKeyChecking no - PasswordAuthentication no - IdentitiesOnly yes - LogLevel FATAL -Host kdevops-dev - HostName 52.195.142.19 - User alpha - Port 25 - IdentityFile ~alpha/.ssh/go - UserKnownHostsFile /dev/null - StrictHostKeyChecking no - PasswordAuthentication no - IdentitiesOnly yes - LogLevel FATAL
playbooks/roles/update_ssh_config_vagrant/update_ssh_config/tests/0009_add_hosts_vagrant_emulate_top.orig deleted +0 -1
@@ -1 +0,0 @@ -0007_add_remove_hosts_two_separate_ops_top.orig
playbooks/roles/update_ssh_config_vagrant/update_ssh_config/tests/0009_add_hosts_vagrant_emulate_top.res deleted +0 -53
53 lines not on this page · raw message
playbooks/roles/update_ssh_config_vagrant/update_ssh_config/tests/0010_add_hosts_kexalgorithms_vagrant_emulate_top.emulate_vagrant deleted +0 -20
@@ -1,20 +0,0 @@ -Host kdevops - HostName 51.179.89.243 - User alpha - Port 25 - IdentityFile ~alpha/.ssh/go - UserKnownHostsFile /dev/null - StrictHostKeyChecking no - PasswordAuthentication no - IdentitiesOnly yes - LogLevel FATAL -Host kdevops-dev - HostName 52.195.142.19 - User alpha - Port 25 - IdentityFile ~alpha/.ssh/go - UserKnownHostsFile /dev/null - StrictHostKeyChecking no - PasswordAuthentication no - IdentitiesOnly yes - LogLevel FATAL
playbooks/roles/update_ssh_config_vagrant/update_ssh_config/tests/0010_add_hosts_kexalgorithms_vagrant_emulate_top.orig deleted +0 -53
53 lines not on this page · raw message
playbooks/roles/update_ssh_config_vagrant/update_ssh_config/tests/0010_add_hosts_kexalgorithms_vagrant_emulate_top.res deleted +0 -55
55 lines not on this page · raw message
playbooks/roles/update_ssh_config_vagrant/update_ssh_config/tests/0011_add_remove_hosts_two_separate_ops_kexalgorithms_top.add.res deleted +0 -55
55 lines not on this page · raw message
playbooks/roles/update_ssh_config_vagrant/update_ssh_config/tests/0011_add_remove_hosts_two_separate_ops_kexalgorithms_top.orig deleted +0 -53
53 lines not on this page · raw message
playbooks/roles/update_ssh_config_vagrant/update_ssh_config/tests/0011_add_remove_hosts_two_separate_ops_kexalgorithms_top.remove.res deleted +0 -33
@@ -1,33 +0,0 @@ -Host * - ServerAliveInterval 60 - ServerAliveCountMax 2 -Host apples - User mcgrof - Port 22 - HostName 192.168.1.10 - IdentityFile ~/.ssh/apples -Host apples-pub - User mcgrof - Port 6913 - HostName 71.72.31.95 - IdentityFile ~/.ssh/apples -Host starwars - HostName 192.168.2.92 - User vagrant - Port 22 - UserKnownHostsFile /dev/null - StrictHostKeyChecking no - PasswordAuthentication no - IdentityFile /home/mcgrof/devel/kdevops/vagrant/.vagrant/machines/starwars/libvirt/private_key - IdentitiesOnly yes - LogLevel FATAL -Host starwars-dev - HostName 192.168.2.78 - User vagrant - Port 22 - UserKnownHostsFile /dev/null - StrictHostKeyChecking no - PasswordAuthentication no - IdentityFile /home/mcgrof/devel/kdevops/vagrant/.vagrant/machines/starwars-dev/libvirt/private_key - IdentitiesOnly yes - LogLevel FATAL
playbooks/roles/update_ssh_config_vagrant/update_ssh_config/tests/0012_add_remove_hosts_empty_file.res deleted +0 -20
@@ -1,20 +0,0 @@ -Host kdevops 51.179.89.243 - HostName 51.179.89.243 - User alpha - Port 25 - IdentityFile ~alpha/.ssh/go - UserKnownHostsFile /dev/null - StrictHostKeyChecking no - PasswordAuthentication no - IdentitiesOnly yes - LogLevel FATAL -Host kdevops-dev 52.195.142.19 - HostName 52.195.142.19 - User alpha - Port 25 - IdentityFile ~alpha/.ssh/go - UserKnownHostsFile /dev/null - StrictHostKeyChecking no - PasswordAuthentication no - IdentitiesOnly yes - LogLevel FATAL
playbooks/roles/update_ssh_config_vagrant/update_ssh_config/update_ssh_config.py deleted +0 -325
298 lines not on this page · raw message
playbooks/roles/update_ssh_config_vagrant/vars/main.yml deleted +0 -1
Lines of this file are not shown. View the raw message.
playbooks/update_ssh_config_vagrant.yml deleted +0 -4
Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
Signature · 1 line
2.47.2
Part of the diff is not shown here. View the raw message.
PATCH v2 5/33 gitignore: remove Vagrant-specific ignore patterns
In reply to Luis ChamberlainRemove .gitignore entries for files and directories that were part of the Vagrant integration, including generated Vagrant configuration files and runtime directories.
--- .gitignore | 5 ----- 1 file changed, 5 deletions(-)
.gitignore +0 -5
@@ -31,10 +31,6 @@ scripts/workflows/fstests/lib/__pycache__/ scripts/workflows/blktests/lib/__pycache__/ scripts/workflows/lib/__pycache__/ -vagrant/kdevops_nodes.yaml -vagrant/.Vagrantfile.generated -vagrant/Vagrantfile -.vagrant/ include/
@@ -97,6 +93,5 @@ workflows/linux/refs/user scripts/kconfig/.nconf-cfg .dynamic-kconfig.* -vagrant/Kconfig.passthrough_libvirt.generated archive/
Signature · 1 line
2.47.2
PATCH v2 6/33 docs: remove Vagrant-specific documentation files
In reply to Luis ChamberlainRemove all Vagrant-specific documentation as Vagrant support has been removed from kdevops. This includes:
- kdevops-vagrant.md
- custom-vagrant-boxes.md
- why-vagrant.md
- the-gen-nodes-ansible-role-vagrant.md
--- docs/custom-vagrant-boxes.md | 581 --------------------- docs/kdevops-vagrant.md | 130 ----- docs/the-gen-nodes-ansible-role-vagrant.md | 78 --- docs/why-vagrant.md | 66 --- 4 files changed, 855 deletions(-) delete mode 100644 docs/custom-vagrant-boxes.md delete mode 100644 docs/kdevops-vagrant.md delete mode 100644 docs/the-gen-nodes-ansible-role-vagrant.md delete mode 100644 docs/why-vagrant.md
docs/custom-vagrant-boxes.md deleted +0 -581
@@ -1,581 +0,0 @@ -# Creating your own custom Vagrant boxes or qcow2 virtual images - -You can create your own custom Vagrant boxes if the publicly available -Vagrant boxes do not suit your needs. We document how to do this here. -One reason might be you are an Enterprise Linux distribution and don't -have public Vagrant boxes for older releases you might still support -but want the benefit of having Vagrant boxes to work with kdevops -kernel-ci. Another reason might be you just cannot legally share you -images, for one reason or another. Another reason is you may have some -new technology which is not yet easily available on distribution kernels -and want to enable folks to test technology on some development subsystem -or linux-nxt. - -## Re-using an existing box for development - -If you are doing Linux kernel development you may want to just enable -a QA or other developers to quickly test a built kernel for you. -If you don't want to do a full fresh install of a distribution you can -opt to re-use a distribution Vagrant box and just augment it with a -custom kernel build. This section documents how to do that with a demo -of a successful box built using this technique. - -This is the lazy developer approach to customizing a Vagrant box for Linux -kernel development. This involves four steps: - - * 1) One is getting your kernel binary and modules - * 2) The GRUB configuration stuff right. - * 3) Edit the Vagrantfile to remove stupid stuff - * 4) Building the tarball - -We break this down below. - -### Getting your kernel over - -From a libvirt perspective Vagrant boxes are just compressed tarballs -with a qcow2 file. So to hack on one first download the box. So for -example if we visit the [debian/testing64](https://app.vagrantup.com/debian/boxes/testing64) -page there you will see a [libvirt download URL](https://app.vagrantup.com/debian/boxes/testing64/versions/20220626.1/providers/libvirt.box) -with the box file. - -So we do: - -```bash -wget https://app.vagrantup.com/debian/boxes/testing64/versions/20220626.1/providers/libvirt.box - -sha1sum libvirt.box -06b07c0d0b78df5369d9ed35eaf39098c1ec7846 libvirt.box - -file libvirt.box -libvirt.box: gzip compressed data, from Unix, original size modulo 2^32 1197363200 -``` - -The file can be decompressed as a regular tarball. Since it has no -directory in it you want to copy the file to another directory and uncompress -there, otherwise it will clutter your current directory: - -```bash -mkdir box-dev -cp libvirt.box box-dev -cd box-dev -tar zxvf libvirt.box -``` - -So you will see 3 files, one just a qcow2 file the other expresses -how big of a drive was used to create this qcow2 file along with a -provider, and the Vagrantfile defines how to initialize this qcow2 file -with libvirt: - -```bash -ls -1 - -box.img -metadata.json -Vagrantfile - -file box.img -box.img: QEMU QCOW2 Image (v3), 21474836480 bytes - -cat metadata.json -{ - "provider" : "libvirt", - "format" : "qcow2", - "virtual_size" : 20 -} - -cat Vagrantfile -# -*- mode: ruby -*- -# vi: set ft=ruby : - -Vagrant.configure("2") do |config| - - config.vm.post_up_message = "Vanilla Debian box. See https://app.vagrantup.com/debian for help and bug reports" - - # workaround for #837992 - # use nfsv4 mode by default since rpcbind is not available on startup - # we need to force tcp because udp is not available for nfsv4 - config.vm.synced_folder ".", "/vagrant", type: "nfs", nfs_version: "4", nfs_udp: false - - # Options for libvirt vagrant provider. - config.vm.provider :libvirt do |libvirt| - - # A hypervisor name to access. Different drivers can be specified, but - # this version of provider creates KVM machines only. Some examples of - # drivers are kvm (QEMU hardware accelerated), qemu (QEMU emulated), - # xen (Xen hypervisor), lxc (Linux Containers), - # esx (VMware ESX), vmwarews (VMware Workstation) and more. Refer to - # documentation for available drivers (http://libvirt.org/drivers.html). - libvirt.driver = "kvm" - - # The name of the server, where libvirtd is running. - # libvirt.host = "localhost" - - # If use SSH tunnel to connect to Libvirt. - libvirt.connect_via_ssh = false - - # The username and password to access Libvirt. Password is not used when - # connecting via SSH. - libvirt.username = "root" - #libvirt.password = "secret" - - # Libvirt storage pool name, where box image and instance snapshots will - # be stored. - libvirt.storage_pool_name = "default" - - # Set a prefix for the machines that's different than the project dir name. - #libvirt.default_prefix = '' - end -end -``` - -And so to hack on the qcow file we just use nbd: - -```bash -sudo qemu-nbd --connect=/dev/nbd0 box.img -mkdir debian-testing-root-vagrant -sudo mount /dev/nbd0p1 ./vanilla-debian-zns/debian-testing-root-vagrant -``` - -When you finish just do: - -```bash -sudo modprobe nbd max_part=8 -sudo umount debian-testing-root-vagrant -sudo qemu-nbd --disconnect /dev/nbd0 -``` - -It is important to run the disconnect command before copying the box file as -backups or using it for anything. - -What I do then is use a kdevops linux-next guest to compile linux-next or -whatever I want, and then I use a two step process. One to scp the modules -directory locally, and the respective `/boot/*$(uname -r)*` files over to -a new directory and then install these on the target. Then you need to configure -the GRUB console so `sudo virsh console <domain>` works and you also want to -update the GRUB menu. That is covered in the next subsection. - -### Getting your kernel over - -OK now you just need to update the `/etc/default/grub` file and also the -`/boot/grub/grub.cfg` file. Editing `/etc/default/grub` is easy you can -just run your editor on the mounted partition for the file and ensure -you have these entries: - -``` -GRUB_DEFAULT=0 -GRUB_TIMEOUT=5 -GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian` -GRUB_CMDLINE_LINUX_DEFAULT="net.ifnames=0 biosdevname=0" -GRUB_CMDLINE_LINUX="console=tty0 console=tty1 console=ttyS0,115200n8" - -GRUB_SERIAL_COMMAND="serial --speed=115200 --unit=0 --parity=no --stop=1" -GRUB_TERMINAL="console serial" -GRUB_DISABLE_SUBMENU=y -``` - -The last part of this file helps ensure you can get to pick a different -kernel at boot through the GRUB prompt using the serial console -(`virsh console`), however sadly it seems the GRUB version on the Debian -testing as of today doesn't work with this yet, so this step could be enhanced -to enable more flexibility to the user from the start. Until this is fixed then -developers have to do the work manually to perhaps update GRUB to get this -fixed. - -The last step is then to update the `/boot/grub/grub.cfg` file. -To do this, I just have two guests running: - - * dev: some development system where I compile and install some kernel - * baseline: a fresh Debian testing guest just brought up with Vagrant - -And then I scp to it the kernel / modules from dev over, run update-grub -and copy its grub.cfg file over. Something like the following: - -```bash -mkdir -p tmp/boot -scp -r dev:/lib/modules/5.19.0-rc4-next-20220629/ tmp/ -scp -r dev:/boot/*5.19.0-rc4-next-20220629* tmp/ - -scp -r tmp/boot/* baseline:/boot/ -scp -r tmp-provision-dir/5.19.0-rc4-next-20220629 baseline:/lib/modules/ -ssh baseline sudo update-grub -scp baseline:/boot/grub/grub.cfg tmp -``` - -OK so finally we can copy that grub.cfg to the mounted nbd partition and -hope that works. - -### Editing your Vagrantfile to remove stupid stuff - -By default Vagrant boxes enable sharing your directory to the guest -through NFS. From a Linux kernel development perspective this is just -lunacy. And so I like to disable it. By default then Debian uses this -for its sync thing - -``` - config.vm.synced_folder ".", "/vagrant", type: "nfs", nfs_version: "4", nfs_udp: false -``` - -Replace this with the more sane which disables this: - -``` - config.vm.synced_folder './', '/vagrant', type: '9p', disabled: true, accessmode: "mapped", mount: false -``` - -You may also want to edit the `config.vm.post_up_message` with whatever. - -``` - config.vm.post_up_message = "this is kernel build for send bug reports to [email protected]" -``` - -### Example network name resolution - -Most distros use udev for consistent names for networking interfaces. If -you just want to get a box out which will work fast the best way is to just -append to your GRUB kernel parameter: - -``` -GRUB_CMDLINE_LINUX_DEFAULT="net.ifnames=0 biosdevname=0" -``` - -### Example network DHCP fix - -On a basic debian console install, so where no Network Manager is installed, -you want to just have something simply like this, after testing that the -default network name that comes up is eth0: - -``` -# cat /etc/network/interfaces -# interfaces(5) file used by ifup(8) and ifdown(8) -# Include files from /etc/network/interfaces.d: -source-directory /etc/network/interfaces.d - -# The loopback network interface -auto lo -iface lo inet loopback - -# The primary network interface -allow-hotplug eth0 -iface eth0 inet dhcp -``` - -### Ensuring ssh works - -You will want to ensure the user ~vagrant has a .ssh/ directory with -chmod 700 permissions and the vagrant ssh key installed by default. -When vagrant detects this a new one random one is replaced. - -https://github.com/hashicorp/vagrant/tree/main/keys - -So just do: - -```bash -mkdir .ssh -chmod 700 .ssh -echo ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEA6NF8iallvQVp22WDkTkyrtvp9eWW6A8YVr+kz4TjGYe7gHzIw+niNltGEFHzD8+v1I2YJ6oXevct1YeS0o9HZyN1Q9qgCgzUFtdOKLv6IedplqoPkcmF0aYet2PkEDo3MlTBckFXPITAMzF8dJSIFo9D8HfdOV0IAdx4O7PtixWKn5y2hMNG0zQPyUecp4pzC6kivAIhyfHilFR61RGL+GPXQ2MWZWFYbAGjyiYJnAmCP3NOTd0jMZEnDkbUvxhMmBYSdETk1rRgm+R4LOzFUGaHqHDLKLX+FIPKcF96hrucXzcWyLbIbEgE98OHlnVYCzRdK8jlqm8tehUc9c9WhQ== vagrant insecure public key >> authorized_keys -``` - -### Creating the Vagrant new box file tarball - -To create the box file you just tar it up. Assuming you want maximum -compression: - -```bash -tar -cvf ../mcgrof-20220629.box box.img metadata.json Vagrantfile -I "gzip --best" -``` - -You can now upload this box on the Vagrant cloud and use it with the -nice shorthands provided. - -## A fresh install - -To try to save the most amount of space you want to do a fresh install. -This section documents how to do that. - -First you'd install a guest using virt-install, an example script which -you can extend to your own needs is the -[virt-install-demo.sh](docs/virt-install-demo.sh). -There are a a series of adjustments that needed to be made for guests -to work for older kernel releases, should you need that. This is all -documented below. - -But below is an example simple script - - -```bash -virt-install --virt-type kvm \ - --name lio \ - --arch x86_64 \ - --cpu host \ - --location /home/mcgrof/debian-testing-amd64-netinst.iso \ - --os-variant debiantesting \ - --memory 8192 --vcpus 8 \ - --disk pool=data3-xfs,size=20,bus=virtio,format=qcow2 \ - --graphics none \ - --network network=vagrant-libvirt-private,model=virtio \ - --console pty,target_type=serial \ - --debug \ - --extra-args "console=ttyS0" -``` - -## Extending the Vagrant box definition - -A Vagrant box is essentially a tarball (gzip, xc are both supported) with a -qcow2 image and a small metadata file explaining how large the drive for the -guest is. The Vagrant box also ensures that the guest brought up will also -work on any new system, and so a few things need to be done to ensure for -instance that the network interface will get a DHCP address successfully, and -that you can ssh into the system. So a way to deal with moving guests around -the `cloud` are needed, an example is avoiding -`/etc/udev/rules.d/70-persistent-net.rules` upon first boot on some SLE -systems. - -Standard userspace development needs are typically met with the above -requirements. Kernel development however, have more more needs. Extensions -can be made by you so that the custom Vagrant boxes you build extend -what is promised by a Vagrant box, with other things which kernel developers -would typically prefer to have set on the system. This can save time -on bringup. Kdevops does a slew of things to help with this for you, like -setting up the serial console, but if Vagrant boxes already have these things -done on them that is a step which could be skipped. - -Below we provide a recipe of items which can be done to help on a fresh install -of a Linux distribution on a qcow2 image so that it is easier to test new -kernels and debug them. The standard Vagrant box definition *only* requires a -guest to come up, and to be able to ssh into them with the Vagrant user. - - * 1) root/vagrant user password is vagrant - * 2) vagrant user on /etc/sudoers does not need a password to gain root - * 3) vagrant user has an insecure SSH key installed to enable adding a new random one - * 4) Disable the firewall and AppArmor - * 5) Deal with persistent net rules - * 6) Ensure DHCP will work on the first network interface - * 7) Ensure the console is allowed - * 8) Ensure the correct disk size is used on the metadata json file - * 9) Try to use disk partitions by UUID on /etc/fstab - * 10) GRUB disk setup with UUID - * 11) GRUB console setup - * 12) Address lack of virtio - * 13) Address changes in sudo for old systems - -These all deserve their own attention so a section is provided for them below. - -### root / vagrant password - -Although no password is needed, just to ensure one is set the `vagrant` password -is set, just in case you need to use it. - -### vagrant sudoers - -The goal is to never have to use root directly since the boxes are for development -purposes, and so the following entry is expected: - -``` -vagrant ALL=(ALL) NOPASSWD: ALL -``` - -### vagrant user has an insecure SSH key installed - -Vagrant publishes an arbitrary public static SSH public and private key, so -that if it is detected a random SSH key is instead generated and used and -installed. - -Using a random SSH key for each host is a better idea due to possible -risks of guests being left `spawned` and then `pawned` by motivated eager -beavers for a key the entire internet has access to. - -You can surely use your own key as well, however, when sharing Vagrant boxes -you likely don't want to be sharing SSH keys. - -### Disable the firewall and AppArmor - -You are not trying to secure a bank when running a guest for -kernel development, so running a firewall and apparmor is just -typically noise. This is unless of course if you are testing apparmor -or firewall changes to the kernel. - -The firewall and AppArmor can be enabled after initialization, however, -if you really need it. - -### Deal with persistent net rules - -Each Linux distribution has dealt with a way to keep MAC addresses mapped -to a specific interface name. This is to allow a network card to always get -the same IP address, in case it changes the bus it uses on a system. - -Spawning a guest from a Vagrant box means we *want* a different MAC -address for each new guest. This also means we want the first interface -to take the first possible interface name, which will be used for DHCP -purposes after bootup. - -### Ensure DHCP will work on the first network interface - -We expect at least one ethernet interface to come up so that it can get an IP -address and so that we can then SSH into it. Using a network interface just to -communicate to guests is rather archaic, however, it is the current norm. - -A Vagrant box *expects* a random interface to be spawned with it, and we -want to just ensure it, whatever it is, will ask for an IP address via -DHCP. We want to use a mechanism that will work, if possible, for older -systems as well. - -The following recipe works from SLES12-SP3 down to SLES10-SP3 as -an example: - -```bash -if [ -d ] /etc/sysconfig ]; then - cat << FIXIFCGHETH0 > /etc/sysconfig/network/ifcfg-eth0 -DEVICE=eth0 -BOOTPROTO=dhcp -ONBOOT=yes -STARTMODE='auto' - -FIXIFCGHETH0 -``` - -### Ensure the correct disk size is used on the metadata json file - -Vagrant boxes have a metadata json file. If you create a qcow2 image -as follows: - -``` -qemu-img create -f qcow2 foo.qcow2 50G -``` - -Then ensure you have 50 as your size for your metadata.json file: - -``` -{ - "provider" : "libvirt", - "format" : "qcow2", - "virtual_size" : 50 -} -``` - -Note that the Vagrant libvirt provider does not seem to provide support -yet for versioning. - -### Try to use disk partitions by UUID on /etc/fstab - -Some releases do not use /dev/disk/by-uuid labels on /etc/fstab. This -poses a risk when trying to move a guest qcow2 image file from one -system to another. We want something static, and the UUID assigned to -partitions addresses this problem. - -This however means that if you are creating your own custom Vagrant -box or installing your own new fresh kernel you may have to take steps -to ensure the UUID is used instead of the raw /dev/vda or alternative -device disk name. - -### GRUB disk setup with UUID - -As an example, GRUB 0.97 is used on SLE10-SP3, SLE11-SP1, and SLE11-SP4. On -these releases you must ensure that the same /dev/disk/by-uuid is used so that -that a Vagrant box can function on new systems. You do this by editing -/boot/grub/menu.lst and ensuring the appropriate full path /dev/disk/by-uuid/ is -used for the partition in question. - -On SLES10-SP3 swap partitions lacked a respective UUID, and so the -resume entry must be removed. - -SLES12-SP1 and newer use GRUB2, and started using UUID=id as a shortcut on -/etc/fstab and /etc/default/grub, and so no modifications are needed there. - -### GRUB console setup - -As a kernel developer you want to be able to pick what kernel boots -easily. Today, we do this via the console. So we must ensure the console -works on the guest. We support GRUB2 (GRUB) and GRUB 0.97 (GRUB Legacy). - -#### GRUB 0.97 console setup - -On GRUB 0.97 based systems you must add the following to the top of the -/boot/grub/menu.lst file (when in doubt check one of the custom Vagrant -boxes): - -``` -serial --unit=0 --speed=115200 --word=8 --parity=no --stop=1 -terminal --timeout=4 serial console -``` - -Replace `gfxmenu` with `menu` on /boot/grub/menu.lst. - -Below are the base releases of GRUB 0.97 used on our older SLE releases: - - * sles10sp3: grub-0.97-16.25.9 - * sles11sp1: grub-0.97-162.9.1 - * sles11sp4: grub-0.97-162.172.1 - -Ensure any `quiet` entry is removed from the kernel command lines. - -#### GRUB2 console setup - -If you install an ISO on a guest using the console the installer has the sanity -to set up *most* of the right setting for you. However, on SLE12-SP1 you must -make the following change on /etc/default/grub: - -``` --GRUB_TERMINAL=console -+GRUB_TERMINAL="console serial" -``` - -Also ensure GRUB_CMDLINE_LINUX_DEFAULT has the entry `quiet` removed. - -### Address lack of virtio - -Certain modern Linux releases releases support virtio drivers for networking, -or storage. Since Vagrant uses KVM and KVM relies on QEMU, when virtio is not -available emulation is needed. Vagrant is controlled via its Vagrantfile, and -users of a Vagrant box can specify one. However sensible defaults must also be -set and provided on a base Vagrantfile for a Vagrant box. The lack of a virtio -driver then is codified into the Vagrantfile used to build the first Vagrant -box. A Vagrant box is nothing more than a tarball (gzip or xz, use xz, it has -better compression) with the guest qcow2 image, the metadata.json file shown -above, and an initial Vagrantfile. - -Below we document the currently needed modifications needed to the Vagrantfile -for our older Linux distributions, we use older SUSE Linux releases as -example which were targeted to create Vagrant boxes for kernel development -and testing. - -#### Disable default /vagrant nfs sharing for all releases - -Vagrant boxes by default share folders under the current directory via NFS -to the guests you create. This doesn't work so well for all hosts, and sharing -via NFS isn't the best really. We disable NFS sharing as the default then. - -This applies to SLE12-SP3 and older releases. - -#### Disable virtio drives - -SLE10-SP3 doesn't have virtio block driver, and so the root drive uses scsi as the -emulated backend for the drive. Note that currently we still use IDE drives for -the other alternative drives, given using scsi doesn't work at the moment. This -discrepancy should be resolved. - -This is done as follows on the respective Vagrantfile: - -``` - libvirt.disk_bus = "scsi" -``` - -#### Disable virtio networking - -SLE10-SP3 doesn't have a virtio network driver, and so the ne2k_pci network driver -is emulated. - -This is done as follows on the respective Vagrantfile: - -``` - libvirt.nic_model_type = "ne2k_pci" -``` - -### Address changes in sudo for old systems - -SLE10-SP3 has an old version of sudo which lacks the `-E` argument. And since -the default in Vagrant is to use -E, we have to disable this for SLE10-SP3. - -This is done as follows on the respective Vagrantfile: - -``` - config.ssh.sudo_command = "sudo -H %c" -```
docs/kdevops-vagrant.md deleted +0 -130
130 lines not on this page · raw message
docs/the-gen-nodes-ansible-role-vagrant.md deleted +0 -78
78 lines not on this page · raw message
docs/why-vagrant.md deleted +0 -66
66 lines not on this page · raw message
Signature · 1 line
2.47.2
PATCH v2 7/33 Remove all remaining Vagrant references from codebase
In reply to Luis ChamberlainThis comprehensive commit removes all remaining Vagrant references throughout the kdevops codebase after the core Vagrant infrastructure was already removed in previous commits:
Kconfig cleanup:
- Replace vagrant with libvirt in provisioning and workflow configs
- Update storage pool paths from vagrant to kdevops directory
- Fix libvirt URI and networking documentation
- Update SSH config backup naming from Vagrant to libvirt
Workflow updates:
- Update blktests and data partition Kconfig files
- Fix Python augment scripts CONFIG_VAGRANT_OPENSUSE to CONFIG_LIBVIRT_OPENSUSE
- Update reboot-limit demo Makefile comments
Script cleanup:
- Update SUSE repo preparation script comment
- Fix gen_hosts and gen_nodes default username from vagrant to root
Infrastructure updates:
- Update bringup.Makefile to use libvirt-based defaults
- Clean up large block I/O configuration references
This completes the removal of Vagrant support from kdevops, with libvirt/guestfs, terraform, and bare metal deployment remaining as the supported node provisioning methods.
--- Kconfig.passthrough_libvirt.generated | 0 Makefile | 7 +- Makefile.kdevops | 32 +- Makefile.subtrees | 4 +- kconfigs/Kconfig.ansible_provisioning | 3 +- kconfigs/Kconfig.hypervisor | 4 +- kconfigs/Kconfig.kdevops | 5 - kconfigs/Kconfig.kernel-ci | 5 +- kconfigs/Kconfig.libvirt | 53 ++- kconfigs/Kconfig.libvirt.largeio | 2 +- kconfigs/Kconfig.ssh | 6 +- kconfigs/workflows/Kconfig.data_partition | 8 +- kconfigs/workflows/Kconfig.shared | 4 - .../blktests/augment_expunge_list.py | 3 +- .../workflows/fstests/augment_expunge_list.py | 5 +- playbooks/roles/bootlinux/defaults/main.yml | 4 +- .../bootlinux/tasks/update-grub/install.yml | 2 +- playbooks/roles/devconfig/defaults/main.yml | 2 +- .../devconfig/scripts/prepare_suse_repos.sh | 2 +- playbooks/roles/gen_hosts/defaults/main.yml | 1 + playbooks/roles/gen_nodes/defaults/main.yml | 11 +- .../kdevops_nodes_split_start.j2.yaml | 171 --------- .../roles/gen_pci_kconfig/tasks/main.yml | 2 +- scripts/bringup.Makefile | 3 - scripts/check_distro_kconfig.sh | 6 +- scripts/check_pciepassthrough_kconfig.sh | 6 +- scripts/dynamic-pci-kconfig.Makefile | 4 +- scripts/gen-nodes.Makefile | 5 - scripts/get-distro-default-bridge.sh | 11 +- scripts/provision.Makefile | 4 - scripts/tests.Makefile | 1 - scripts/workflows/generic/run_kernel_ci.sh | 4 +- terraform/azure/main.tf | 2 +- workflows/blktests/Kconfig | 9 +- workflows/demos/reboot-limit/Makefile | 2 +- workflows/fstests/Kconfig | 2 - .../xfs/unassigned/fstests-next-20230515 | 347 ------------------ workflows/fstests/xfs/Kconfig | 2 - workflows/linux/Kconfig.linus | 1 - workflows/linux/Kconfig.mcgrof | 1 - workflows/linux/Kconfig.modules | 1 - workflows/linux/Kconfig.next | 1 - workflows/linux/Kconfig.stable | 1 - workflows/linux/Kconfig.vfs | 1 - workflows/linux/Kconfig.xfs | 1 - 45 files changed, 69 insertions(+), 682 deletions(-) create mode 100644 Kconfig.passthrough_libvirt.generated delete mode 100644 playbooks/roles/gen_nodes/templates/kdevops_nodes_split_start.j2.yaml delete mode 100644 workflows/fstests/expunges/6.4.0-rc2-next-20230515/xfs/unassigned/fstests-next-20230515
Kconfig.passthrough_libvirt.generated new file +0 -0
Makefile +1 -6
@@ -17,7 +17,6 @@ export KDEVOPS_EXTRA_VARS ?= extra_vars.yaml export KDEVOPS_PLAYBOOKS_DIR := playbooks export KDEVOPS_HOSTFILE ?= hosts export KDEVOPS_NODES := -export KDEVOPS_VAGRANT := export PYTHONUNBUFFERED=1 export TOPDIR=./ export TOPDIR_PATH = $(shell readlink -f $(TOPDIR))
@@ -129,10 +128,6 @@ ifneq (,$(ANSIBLE_EXTRA_ARGS)) DEFAULT_DEPS += $(KDEVOPS_EXTRA_VARS) endif -ifeq (y,$(CONFIG_VAGRANT)) -DEFAULT_DEPS += $(KDEVOPS_VAGRANT) -endif - DEFAULT_DEPS += $(DEFAULT_DEPS_REQS_EXTRA_VARS) include scripts/install-menuconfig-deps.Makefile
@@ -230,7 +225,7 @@ $(KDEVOPS_HOSTS): .config ansible.cfg $(KDEVOPS_HOSTS_TEMPLATE) --extra-vars=@./extra_vars.yaml DEFAULT_DEPS += $(KDEVOPS_NODES) -$(KDEVOPS_NODES) $(KDEVOPS_VAGRANT): .config ansible.cfg $(KDEVOPS_NODES_TEMPLATE) +$(KDEVOPS_NODES): .config ansible.cfg $(KDEVOPS_NODES_TEMPLATE) $(Q)ansible-playbook $(ANSIBLE_VERBOSE) --connection=local \ --inventory localhost, \ $(KDEVOPS_PLAYBOOKS_DIR)/gen_nodes.yml \
Makefile.kdevops +1 -31
@@ -25,37 +25,7 @@ kdevops_configure_libvirt: $(KDEVOPS_PLAYBOOKS_DIR)/libvirt_user.yml -e "skip_install=True" \ -e 'running_user=$(USER)' -kdevops_vagrant_deps: \ - kdevops_install_libvirt \ - kdevops_configure_libvirt - -PHONY += kdevops_vagrant_deps -KDEVOPS_VAGRANT_WORK := kdevops_vagrant_deps - -kdevops_vagrant_boxes: - $(Q)ansible-playbook $(ANSIBLE_VERBOSE) --connection=local \ - --inventory localhost, \ - $(KDEVOPS_PLAYBOOKS_DIR)/install_vagrant_boxes.yml -PHONY += kdevops_vagrant_boxes -KDEVOPS_VAGRANT_WORK += kdevops_vagrant_boxes - -kdevops_verify_libvirt_user: - $(Q)ansible-playbook $(ANSIBLE_VERBOSE) --connection=local \ - --inventory localhost, \ - $(KDEVOPS_PLAYBOOKS_DIR)/libvirt_user.yml -e "only_verify_user=True" - -PHONY += kdevops_verify_libvirt_user -KDEVOPS_VAGRANT_WORK += kdevops_verify_libvirt_user - -kdevops_libvirt_storage_pool_create: - $(Q)ansible-playbook $(ANSIBLE_VERBOSE) --connection=local \ - --inventory localhost, \ - $(KDEVOPS_PLAYBOOKS_DIR)/libvirt_storage_pool_create.yml - -PHONY += kdevops_libvirt_storage_pool_create -KDEVOPS_VAGRANT_WORK += kdevops_libvirt_storage_pool_create - -kdevops_deps: kdevops_terraform_deps $(KDEVOPS_VAGRANT_WORK) $(KDEVOPS_DEPS) +kdevops_deps: kdevops_terraform_deps $(KDEVOPS_DEPS) @echo Installed dependencies PHONY += kdevops_deps
Makefile.subtrees +2 -2
@@ -9,7 +9,7 @@ UPDATE_SSHCONFIG_READ := https://github.com/linux-kdevops/update_ssh_config.git UPDATE_SSHCONFIG_RW := [email protected]:linux-kdevops/update_ssh_config.git KCONFIG_DIR := scripts/kconfig -UPDATE_SSHCONFIG_DIR := playbooks/roles/update_ssh_config_vagrant/update_ssh_config/ +UPDATE_SSHCONFIG_DIR := playbooks/roles/update_ssh_config/update_ssh_config/ # If you only have read access to these trees use this target add-subtree-remotes:
@@ -35,4 +35,4 @@ refresh-subtrees: # If you are a developer with write commit access you can push changes queued # up here onto kdevops to their respective upstream as follows: # git subtree push --prefix=scripts/kconfig/ kconfig master -# git subtree push --prefix=playbooks/roles/update_ssh_config_vagrant/update_ssh_config update_ssh_config master +# git subtree push --prefix=playbooks/roles/update_ssh_config/update_ssh_config update_ssh_config master
kconfigs/Kconfig.ansible_provisioning +1 -2
@@ -182,14 +182,13 @@ config DEVCONFIG_SYSTEMD_JOURNAL_USE_HTTP config DEVCONFIG_SYSTEMD_JOURNAL_REMOTE_URL string "systemd-remote URL" - default $(shell, scripts/append-makefile-vars.sh http:// $(KDEVOPS_DEFAULT_BRIDGE_IP_VAGRANT)) if VAGRANT 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 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 vagrant on debian on the host it would seem the + If you are using libvirt on debian on the host it would seem the current default should work. endif # DEVCONFIG_ENABLE_SYSTEMD_JOURNAL_REMOTE
kconfigs/Kconfig.hypervisor +2 -2
@@ -15,7 +15,7 @@ if HYPERVISOR_TUNING config HYPERVISOR_TUNING_KSM bool "Enable Kernel same page merging on the host" - default y if LIBVIRT || VAGRANT_VIRTUALBOX + default y if LIBVIRT help Enabling KSM can save tons of memory, in some kernel-ci systems with about 60 guests it has saved about 135 GiB of RAM. If you enable this
@@ -29,7 +29,7 @@ config HYPERVISOR_TUNING_KSM config HYPERVISOR_TUNING_ZSWAP bool "Enable zswap on the host" - default y if LIBVIRT || VAGRANT_VIRTUALBOX + default y if LIBVIRT help Zswap is a lightweight compressed cache for swap pages Although in theory designed for swap, you can enable zswap and still
kconfigs/Kconfig.kdevops +0 -5
@@ -25,15 +25,11 @@ config HAVE_DISTRO_REQUIRES_CUSTOM_SSH_KEXALGORITHMS config CUSTOM_DISTRO_HOST_PREFIX string depends on HAVE_CUSTOM_DISTRO_HOST_PREFIX - default VAGRANT_DEBIAN_BOX_SHORT if VAGRANT_DEBIAN - default VAGRANT_OPENSUSE_BOX_SHORT if VAGRANT_OPENSUSE - default VAGRANT_REDHAT_GENERIC_BOX_SHORT if VAGRANT_REDHAT_GENERIC default GUESTFS_DEBIAN_BOX_SHORT if GUESTFS_DEBIAN config CUSTOM_SSH_KEXALGORITHMS string depends on HAVE_DISTRO_REQUIRES_CUSTOM_SSH_KEXALGORITHMS - default VAGRANT_SUSE_CUSTOM_SSH_KEXALGORITHMS if VAGRANT_SUSE config KDEVOPS_USE_DISTRO_HOSTS_PREFIX bool "Use a distribution release code name as prefix for hosts"
@@ -184,7 +180,6 @@ if KDEVOPS_ENABLE_DISTRO_EXTRA_ADDONS config KDEVOPS_EXTRA_ADDON_SOURCE string depends on HAVE_DISTRO_SUSE - default VAGRANT_SUSE_EXTRA_ADDON_SOURCE if VAGRANT endif # KDEVOPS_ENABLE_DISTRO_EXTRA_ADDONS
kconfigs/Kconfig.kernel-ci +2 -3
@@ -91,7 +91,7 @@ if KERNEL_CI_EMAIL_REPORT config KERNEL_CI_ADD_CUSTOM_SUBJECT_TOPIC bool "Enable a custom kernel-ci subject topic for email reports" - default y if BOOTLINUX || VAGRANT + default y if BOOTLINUX help Enable this so that you can customize the subject slightly for kernel-ci email reports. The email subject prefix will always
@@ -108,8 +108,7 @@ if KERNEL_CI_ADD_CUSTOM_SUBJECT_TOPIC config KERNEL_CI_SUBJECT_TOPIC string "Main email subject topic prefix to use" - default "" if !BOOTLINUX && !VAGRANT - default VAGRANT_PREFERRED_KERNEL_CI_SUBJECT_TOPIC if !BOOTLINUX && VAGRANT + default "" if !BOOTLINUX default BOOTLINUX_TREE_NAME if BOOTLINUX help Email kernel-ci subject will include the git tree name you are using.
kconfigs/Kconfig.libvirt +25 -28
141 lines not on this page · raw message
kconfigs/Kconfig.libvirt.largeio +1 -1
@@ -11,7 +11,7 @@ config QEMU_ENABLE_EXTRA_DRIVE_LARGEIO For now you will need a distribution with a root filesystem on XFS or btrfs, and so you will want to enable the kdevops distribution and - VAGRANT_KDEVOPS_DEBIAN_TESTING64_XFS_20230427. This is a requirement + LIBVIRT_KDEVOPS_DEBIAN_TESTING64_XFS_20230427. This is a requirement given all block devices must use iomap and that is the only current way to disable buffer-heads. Eventually this limitation is expected You can also use large-block-20230525 with Amazon Linux 2023 on AWS.
kconfigs/Kconfig.ssh +3 -3
@@ -50,8 +50,8 @@ config KDEVOPS_SSH_CONFIG_UPDATE_STRICT IdentitiesOnly yes LogLevel FATAL - You are encouraged to use this. Vagrant does this, and so you can't - disable this if you are using Vagrant. + You are encouraged to use this. This provides similar functionality + to what virtualization tools typically do. config KDEVOPS_SSH_CONFIG_UPDATE_BACKUP bool "Create a backup when updating your SSH config file"
@@ -62,6 +62,6 @@ config KDEVOPS_SSH_CONFIG_UPDATE_BACKUP ~/.ssh/config.backup.kdevops.$method - where $method is either Vagrant or terraform. + where $method is either libvirt or terraform. endif # KDEVOPS_SSH_CONFIG_UPDATE
kconfigs/workflows/Kconfig.data_partition +3 -5
@@ -55,7 +55,7 @@ config WORKFLOW_INFER_USER_AND_GROUP typically set the username and group ownership of that partition based on passed manual settings. Providing a good guess as defaults through kconfig about what the target user and group should be for the - data partition for systems created with vagrant is easy, but this is + data partition for systems created with libvirt is easy, but this is not as easy when users are using Terraform or bare metal. Instead of extending the possible sensible defaults for the target username and group to use for the data partition based the mechanism used for
@@ -72,7 +72,6 @@ if !WORKFLOW_INFER_USER_AND_GROUP config WORKFLOW_DATA_USER string "The username to use to chown on the target data workflow directory" default "kdevops" if GUESTFS - default "vagrant" if VAGRANT default TERRAFORM_SSH_CONFIG_USER if TERRAFORM help Manual setting for the username to chown the data workflow path.
@@ -80,14 +79,13 @@ config WORKFLOW_DATA_USER config WORKFLOW_DATA_GROUP string "The group to use to chown on the target data workflow directory" default "kdevops" if GUESTFS - default "vagrant" if VAGRANT default TERRAFORM_SSH_CONFIG_USER if TERRAFORM_AWS_AMI_DEBIAN || TERRAFORM_AZURE_IMAGE_PUBLISHER_DEBIAN default "users" if !TERRAFORM_AWS_AMI_DEBIAN && !TERRAFORM_AZURE_IMAGE_PUBLISHER_DEBIAN - default "root" if !VAGRANT && !TERRAFORM_AWS_AMI_DEBIAN && !TERRAFORM_AZURE_IMAGE_PUBLISHER_DEBIAN + default "root" if !TERRAFORM_AWS_AMI_DEBIAN && !TERRAFORM_AZURE_IMAGE_PUBLISHER_DEBIAN help Manual setting for the group to chgrp the data workflow path. - We default to "vagrant" if you are using vagrant, otherwise we rely + We rely on the the assumption your distribution has the "users" group created for distributions where we are certain of that. If on debian based systems we assume the same group exists with the username you used
kconfigs/workflows/Kconfig.shared +0 -4
@@ -51,7 +51,6 @@ config WORKFLOW_MAKE_CMD default "make -j 16" if TERRAFORM_AWS_INSTANCE_M5AD_4XLARGE default "make -j 1" if TERRAFORM_AZURE_VM_SIZE_STANDARD_DS1_V2 default "make -j 4" if TERRAFORM_AZURE_VM_SIZE_STANDARD_DS3_V2 - default "make -j 8" if VAGRANT help The actual make command to use when building Linux. You want to optimize this as per the number of cores you have.
@@ -98,7 +97,6 @@ config WORKFLOW_KDEVOPS_GIT default "https://github.com/linux-kdevops/kdevops.git" if !GIT_ALTERNATIVES && !HAVE_CUSTOM_KDEVOPS_GIT && !WORKFLOW_KDEVOPS_GIT_SET_BY_CLI default "https://github.com/linux-kdevops/kdevops.git" if GIT_LINUX_KDEVOPS_GITHUB && !HAVE_MIRROR_KDEVOPS default "https://gitlab.com/linux-kdevops/kdevops.git" if GIT_LINUX_KDEVOPS_GITLAB && !HAVE_MIRROR_KDEVOPS - default $(shell, scripts/append-makefile-vars.sh git:// $(KDEVOPS_DEFAULT_BRIDGE_IP_VAGRANT) /mirror/kdevops.git) if HAVE_MIRROR_KDEVOPS && VAGRANT && !WORKFLOW_KDEVOPS_GIT_SET_BY_CLI default $(shell, scripts/append-makefile-vars.sh git:// $(KDEVOPS_DEFAULT_BRIDGE_IP_GUESTFS) /mirror/kdevops.git) if HAVE_MIRROR_KDEVOPS && GUESTFS && !WORKFLOW_KDEVOPS_GIT_SET_BY_CLI default $(shell, ./scripts/append-makefile-vars.sh $(GUEST_KDEVOPS_REPO)) if WORKFLOW_KDEVOPS_GIT_SET_BY_CLI help
@@ -163,7 +161,6 @@ config CUSTOM_DISTRO_KOTD_REPO string "Distribution KOTD repository" depends on WORKFLOW_KOTD_ENABLE depends on HAVE_DISTRO_CUSTOM_KOTD_REPO - default VAGRANT_SUSE_KOTD_REPO if VAGRANT_SUSE help The URL of the custom KOTD repo for your Linux distribution.
@@ -171,6 +168,5 @@ config CUSTOM_DISTRO_KOTD_REPO_NAME string "Distribution KOTD repository name" depends on WORKFLOW_KOTD_ENABLE depends on HAVE_DISTRO_CUSTOM_KOTD_REPO - default VAGRANT_SUSE_KOTD_REPO_NAME if VAGRANT_SUSE help The name of the custom KOTD repo for your Linux distribution.
playbooks/python/workflows/blktests/augment_expunge_list.py +2 -1
@@ -137,7 +137,8 @@ def main(): shortcut_dir = None shortcut_file = None - if is_config_bool_true(config, "CONFIG_VAGRANT_SUSE"): + # Vagrant support removed - keeping for reference + if False and is_config_bool_true(config, "CONFIG_VAGRANT_SUSE"): # If kotd is enabled we assume you have the latest kernel and # all new results are relevant to that release. if is_config_bool_true(config, "CONFIG_WORKFLOW_KOTD_ENABLE"):
playbooks/python/workflows/fstests/augment_expunge_list.py +3 -2
@@ -113,7 +113,8 @@ def main(): shortcut_dir = None shortcut_file = None - if is_config_bool_true(config, "CONFIG_VAGRANT_SUSE"): + # Vagrant support removed - keeping for reference + if False and is_config_bool_true(config, "CONFIG_VAGRANT_SUSE"): if is_config_bool_true(config, "CONFIG_WORKFLOW_KOTD_ENABLE"): sles_host_parts = hostname.split("sles") if len(sles_host_parts) <= 1:
@@ -139,7 +140,7 @@ def main(): shortcut_kernel_dir = args.outputdir + '/' + shortcut_kernel + '/' + args.filesystem + '/' shortcut_dir = shortcut_kernel_dir + 'unassigned/' shortcut_file = shortcut_dir + section + '.txt' - elif is_config_bool_true(config, "CONFIG_VAGRANT_OPENSUSE"): + elif is_config_bool_true(config, "CONFIG_LIBVIRT_OPENSUSE"): if is_config_bool_true(config, "CONFIG_WORKFLOW_KOTD_ENABLE") and "leap" in hostname: leap_host_parts = hostname.split("leap") if len(leap_host_parts) <= 1:
playbooks/roles/bootlinux/defaults/main.yml +2 -2
@@ -4,8 +4,8 @@ kdevops_bootlinux: False infer_uid_and_group: False data_path: "/data" -data_user: "vagrant" -data_group: "vagrant" +data_user: "root" +data_group: "root" data_device: "/dev/disk/by-id/nvme-QEMU_NVMe_Ctrl_kdevops0" data_fstype: "xfs"
playbooks/roles/bootlinux/tasks/update-grub/install.yml +1 -1
@@ -54,7 +54,7 @@ # So for instance, using GRUB_DISABLE_SUBMENU=y results in the following # options: # -# vagrant@kdevops-xfs-nocrc ~ $ awk -F\' '/menuentry / {print $2}' /boot/grub/grub.cfg | awk '{print NR-1" ... "$0}' +# root@kdevops-xfs-nocrc ~ $ awk -F\' '/menuentry / {print $2}' /boot/grub/grub.cfg | awk '{print NR-1" ... "$0}' # 0 ... Debian GNU/Linux, with Linux 5.16.0-4-amd64 # 1 ... Debian GNU/Linux, with Linux 5.16.0-4-amd64 (recovery mode) # 2 ... Debian GNU/Linux, with Linux 5.10.105
playbooks/roles/devconfig/defaults/main.yml +1 -1
@@ -2,7 +2,7 @@ --- # Your target home directory -data_home_dir: "/home/vagrant" +data_home_dir: "/root" # On your own system dev_gitconfig_src: "~/.gitconfig"
playbooks/roles/devconfig/scripts/prepare_suse_repos.sh +1 -1
@@ -53,7 +53,7 @@ if [ "$(grep '^ID=' /etc/os-release | sed '/opensuse/d')" != "" ]; then # on SLED SUSEConnect tries to add the Nvidia repo with its own GPG key # => this causes a failure (as the key is unknown) # we therefore disable the Nvidia repo here, as it doesn't work with SLED 12 - # anyway and isn't really useful for a vagrant box + # anyway and isn't really useful for a virtual machine if [ "$REGISTER_SYSTEM" == "true" ]; then set +e # (need to `set +e` as the SUSEConnect can fail) SUSEConnect --regcode $REG_CODE
playbooks/roles/gen_hosts/defaults/main.yml +1 -0
@@ -28,6 +28,7 @@ kdevops_workflow_enable_gitr: False kdevops_workflow_enable_ltp: False kdevops_workflow_enable_nfstest: false kdevops_workflow_enable_sysbench: false +kdevops_workflow_enable_fio_tests: false kdevops_workflow_enable_mmtests: False is_fstests: False
playbooks/roles/gen_nodes/defaults/main.yml +3 -8
@@ -2,11 +2,7 @@ --- kdevops_enable_guestfs: False kdevops_enable_terraform: False -kdevops_enable_vagrant: False -kdevops_vagrant: '/dev/null' -kdevops_vagrant_generated: '/dev/null' -kdevops_vagrant_template: '/dev/null' -kdevops_nodes: "vagrant/kdevops_nodes.yaml" +kdevops_nodes: "kdevops_nodes.yaml" kdevops_baseline_and_dev: False kdevops_workflow_enable_cxl: False kdevops_workflow_enable_pynfs: False
@@ -15,6 +11,7 @@ kdevops_workflow_enable_ltp: False kdevops_workflow_enable_nfstest: false kdevops_workflow_enable_selftests: False kdevops_workflow_enable_mmtests: False +kdevops_workflow_enable_fio_tests: False kdevops_nfsd_enable: False kdevops_smbd_enable: False kdevops_krb5_enable: False
@@ -24,15 +21,13 @@ virtualbox_provider: False libvirt_provider: False libvirt_extra_drive_format: 'qcow2' -vagrant_box: "debian/testing64" -vagrant_box_version: "" libvirt_vcpus_count: 8 libvirt_mem_mb: 4096 gdb_port_conflict: False libvirt_enable_gdb: False libvirt_gdb_baseport: 1234 qemu_bin_path: "/usr/bin/qemu-system-x86_64" -extra_disk_path: ".vagrant/nvme_disks" +extra_disk_path: "./nvme_disks" extra_disk_driver: "nvme" extra_disk_controller: "NVMe" nvme_zone_enable: False
playbooks/roles/gen_nodes/templates/kdevops_nodes_split_start.j2.yaml deleted +0 -171
171 lines not on this page · raw message
playbooks/roles/gen_pci_kconfig/tasks/main.yml +1 -1
@@ -5,6 +5,6 @@ - kdevops_pcie_dynamic_kconfig - name: Generate libvirt PCI-E kcofig files - shell: "./python/workflows/dynamic-kconfig/gen-dynamic-pci.py {{ topdir_path }}/.dynamic-kconfig.pci.txt > {{ topdir_path }}/vagrant/Kconfig.passthrough_libvirt.generated" + shell: "./python/workflows/dynamic-kconfig/gen-dynamic-pci.py {{ topdir_path }}/.dynamic-kconfig.pci.txt > {{ topdir_path }}/Kconfig.passthrough_libvirt.generated" when: - kdevops_pcie_dynamic_kconfig
scripts/bringup.Makefile +0 -3
@@ -6,9 +6,6 @@ else stage-2-$(CONFIG_TERRAFORM) += kdevops_terraform_deps stage-2-$(CONFIG_LIBVIRT_INSTALL) += kdevops_install_libvirt stage-2-$(CONFIG_LIBVIRT_CONFIGURE) += kdevops_configure_libvirt -stage-2-$(CONFIG_VAGRANT_INSTALL_PRIVATE_BOXES) += kdevops_vagrant_boxes -stage-2-$(CONFIG_LIBVIRT_VERIFY) += kdevops_verify_libvirt_user -stage-2-$(CONFIG_LIBVIRT_STORAGE_POOL_CREATE) += kdevops_libvirt_storage_pool_create kdevops_stage_2: .config $(Q)$(MAKE) -f Makefile.kdevops $(stage-2-y)
scripts/check_distro_kconfig.sh +1 -5
@@ -1,8 +1,4 @@ #!/bin/bash # SPDX-License-Identifier: copyleft-next-0.3.1 -if [ -s "${TOPDIR}/vagrant/Kconfig.$1" ]; then - echo y -else - echo n -fi +echo n
scripts/check_pciepassthrough_kconfig.sh +1 -5
@@ -1,8 +1,4 @@ #!/bin/bash # SPDX-License-Identifier: copyleft-next-0.3.1 -if [[ -s "${TOPDIR}/vagrant/Kconfig.$1" ]]; then - echo y -else - echo n -fi +echo n
scripts/dynamic-pci-kconfig.Makefile +2 -2
@@ -2,7 +2,7 @@ PCIE_RUNTIME_VARS := "topdir_path": $(TOPDIR_PATH) -KDEVOPS_MRPROPER += vagrant/Kconfig.passthrough_libvirt.generated +KDEVOPS_MRPROPER += Kconfig.passthrough_libvirt.generated ifneq (,$(KDEVOPS_ENABLE_PCIE_KCONFIG)) DYNAMIC_KCONFIG += dynamic_pcipassthrough_kconfig
@@ -12,7 +12,7 @@ endif ifeq (,$(KDEVOPS_ENABLE_PCIE_KCONFIG)) DYNAMIC_KCONFIG += dynamic_pcipassthrough_kconfig_touch dynamic_pcipassthrough_kconfig_touch: - $(Q)touch vagrant/Kconfig.passthrough_libvirt.generated + $(Q)touch Kconfig.passthrough_libvirt.generated endif ifeq (y,$(CONFIG_KDEVOPS_LIBVIRT_PCIE_PASSTHROUGH))
scripts/gen-nodes.Makefile +0 -5
@@ -4,8 +4,6 @@ GEN_NODES_EXTRA_ARGS += kdevops_nodes='$(KDEVOPS_NODES)' GEN_NODES_EXTRA_ARGS += kdevops_nodes_template='$(KDEVOPS_NODES_TEMPLATE)' GEN_NODES_EXTRA_ARGS += kdevops_nodes_template_full_path='$(TOPDIR_PATH)/$(KDEVOPS_NODES_TEMPLATE)' -GEN_NODES_EXTRA_ARGS += vagrant_box='$(subst ",,$(CONFIG_VAGRANT_BOX))' -GEN_NODES_EXTRA_ARGS += vagrant_box_version='$(subst ",,$(CONFIG_VAGRANT_BOX_VERSION))' GEN_NODES_EXTRA_ARGS += libvirt_vcpus_count='$(subst ",,$(CONFIG_LIBVIRT_VCPUS_COUNT))' GEN_NODES_EXTRA_ARGS += libvirt_mem_mb='$(subst ",,$(CONFIG_LIBVIRT_MEM_MB))'
@@ -142,9 +140,6 @@ endif ifeq (y,$(CONFIG_LIBVIRT_EXTRA_DRIVE_FORMAT_RAW)) GEN_NODES_EXTRA_ARGS += libvirt_extra_drive_format='raw' endif -ifeq (y,$(CONFIG_VAGRANT_VIRTUALBOX)) -GEN_NODES_EXTRA_ARGS += libvirt_extra_drive_format='$(subst ",,$(CONFIG_VIRTUALBOX_EXTRA_DRIVE_FORMAT))' -endif ifeq (y,$(CONFIG_LIBVIRT_ENABLE_ZNS)) GEN_NODES_EXTRA_ARGS += nvme_zone_enable='True'
scripts/get-distro-default-bridge.sh +3 -8
@@ -4,9 +4,8 @@ DISTRO=$1 VIRT_TYPE=$2 # We currently ignore the distro because as far as we're concerned -# they all use the default IP, the only thing that differiantes it -# is if you are using vagrant or guestfs. If your distribution needs -# a different deafult it should be easy for you to extend it here. +# they all use the default IP. If your distribution needs +# a different default it should be easy for you to extend it here. DISTRO_FEDORA=`scripts/os-release-check.sh fedora` if [[ "$DISTRO_FEDORA" == "y" ]]; then
@@ -14,8 +13,4 @@ if [[ "$DISTRO_FEDORA" == "y" ]]; then exit 0 fi -if [[ "$VIRT_TYPE" == "vagrant" ]]; then - echo "192.168.124.1" -else - echo "192.168.122.1" -fi +echo "192.168.122.1"
scripts/provision.Makefile +0 -4
@@ -44,7 +44,6 @@ KDEVOPS_DESTROY_DEPS := # We export this into Makefiles so that we can use them both on Makefiles and # on Kconfig files with environment variables such as $(FOO) export KDEVOPS_DEFAULT_DISTRO := $(shell $(TOPDIR)/scripts/get-distro-prefix.sh) -export KDEVOPS_DEFAULT_BRIDGE_IP_VAGRANT := $(shell $(TOPDIR)/scripts/get-distro-default-bridge.sh $(KDEVOPS_DEFAULT_DISTRO) vagrant) export KDEVOPS_DEFAULT_BRIDGE_IP_GUESTFS := $(shell $(TOPDIR)/scripts/get-distro-default-bridge.sh $(KDEVOPS_DEFAULT_DISTRO) guestfs) # These go last
@@ -56,9 +55,6 @@ ifeq (y,$(CONFIG_TERRAFORM)) include scripts/terraform.Makefile endif # CONFIG_TERRAFORM -ifeq (y,$(CONFIG_VAGRANT)) -include scripts/vagrant.Makefile -endif ifeq (y,$(CONFIG_GUESTFS)) include scripts/guestfs.Makefile
scripts/tests.Makefile +0 -1
@@ -6,7 +6,6 @@ # target on each of these directories. These will run with a travis setup for # python 3.8. KDEVOPS_PYTHON_TESTS := -KDEVOPS_PYTHON_TESTS += playbooks/roles/update_ssh_config_vagrant/update_ssh_config/ KDEVOPS_TEST_TYPES := KDEVOPS_TEST_TYPES += python-tests
scripts/workflows/generic/run_kernel_ci.sh +1 -3
@@ -239,9 +239,7 @@ kernel_ci_watchdog_loop() fi if [[ "$WATCHDOG_RESET_HUNG_SYSTEMS" == "y" ]]; then for i in $(awk '{print $1}' $KERNEL_CI_WATCHDOG_RESULTS | grep -E -v "runtime|Hostname"); do - if [[ "$CONFIG_VAGRANT" == "y" ]]; then - sudo virsh reset vagrant_$i - elif [[ "$CONFIG_GUESTFS" == "y" ]]; then + if [[ "$CONFIG_GUESTFS" == "y" ]]; then sudo virsh reset $i else echo "$i : Unsupported crashy reset for this bringup configuration" >> $KERNEL_CI_WATCHDOG_FAIL_LOG
terraform/azure/main.tf +1 -1
@@ -93,7 +93,7 @@ resource "azurerm_linux_virtual_machine" "kdevops_vm" { count = local.kdevops_num_boxes # As of terraform 0.11 there is no easy way to convert a list to a map - # for the structure we have defined for the vagrant_boxes. We can use + # for the structure we have defined for the nodes. We can use # split to construct a subjset list though, and then key in with the # target left hand value name we want to look for. On the last split we # call always uses the second element given its a value: figure, we want
workflows/blktests/Kconfig +3 -6
@@ -20,7 +20,6 @@ config HAVE_MIRROR_DBENCH config BLKTESTS_DBENCH_GIT_URL string default DEFAULT_DBENCH_URL if !HAVE_MIRROR_DBENCH - default $(shell, scripts/append-makefile-vars.sh git:// $(KDEVOPS_DEFAULT_BRIDGE_IP_VAGRANT) /mirror/dbench.git) if HAVE_MIRROR_XFSDUMP && VAGRANT default $(shell, scripts/append-makefile-vars.sh git:// $(KDEVOPS_DEFAULT_BRIDGE_IP_GUESTFS) /mirror/dbench.git) if HAVE_MIRROR_XFSDUMP && GUESTFS config BLKTESTS_WATCHDOG
@@ -131,10 +130,10 @@ config BLKTESTS_WATCHDOG_RESET_HUNG_SYSTEMS have to also implement a way to try to capture kernel logs before a reset. - We currently only enable this for Vagrant provisioning, given we have + We currently only enable this for libvirt provisioning, given we have to figure out a unified way to express a reset for cloud solution and - also figure out a way to enable this for bare metal. For vagrant we - currently use 'virsh reset' and so this works only if on libvirt. + also figure out a way to enable this for bare metal. For libvirt we + currently use 'virsh reset'. endif # BLKTESTS_WATCHDOG
@@ -146,7 +145,6 @@ config HAVE_MIRROR_BLKTESTS config BLKTESTS_GIT string "The blktests git tree to clone" default DEFAULT_BLKTESTS_URL if !HAVE_MIRROR_BLKTESTS - default $(shell, scripts/append-makefile-vars.sh git:// $(KDEVOPS_DEFAULT_BRIDGE_IP_VAGRANT) /mirror/blktests.git) if HAVE_MIRROR_BLKTESTS && VAGRANT default $(shell, scripts/append-makefile-vars.sh git:// $(KDEVOPS_DEFAULT_BRIDGE_IP_GUESTFS) /mirror/blktests.git) if HAVE_MIRROR_BLKTESTS && GUESTFS help The blktests git tree to clone.
@@ -167,7 +165,6 @@ config HAVE_MIRROR_BLKTRACE config BLKTRACE_GIT string "The blktrace git tree to clone" default DEFAULT_BLKTRACE_URL if !HAVE_MIRROR_BLKTRACE - default $(shell, scripts/append-makefile-vars.sh git:// $(KDEVOPS_DEFAULT_BRIDGE_IP_VAGRANT) /mirror/blktrace.git) if HAVE_MIRROR_BLKTRACE && VAGRANT default $(shell, scripts/append-makefile-vars.sh git:// $(KDEVOPS_DEFAULT_BRIDGE_IP_GUESTFS) /mirror/blktrace.git) if HAVE_MIRROR_BLKTRACE && GUESTFS help The blktrace git tree to clone.
workflows/demos/reboot-limit/Makefile +1 -1
@@ -7,7 +7,7 @@ # This simple workflow relies on the default setting of the variable # KDEVOPS_NODES_TEMPLATE which to generate your target nodes. This can -# either be used by vagrant or terraform when building the nodes it will +# either be used by libvirt or terraform when building the nodes it will # create for bringup. The template file relies on jinja2 templating for # its parsing and generation and we rely on the ansible template module # to process this template file.
workflows/fstests/Kconfig +0 -2
@@ -324,11 +324,9 @@ config FSTESTS_GIT string "The fstests git tree to clone" output yaml default DEFAULT_FSTESTS_HTTPS_URL if !GIT_ALTERNATIVES && !HAVE_MIRROR_FSTESTS - default $(shell, scripts/append-makefile-vars.sh git:// $(KDEVOPS_DEFAULT_BRIDGE_IP_VAGRANT) /mirror/fstests.git) if !GIT_ALTERNATIVES && HAVE_MIRROR_FSTESTS && VAGRANT default $(shell, scripts/append-makefile-vars.sh git:// $(KDEVOPS_DEFAULT_BRIDGE_IP_GUESTFS) /mirror/fstests.git) if !GIT_ALTERNATIVES && HAVE_MIRROR_FSTESTS && GUESTFS default DEFAULT_FSTESTS_KDEVOPS_GITHUB_HTTPS_URL if GIT_LINUX_KDEVOPS_GITHUB && !HAVE_MIRROR_KDEVOPS_FSTESTS default DEFAULT_FSTESTS_KDEVOPS_GITLAB_HTTPS_URL if GIT_LINUX_KDEVOPS_GITLAB && !HAVE_MIRROR_KDEVOPS_FSTESTS - default $(shell, scripts/append-makefile-vars.sh git:// $(KDEVOPS_DEFAULT_BRIDGE_IP_VAGRANT) /mirror/kdevops/fstests.git) if GIT_ALTERNATIVES && HAVE_MIRROR_FSTESTS && VAGRANT default $(shell, scripts/append-makefile-vars.sh git:// $(KDEVOPS_DEFAULT_BRIDGE_IP_GUESTFS) /mirror/kdevops/fstests.git) if GIT_ALTERNATIVES && HAVE_MIRROR_FSTESTS && GUESTFS default "https://github.com/btrfs/fstests.git" if FSTESTS_BTRFS help
workflows/fstests/expunges/6.4.0-rc2-next-20230515/xfs/unassigned/fstests-next-20230515 deleted +0 -347
347 lines not on this page · raw message
workflows/fstests/xfs/Kconfig +0 -2
@@ -43,7 +43,6 @@ config HAVE_MIRROR_XFSPROGS config FSTESTS_XFS_XFSPROGS_GIT string "The Xfsprogs git tree to clone" default DEFAULT_XFSPROGS_URL if !HAVE_MIRROR_XFSPROGS - default $(shell, scripts/append-makefile-vars.sh git:// $(KDEVOPS_DEFAULT_BRIDGE_IP_VAGRANT) /mirror/xfsprogs-dev.git) if HAVE_MIRROR_XFSPROGS && VAGRANT default $(shell, scripts/append-makefile-vars.sh git:// $(KDEVOPS_DEFAULT_BRIDGE_IP_GUESTFS) /mirror/xfsprogs-dev.git) if HAVE_MIRROR_XFSPROGS && GUESTFS depends on FSTESTS_XFS_BUILD_CUSTOM_XFSPROGS help
@@ -83,7 +82,6 @@ config FSTESTS_XFSDUMP_GIT_URL string "The xfsdump git tree to clone" depends on FSTESTS_XFS_BUILD_XFSDUMP default DEFAULT_XFSDUMP_URL if !HAVE_MIRROR_XFSDUMP - default $(shell, scripts/append-makefile-vars.sh git:// $(KDEVOPS_DEFAULT_BRIDGE_IP_VAGRANT) /mirror/xfsdump-dev.git) if HAVE_MIRROR_XFSDUMP && VAGRANT default $(shell, scripts/append-makefile-vars.sh git:// $(KDEVOPS_DEFAULT_BRIDGE_IP_GUESTFS) /mirror/xfsdump-dev.git) if HAVE_MIRROR_XFSDUMP && GUESTFS help The xfsdump git tree to clone
workflows/linux/Kconfig.linus +0 -1
@@ -48,7 +48,6 @@ config BOOTLINUX_TREE_LINUS_NAME config BOOTLINUX_TREE_LINUS_URL string default DEFAULT_TORVALDS_HTTPS_URL if !USE_LOCAL_LINUX_MIRROR - default $(shell, scripts/append-makefile-vars.sh git:// $(KDEVOPS_DEFAULT_BRIDGE_IP_VAGRANT) /mirror/linux.git) if USE_LIBVIRT_MIRROR && !BOOTLINUX_9P && VAGRANT default $(shell, scripts/append-makefile-vars.sh git:// $(KDEVOPS_DEFAULT_BRIDGE_IP_GUESTFS) /mirror/linux.git) if USE_LIBVIRT_MIRROR && !BOOTLINUX_9P && GUESTFS default "/mirror/linux.git" if USE_LIBVIRT_MIRROR && BOOTLINUX_9P
workflows/linux/Kconfig.mcgrof +0 -1
@@ -29,7 +29,6 @@ config BOOTLINUX_TREE_MCGROF_URL default "/mirror/mcgrof-next.git" if BOOTLINUX_TREE_MCGROF_NEXT && USE_LIBVIRT_MIRROR && BOOTLINUX_9P default DEFAULT_MCGROF_LINUS_GIT_URL if BOOTLINUX_TREE_MCGROF_LINUS && !USE_LOCAL_LINUX_MIRROR default "/mirror/mcgrof-linus.git" if BOOTLINUX_TREE_MCGROF_LINUS && USE_LIBVIRT_MIRROR && BOOTLINUX_9P - default $(shell, scripts/append-makefile-vars.sh git:// $(KDEVOPS_DEFAULT_BRIDGE_IP_VAGRANT) /mirror/mcgrof-linus.git) if BOOTLINUX_TREE_MCGROF_LINUS && USE_LIBVIRT_MIRROR && !BOOTLINUX_9P && VAGRANT default $(shell, scripts/append-makefile-vars.sh git:// $(KDEVOPS_DEFAULT_BRIDGE_IP_GUESTFS) /mirror/mcgrof-next.git) if BOOTLINUX_TREE_MCGROF_NEXT && USE_LIBVIRT_MIRROR && !BOOTLINUX_9P && GUESTFS endif # BOOTLINUX_TREE_MCGROF_LINUS || BOOTLINUX_TREE_MCGROF_NEXT
workflows/linux/Kconfig.modules +0 -1
@@ -14,7 +14,6 @@ config BOOTLINUX_TREE_MODULES_URL string default DEFAULT_MODULES_GIT_URL if BOOTLINUX_TREE_VFS && !USE_LOCAL_LINUX_MIRROR default "/mirror/linux-modules.git" if BOOTLINUX_TREE_MODULES && USE_LIBVIRT_MIRROR && BOOTLINUX_9P - default $(shell, scripts/append-makefile-vars.sh git:// $(KDEVOPS_DEFAULT_BRIDGE_IP_VAGRANT) /mirror/modules.git) if BOOTLINUX_TREE_MODULES && USE_LIBVIRT_MIRROR && !BOOTLINUX_9P && VAGRANT default $(shell, scripts/append-makefile-vars.sh git:// $(KDEVOPS_DEFAULT_BRIDGE_IP_GUESTFS) /mirror/modules.git) if BOOTLINUX_TREE_MODULES && USE_LIBVIRT_MIRROR && !BOOTLINUX_9P && GUESTFS endif # BOOTLINUX_TREE_MODULES
workflows/linux/Kconfig.next +0 -1
@@ -10,7 +10,6 @@ config BOOTLINUX_TREE_NEXT_NAME config BOOTLINUX_TREE_NEXT_URL string default DEFAULT_LINUX_NEXT_GIT_URL if !USE_LOCAL_LINUX_MIRROR - default $(shell, scripts/append-makefile-vars.sh git:// $(KDEVOPS_DEFAULT_BRIDGE_IP_VAGRANT) /mirror/linux-next.git) if USE_LIBVIRT_MIRROR && !BOOTLINUX_9P && VAGRANT default $(shell, scripts/append-makefile-vars.sh git:// $(KDEVOPS_DEFAULT_BRIDGE_IP_GUESTFS) /mirror/linux-next.git) if USE_LIBVIRT_MIRROR && !BOOTLINUX_9P && GUESTFS default "/mirror/linux-next.git" if USE_LIBVIRT_MIRROR && BOOTLINUX_9P
workflows/linux/Kconfig.stable +0 -1
@@ -25,7 +25,6 @@ config BOOTLINUX_TREE_STABLE_NAME config BOOTLINUX_TREE_STABLE_URL string default DEFAULT_STABLE_HTTPS_URL if !USE_LOCAL_LINUX_MIRROR - default $(shell, scripts/append-makefile-vars.sh git:// $(KDEVOPS_DEFAULT_BRIDGE_IP_VAGRANT) /mirror/linux-stable.git) if USE_LIBVIRT_MIRROR && !BOOTLINUX_9P && VAGRANT default $(shell, scripts/append-makefile-vars.sh git:// $(KDEVOPS_DEFAULT_BRIDGE_IP_GUESTFS) /mirror/linux-stable.git) if USE_LIBVIRT_MIRROR && !BOOTLINUX_9P && GUESTFS default "/mirror/linux-stable.git" if USE_LIBVIRT_MIRROR && BOOTLINUX_9P
workflows/linux/Kconfig.vfs +0 -1
@@ -14,7 +14,6 @@ config BOOTLINUX_TREE_VFS_URL string default DEFAULT_VFS_GIT_URL if BOOTLINUX_TREE_VFS && !USE_LOCAL_LINUX_MIRROR default "/mirror/vfs.git" if BOOTLINUX_TREE_VFS && USE_LIBVIRT_MIRROR && BOOTLINUX_9P - default $(shell, scripts/append-makefile-vars.sh git:// $(KDEVOPS_DEFAULT_BRIDGE_IP_VAGRANT) /mirror/vfs.git) if BOOTLINUX_TREE_VFS && USE_LIBVIRT_MIRROR && !BOOTLINUX_9P && VAGRANT default $(shell, scripts/append-makefile-vars.sh git:// $(KDEVOPS_DEFAULT_BRIDGE_IP_GUESTFS) /mirror/vfs.git) if BOOTLINUX_TREE_MCGROF_NEXT && USE_LIBVIRT_MIRROR && !BOOTLINUX_9P && GUESTFS endif # BOOTLINUX_TREE_VFS
workflows/linux/Kconfig.xfs +0 -1
@@ -14,7 +14,6 @@ config BOOTLINUX_TREE_XFS_URL string default DEFAULT_XFS_GIT_URL if BOOTLINUX_TREE_XFS && !USE_LOCAL_LINUX_MIRROR default "/mirror/xfs-linux.git" if BOOTLINUX_TREE_XFS && USE_LIBVIRT_MIRROR && BOOTLINUX_9P - default $(shell, scripts/append-makefile-vars.sh git:// $(KDEVOPS_DEFAULT_BRIDGE_IP_VAGRANT) /mirror/xfs-linux.git) if BOOTLINUX_TREE_XFS && USE_LIBVIRT_MIRROR && !BOOTLINUX_9P && VAGRANT default $(shell, scripts/append-makefile-vars.sh git:// $(KDEVOPS_DEFAULT_BRIDGE_IP_GUESTFS) /mirror/xfs-linux.git) if BOOTLINUX_TREE_XFS && USE_LIBVIRT_MIRROR && !BOOTLINUX_9P && GUESTFS endif # BOOTLINUX_TREE_XFS
Signature · 1 line
2.47.2
PATCH v2 8/33 terraform: Clean up the destroy tasks
In reply to Luis ChamberlainFrom: Chuck Lever <[email protected]>
Originally these tasks needed to run for each inventory host, but as it turns out, they run once on the controller.
--- playbooks/roles/terraform/tasks/main.yml | 4 ---- scripts/terraform.Makefile | 2 +- 2 files changed, 1 insertion(+), 5 deletions(-)
playbooks/roles/terraform/tasks/main.yml +0 -4
@@ -59,8 +59,6 @@ - ssh - name: Remove the ephemeral ssh config file on the control host - delegate_to: localhost - run_once: true ansible.builtin.file: path: "{{ kdevops_ssh_config }}" state: absent
@@ -68,8 +66,6 @@ - destroy - name: Destroy terraform resources - delegate_to: localhost - run_once: true community.general.terraform: project_path: "{{ topdir_path }}/terraform/{{ kdevops_terraform_provider }}" state: absent
scripts/terraform.Makefile +1 -1
@@ -117,7 +117,7 @@ status_terraform: destroy_terraform: $(Q)ansible-playbook $(ANSIBLE_VERBOSE) \ - --connection=local -i $(KDEVOPS_HOSTFILE) \ + --connection=local --inventory localhost, \ playbooks/terraform.yml --tags destroy \ --extra-vars=@./extra_vars.yaml $(Q)rm -f $(KDEVOPS_PROVISIONED_SSH) $(KDEVOPS_PROVISIONED_DEVCONFIG)
Signature · 1 line
2.47.2
PATCH v2 9/33 Switch to the cloud.terraform.terraform module
In reply to Luis ChamberlainFrom: Chuck Lever <[email protected]>
It appears that community.general.terraform is planned for deprecation, so switch over to it's replacement.
Bonus: The replacement module has a "binary_path" parameter that might facilitate the use of OpenTofu instead of terraform.
--- playbooks/roles/terraform/tasks/main.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
playbooks/roles/terraform/tasks/main.yml +4 -4
@@ -1,9 +1,9 @@ --- - name: Bring up terraform resources - community.general.terraform: + cloud.terraform.terraform: + force_init: true project_path: "{{ topdir_path }}/terraform/{{ kdevops_terraform_provider }}" state: present - force_init: true tags: - bringup
@@ -66,9 +66,9 @@ - destroy - name: Destroy terraform resources - community.general.terraform: + cloud.terraform.terraform: + force_init: true project_path: "{{ topdir_path }}/terraform/{{ kdevops_terraform_provider }}" state: absent - force_init: true tags: - destroy
Signature · 1 line
2.47.2
PATCH v2 10/33 terraform: Make use of the new "terraform_output" module
In reply to Luis ChamberlainFrom: Chuck Lever <[email protected]>
The cloud.terraform collection has a terraform_output module that can replace the invocation of the terraform command. This has two main benefits:
1. It simplifies the loop over the IP map.
2. It prepares for the possibility of using OpenTofu instead of the terraform module.
--- playbooks/roles/terraform/tasks/main.yml | 21 +++++++------------ .../roles/terraform/templates/ssh_config.j2 | 4 ++-- 2 files changed, 9 insertions(+), 16 deletions(-)
playbooks/roles/terraform/tasks/main.yml +7 -14
@@ -10,32 +10,25 @@ - name: Retrieve the controller_ip_map from terraform delegate_to: localhost run_once: true - ansible.builtin.command: - chdir: "{{ topdir_path }}/terraform/{{ kdevops_terraform_provider }}" - cmd: "terraform output -json controller_ip_map" + cloud.terraform.terraform_output: + format: json + name: controller_ip_map + project_path: "{{ topdir_path }}/terraform/{{ kdevops_terraform_provider }}" register: terraform_output - changed_when: false - tags: - - ssh - -- name: Convert the retrieved controller_ip_map into a dictionary - delegate_to: localhost - run_once: true - ansible.builtin.set_fact: - controller_ip_map: "{{ terraform_output.stdout | from_json }}" tags: - ssh - name: Add each target node's ssh Host entry on the control host delegate_to: localhost - throttle: 1 + run_once: true ansible.builtin.blockinfile: block: "{{ lookup('template', 'ssh_config.j2') }}" create: true dest: "{{ kdevops_ssh_config }}" insertafter: "EOF" - marker: "# {mark} host configuration for {{ inventory_hostname }}" + marker: "# {mark} host configuration for {{ item.key }}" mode: "u=rw,g=r,o=r" + loop: "{{ terraform_output.value | dict2items }}" tags: - ssh
playbooks/roles/terraform/templates/ssh_config.j2 +2 -2
@@ -1,5 +1,5 @@ -Host {{ inventory_hostname }} {{ controller_ip_map[inventory_hostname] }} - HostName {{ controller_ip_map[inventory_hostname] }} +Host {{ item.key }} {{ item.value }} + HostName {{ item.value }} User {{ kdevops_terraform_ssh_config_user }} Port 22 IdentityFile {{ kdevops_terraform_ssh_config_privkey_file }}
Signature · 1 line
2.47.2
PATCH v2 11/33 terraform: Move "wait_for_connection" out of the terraform playbook
In reply to Luis ChamberlainFrom: Chuck Lever <[email protected]>
Refactor: The "wait_for_connection" task is the only one in the terraform playbook that targets all hosts. The other tasks are all done on the localhost.
Subsequent patches will replace "delegate_to: localhost" with the usual role-wide setting.
--- playbooks/roles/terraform/tasks/main.yml | 6 ------ scripts/terraform.Makefile | 1 + 2 files changed, 1 insertion(+), 6 deletions(-)
playbooks/roles/terraform/tasks/main.yml +0 -6
@@ -45,12 +45,6 @@ tags: - ssh -- name: Wait for target nodes to become reachable - ansible.builtin.wait_for_connection: - timeout: 60 - tags: - - ssh - - name: Remove the ephemeral ssh config file on the control host ansible.builtin.file: path: "{{ kdevops_ssh_config }}"
scripts/terraform.Makefile +1 -0
@@ -110,6 +110,7 @@ $(KDEVOPS_PROVISIONED_SSH): -i $(KDEVOPS_HOSTFILE) \ playbooks/terraform.yml --tags ssh \ --extra-vars=@./extra_vars.yaml + $(Q)ansible $(ANSIBLE_VERBOSE) -i hosts all -m wait_for_connection $(Q)touch $(KDEVOPS_PROVISIONED_SSH) status_terraform:
Signature · 1 line
2.47.2
PATCH v2 12/33 terraform: Remove "delegate_to: localhost"
In reply to Luis ChamberlainFrom: Chuck Lever <[email protected]>
Refactor: All tasks in this playbook execute only on the controller. This enables the role definition and Makefile to be simplified.
--- playbooks/roles/terraform/tasks/main.yml | 6 ------ playbooks/terraform.yml | 3 ++- scripts/terraform.Makefile | 6 +++--- 3 files changed, 5 insertions(+), 10 deletions(-)
playbooks/roles/terraform/tasks/main.yml +0 -6
@@ -8,8 +8,6 @@ - bringup - name: Retrieve the controller_ip_map from terraform - delegate_to: localhost - run_once: true cloud.terraform.terraform_output: format: json name: controller_ip_map
@@ -19,8 +17,6 @@ - ssh - name: Add each target node's ssh Host entry on the control host - delegate_to: localhost - run_once: true ansible.builtin.blockinfile: block: "{{ lookup('template', 'ssh_config.j2') }}" create: true
@@ -33,8 +29,6 @@ - ssh - name: Ensure the Include directive is present on the controller - delegate_to: localhost - run_once: true ansible.builtin.blockinfile: path: "{{ sshconfig }}" insertbefore: BOF
playbooks/terraform.yml +2 -1
@@ -1,6 +1,7 @@ --- - name: Provision target nodes with terraform gather_facts: false - hosts: all + connection: local + hosts: localhost roles: - role: terraform
scripts/terraform.Makefile +3 -3
@@ -101,13 +101,13 @@ ANSIBLE_EXTRA_ARGS += $(TERRAFORM_EXTRA_VARS) bringup_terraform: $(Q)ansible-playbook $(ANSIBLE_VERBOSE) \ - --connection=local --inventory localhost, \ + --inventory localhost, \ playbooks/terraform.yml --tags bringup \ --extra-vars=@./extra_vars.yaml $(KDEVOPS_PROVISIONED_SSH): $(Q)ansible-playbook $(ANSIBLE_VERBOSE) \ - -i $(KDEVOPS_HOSTFILE) \ + --inventory localhost, \ playbooks/terraform.yml --tags ssh \ --extra-vars=@./extra_vars.yaml $(Q)ansible $(ANSIBLE_VERBOSE) -i hosts all -m wait_for_connection
@@ -118,7 +118,7 @@ status_terraform: destroy_terraform: $(Q)ansible-playbook $(ANSIBLE_VERBOSE) \ - --connection=local --inventory localhost, \ + --inventory localhost, \ playbooks/terraform.yml --tags destroy \ --extra-vars=@./extra_vars.yaml $(Q)rm -f $(KDEVOPS_PROVISIONED_SSH) $(KDEVOPS_PROVISIONED_DEVCONFIG)
Signature · 1 line
2.47.2
PATCH v2 13/33 terraform: Replace scripts/status_terraform.sh
In reply to Luis ChamberlainFrom: Chuck Lever <[email protected]>
Move the functionality into the terraform playbook so it can use the cloud.terraform.terraform module.
--- playbooks/roles/terraform/tasks/main.yml | 31 ++++++++++++++++++++++++ scripts/status_terraform.sh | 17 ------------- scripts/terraform.Makefile | 5 +++- 3 files changed, 35 insertions(+), 18 deletions(-) delete mode 100755 scripts/status_terraform.sh
playbooks/roles/terraform/tasks/main.yml +31 -0
@@ -39,6 +39,37 @@ tags: - ssh +- name: Report terraform status + tags: + - status + block: + - name: Retrieve the controller_ip_map from terraform + cloud.terraform.terraform_output: + format: json + name: controller_ip_map + project_path: "{{ topdir_path }}/terraform/{{ kdevops_terraform_provider }}" + register: terraform_output + + - name: End play -- terraform state file is empty or missing + ansible.builtin.meta: end_play + when: + - terraform_output.warnings is defined + + - name: Count active resources + ansible.builtin.command: + cmd: "terraform state list" + chdir: "{{ topdir_path }}/terraform/{{ kdevops_terraform_provider }}" + register: terraform_state + changed_when: false + + - name: Show status + ansible.builtin.debug: + msg: "Active resources: {{ terraform_state.stdout_lines | length }}" + + - name: Show controller IP map + ansible.builtin.debug: + var: terraform_output.value + - name: Remove the ephemeral ssh config file on the control host ansible.builtin.file: path: "{{ kdevops_ssh_config }}"
scripts/status_terraform.sh deleted +0 -17
@@ -1,17 +0,0 @@ -#!/bin/bash -# SPDX-License-Identifier: copyleft-next-0.3.1 - -[ -z "${TOPDIR}" ] && TOPDIR='.' -source ${TOPDIR}/.config -source ${TOPDIR}/scripts/lib.sh - -cd ${TOPDIR}/terraform/$1 -terraform refresh > /dev/null -COUNT=`terraform state list | wc -l` -if [[ ${COUNT} -eq 1 ]]; then - echo "There is 1 active terraform resource on '$1'." -else - echo "There are ${COUNT} active terraform resources on '$1'." -fi -terraform output controller_ip_map -exit 0
scripts/terraform.Makefile +4 -1
@@ -114,7 +114,10 @@ $(KDEVOPS_PROVISIONED_SSH): $(Q)touch $(KDEVOPS_PROVISIONED_SSH) status_terraform: - $(Q)scripts/status_terraform.sh $(KDEVOPS_CLOUD_PROVIDER) + $(Q)ansible-playbook $(ANSIBLE_VERBOSE) \ + --inventory localhost, \ + playbooks/terraform.yml --tags status \ + --extra-vars=@./extra_vars.yaml destroy_terraform: $(Q)ansible-playbook $(ANSIBLE_VERBOSE) \
Signature · 1 line
2.47.2
PATCH v2 14/33 Kconfig: Convert the 9p option to a choice menu
In reply to Luis ChamberlainFrom: Chuck Lever <[email protected]>
I'm about to add a third method for building the kernel that excludes the use of 9p. As a pre-requisite to that change, wrap the two existing options with a choice menu, since they are exclusive of each other.
This introduces a boolean for non-9p build configurations, to be used in subsequent patches.
No behavior change is expected.
--- workflows/linux/Kconfig | 55 +++++++++++++++++++++++++++++----------- workflows/linux/Makefile | 1 - 2 files changed, 40 insertions(+), 16 deletions(-)
workflows/linux/Kconfig +40 -15
@@ -31,27 +31,52 @@ config BOOTLINUX_PURE_IOMAP bool "Use a kernel configuration which disables buffer heads" default HAVE_SUPPORTS_PURE_IOMAP depends on BOOTLINUX_HAS_PURE_IOMAP_CONFIG - help - This will let you choose use 9p to build Linux. What this does is endif # HAVE_SUPPORTS_PURE_IOMAP +choice + prompt "Kernel build location" + default BOOTLINUX_TARGETS + help + Choose where you want to compile the test kernel. The help + for the choices below explain how each alternative works. + +config BOOTLINUX_TARGETS + bool "Target nodes" + output yaml + help + Choosing this option clones and builds the test kernel on + each target node, then installs the test kernel and + reboots each target node. These actions are triggered by + using "make linux". + + This choice is best when the target node configuration is + vastly different than the controller node's configuration. + It is the only choice available when the target nodes + reside in the cloud. + config BOOTLINUX_9P - bool "Use 9p to build Linux" + bool "Controller node" + output yaml depends on LIBVIRT && !GUESTFS_LACKS_9P - default LIBVIRT help - This will let you choose use 9p to build Linux. What this does is - use your localhost to git clone Linux under the assumption your - host is more powerful than the guests you are going to instantiate. - The localhost then will be used to build Linux using all threads - possible. The installation of Linux on the guest is done only with - the install target, the guest gets read-only access to the host's - path where Linux is closed using 9p. - - You should not have to modify any default 9p settings except maybe - where your localhost path for your git tree is. You should keep - the other settings as-is unless you know what you are doing. + Choosing this option clones and builds the test kernel on + the Ansible controller node. Once the test kernel is + built, the target nodes access the controller node's build + directory via 9p to install the test kernel, then each + target node is rebooted into the new kernel. These actions + are triggered by using "make linux". + + This is quick and efficient (since the kernel is built only + once, and the build has access to all compute resources on + the controller node). The source tree and compiled artifacts + are not removed when the test runners are destroyed, so + subsequent builds can be fast. + + However, 9p is available only when using a local + virtualization method such as libvirt. + +endchoice if BOOTLINUX_9P
workflows/linux/Makefile +0 -1
@@ -42,7 +42,6 @@ endif LINUX_CLONE_DEFAULT_TYPE := linux-clone-clients ifeq (y,$(CONFIG_BOOTLINUX_9P)) -BOOTLINUX_ARGS += bootlinux_9p=True BOOTLINUX_ARGS += bootlinux_9p_host_path='$(subst ",,$(CONFIG_BOOTLINUX_9P_HOST_PATH))' BOOTLINUX_ARGS += bootlinux_9p_msize='$(subst ",,$(CONFIG_BOOTLINUX_9P_MSIZE))' BOOTLINUX_ARGS += bootlinux_9p_fsdev='$(subst ",,$(CONFIG_BOOTLINUX_9P_FSDEV))'
Signature · 1 line
2.47.2
PATCH v2 15/33 bootlinux: fix making 9p default if using libvirt
In reply to Luis ChamberlainCommit a5092b07fe ("Kconfig: Convert the 9p option to a choice menu") enhanced the semantics to use a choice instead of just bools to determine how we are going to build the kernel. But it ended up making the target option to build the kernel and clone it the default even if you are using libvirt. Fix this so that we only select the target if we're not using libvirt. This upkeeps previous behaviour and expectations.
--- workflows/linux/Kconfig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
workflows/linux/Kconfig +2 -1
@@ -36,7 +36,8 @@ endif # HAVE_SUPPORTS_PURE_IOMAP choice prompt "Kernel build location" - default BOOTLINUX_TARGETS + default BOOTLINUX_TARGETS if !LIBVIRT || GUESTFS_LACKS_9P + default BOOTLINUX_9P if LIBVIRT && !GUESTFS_LACKS_9P help Choose where you want to compile the test kernel. The help for the choices below explain how each alternative works.
Signature · 1 line
2.47.2
PATCH v2 16/33 bootlinux: Relocate tasks that select a kernel .config
In reply to Luis ChamberlainFrom: Chuck Lever <[email protected]>
Move the tasks that select the kernel .config to build into a subrole. A dynamic "include_tasks" is used so that eventually these tasks can be completely skipped when the bootlinux playbook is asked only to install kernel packages.
--- playbooks/roles/bootlinux/tasks/config.yml | 89 +++++++++++++++++++++ playbooks/roles/bootlinux/tasks/main.yml | 91 +--------------------- 2 files changed, 92 insertions(+), 88 deletions(-) create mode 100644 playbooks/roles/bootlinux/tasks/config.yml
playbooks/roles/bootlinux/tasks/config.yml new file +89 -0
@@ -0,0 +1,89 @@ +--- +- name: Check whether config-kdevops exists + stat: + path: "{{ role_path }}/templates/config-kdevops" + register: config_kdevops + delegate_to: localhost + +- name: Found config-kdevops, using it for template + set_fact: + linux_config: "config-kdevops" + when: config_kdevops.stat.exists + +- name: No config-kdevops, looking for {{ target_linux_config }} + set_fact: + linux_config: "{{ target_linux_config }}" + when: not config_kdevops.stat.exists + +- name: Check if specific kernel config exists for {{ target_linux_ref }} + stat: + path: "{{ role_path }}/templates/{{ target_linux_config }}" + register: kernel_config + delegate_to: localhost + +- name: Find all linux-next configs if a your custom config-kdevops and ref config was not found + find: + paths: "{{ role_path }}/templates" + patterns: "config-next*" + file_type: file + recurse: no + register: found_configs + delegate_to: localhost + when: + - not config_kdevops.stat.exists + - not kernel_config.stat.exists + +- name: Extract the date from the filenames + set_fact: + configs_with_dates: "{{ configs_with_dates | default([]) + [{'file': item.path, 'date': (item.path | regex_search('config-next-(\\d{8})')).split('-')[-1]}] }}" + loop: "{{ found_configs.files }}" + when: + - not config_kdevops.stat.exists + - not kernel_config.stat.exists + - item.path is search('config-next-(\\d{8})') + no_log: true + delegate_to: localhost + +- name: Sort configs based on date extracted from filename + set_fact: + sorted_configs: "{{ configs_with_dates | selectattr('date', 'defined') | sort(attribute='date', reverse=True) | map(attribute='file') | list }}" + when: + - not config_kdevops.stat.exists + - not kernel_config.stat.exists + - configs_with_dates | length > 0 + delegate_to: localhost + +- name: Set latest linux-next config if configs are found + set_fact: + latest_linux_next_config: "{{ sorted_configs[0] }}" + when: + - not config_kdevops.stat.exists and not kernel_config.stat.exists + - sorted_configs | length > 0 + delegate_to: localhost + +- name: Use the specific kernel config or fallback to the latest linux-next + set_fact: + linux_config: "{{ target_linux_config | default('') if kernel_config.stat.exists else (latest_linux_next_config | default('') | basename) }}" + when: + - not config_kdevops.stat.exists + - not kernel_config.stat.exists + - latest_linux_next_config is defined + delegate_to: localhost + +- name: Verify config used + debug: + msg: "Linux config used: {{ role_path }}/templates/{{ linux_config }}" + delegate_to: localhost + +- name: Verify that the Linux configuration file exists + stat: + path: "{{ role_path }}/templates/{{ linux_config }}" + register: config_stat + delegate_to: localhost + when: linux_config is defined + +- name: Fail if the configuration file does not exist + fail: + msg: "The configuration file {{ role_path }}/templates/{{ linux_config }} does not exist." + when: not config_stat.stat.exists + delegate_to: localhost
playbooks/roles/bootlinux/tasks/main.yml +3 -88
97 lines not on this page · raw message
Signature · 1 line
2.47.2
PATCH v2 17/33 bootlinux: Simplify tasks that select the kernel .config to build
In reply to Luis ChamberlainFrom: Chuck Lever <[email protected]>
Simplify/modernize the selection tasks by using convenience functions that are built into Ansible. I'm hoping this makes the tasks easier to read, easier to maintain, and faster.
--- playbooks/roles/bootlinux/tasks/config.yml | 109 ++++++--------------- 1 file changed, 29 insertions(+), 80 deletions(-)
playbooks/roles/bootlinux/tasks/config.yml +29 -80
@@ -1,89 +1,38 @@ --- -- name: Check whether config-kdevops exists - stat: - path: "{{ role_path }}/templates/config-kdevops" - register: config_kdevops - delegate_to: localhost - -- name: Found config-kdevops, using it for template - set_fact: - linux_config: "config-kdevops" - when: config_kdevops.stat.exists - -- name: No config-kdevops, looking for {{ target_linux_config }} - set_fact: - linux_config: "{{ target_linux_config }}" - when: not config_kdevops.stat.exists +- name: Initialize the kernel config file names search list + ansible.builtin.set_fact: + search_list: + - "{{ role_path }}/templates/config-kdevops" + - "{{ role_path }}/templates/{{ target_linux_config }}" -- name: Check if specific kernel config exists for {{ target_linux_ref }} - stat: - path: "{{ role_path }}/templates/{{ target_linux_config }}" - register: kernel_config +- name: Find all linux-next kernel config files delegate_to: localhost - -- name: Find all linux-next configs if a your custom config-kdevops and ref config was not found - find: + run_once: true + ansible.builtin.find: paths: "{{ role_path }}/templates" - patterns: "config-next*" + patterns: "config-next-*" file_type: file - recurse: no - register: found_configs - delegate_to: localhost - when: - - not config_kdevops.stat.exists - - not kernel_config.stat.exists - -- name: Extract the date from the filenames - set_fact: - configs_with_dates: "{{ configs_with_dates | default([]) + [{'file': item.path, 'date': (item.path | regex_search('config-next-(\\d{8})')).split('-')[-1]}] }}" - loop: "{{ found_configs.files }}" - when: - - not config_kdevops.stat.exists - - not kernel_config.stat.exists - - item.path is search('config-next-(\\d{8})') - no_log: true - delegate_to: localhost - -- name: Sort configs based on date extracted from filename - set_fact: - sorted_configs: "{{ configs_with_dates | selectattr('date', 'defined') | sort(attribute='date', reverse=True) | map(attribute='file') | list }}" + register: linux_next_configs + +- name: Build a list of linux-next kernel config file names + ansible.builtin.set_fact: + config_file_names: "{{ config_file_names | default([]) + [item.path] }}" + loop: "{{ linux_next_configs.files }}" + loop_control: + label: "Adding {{ item.path | basename }}..." when: - - not config_kdevops.stat.exists - - not kernel_config.stat.exists - - configs_with_dates | length > 0 - delegate_to: localhost + - linux_next_configs.matched > 0 -- name: Set latest linux-next config if configs are found - set_fact: - latest_linux_next_config: "{{ sorted_configs[0] }}" +- name: Append the name of the most recent linux-next kernel config to the search list + vars: + config_file_names_sorted: "{{ config_file_names | community.general.version_sort }}" + ansible.builtin.set_fact: + search_list: "{{ search_list + [config_file_names_sorted[-1]] }}" when: - - not config_kdevops.stat.exists and not kernel_config.stat.exists - - sorted_configs | length > 0 - delegate_to: localhost - -- name: Use the specific kernel config or fallback to the latest linux-next - set_fact: - linux_config: "{{ target_linux_config | default('') if kernel_config.stat.exists else (latest_linux_next_config | default('') | basename) }}" - when: - - not config_kdevops.stat.exists - - not kernel_config.stat.exists - - latest_linux_next_config is defined - delegate_to: localhost + - linux_next_configs.matched > 0 -- name: Verify config used - debug: - msg: "Linux config used: {{ role_path }}/templates/{{ linux_config }}" - delegate_to: localhost - -- name: Verify that the Linux configuration file exists - stat: - path: "{{ role_path }}/templates/{{ linux_config }}" - register: config_stat - delegate_to: localhost - when: linux_config is defined - -- name: Fail if the configuration file does not exist - fail: - msg: "The configuration file {{ role_path }}/templates/{{ linux_config }} does not exist." - when: not config_stat.stat.exists - delegate_to: localhost +- name: Set the .config file for building the test kernel + ansible.builtin.set_fact: + linux_config: "{{ item | basename }}" + with_first_found: + - files: "{{ search_list }}"
Signature · 1 line
2.47.2
PATCH v2 18/33 bootlinux: Select the kernel .config earlier
In reply to Luis ChamberlainFrom: Chuck Lever <[email protected]>
The tasks that select the kernel .config are common to both building via 9p and building on the test runners. In order to refactor the build tasks, move the common portion (selecting the kernel .config) earlier in the bootlinux playbook.
--- playbooks/roles/bootlinux/tasks/main.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
playbooks/roles/bootlinux/tasks/main.yml +4 -4
@@ -10,6 +10,10 @@ skip: true tags: vars +- name: Select the .config file for building the test kernel + ansible.builtin.include_tasks: + file: "{{ role_path }}/tasks/config.yml" + # Distro specific - name: Install dependencies to build and install the Linux kernel ansible.builtin.import_tasks:
@@ -223,10 +227,6 @@ run_once: true delegate_to: localhost -- name: Select the .config file for building the test kernel - ansible.builtin.include_tasks: - file: "{{ role_path }}/tasks/config.yml" - - name: Copy configuration for Linux {{ target_linux_tree }} to the target nodes template: src: "{{ linux_config }}"
Signature · 1 line
2.47.2
PATCH v2 19/33 bootlinux: Move 9p build tasks to a subrole
In reply to Luis ChamberlainFrom: Chuck Lever <[email protected]>
Most everything that is marked with "when: bootlinux_9p|bool" is moved to a separate .yml file and then dynamically included when bootlinux_9p is true. This makes it easy to identify 9p-specific tasks and ensures they are completely disabled and skipped when other build modes are in use.
Ensure we also have the make command installed and since we're going to defer git clone even if 9p is enabled until later ensure the linux directory exists before bringup.
--- playbooks/roles/bootlinux/defaults/main.yml | 6 - playbooks/roles/bootlinux/tasks/build/9p.yml | 205 ++++++++++++++++ .../install-minimal-deps/debian/main.yml | 19 ++ .../tasks/install-minimal-deps/main.yml | 15 ++ .../install-minimal-deps/redhat/main.yml | 27 +++ .../tasks/install-minimal-deps/suse/main.yml | 13 + playbooks/roles/bootlinux/tasks/main.yml | 228 +----------------- .../roles/guestfs/tasks/bringup/main.yml | 10 + 8 files changed, 297 insertions(+), 226 deletions(-) create mode 100644 playbooks/roles/bootlinux/tasks/build/9p.yml create mode 100644 playbooks/roles/bootlinux/tasks/install-minimal-deps/debian/main.yml create mode 100644 playbooks/roles/bootlinux/tasks/install-minimal-deps/main.yml create mode 100644 playbooks/roles/bootlinux/tasks/install-minimal-deps/redhat/main.yml create mode 100644 playbooks/roles/bootlinux/tasks/install-minimal-deps/suse/main.yml
playbooks/roles/bootlinux/defaults/main.yml +0 -6
@@ -41,12 +41,6 @@ uninstall_kernel_enable: False bootlinux_b4_am_this_host: False bootlinux_9p: False -bootlinux_9p_host_path: "/dev/null" -bootlinux_9p_msize: 0 -bootlinux_9p_fsdev: "ignore" -bootlinux_9p_mount_tag: "ignore" -bootlinux_9p_security_model: "none" -bootlinux_9p_driver: "virtio-9p-pci" kdevops_workflow_enable_cxl: False
playbooks/roles/bootlinux/tasks/build/9p.yml new file +205 -0
205 lines not on this page · raw message
playbooks/roles/bootlinux/tasks/install-minimal-deps/debian/main.yml new file +19 -0
@@ -0,0 +1,19 @@ +--- +# Install minimal dependencies needed for kernel installation on Debian +# This is used when bootlinux_9p is enabled and the build happens on the host + +- name: Update apt cache + become: yes + become_method: sudo + apt: + update_cache: yes + +- name: Install minimal build tools for kernel installation + become: yes + become_method: sudo + apt: + name: + - make + - gcc + - kmod + state: present
playbooks/roles/bootlinux/tasks/install-minimal-deps/main.yml new file +15 -0
@@ -0,0 +1,15 @@ +--- +- name: Debian-specific minimal setup + ansible.builtin.import_tasks: debian/main.yml + when: + - ansible_os_family == "Debian" + +- name: SuSE-specific minimal setup + ansible.builtin.import_tasks: suse/main.yml + when: + - ansible_os_family == "Suse" + +- name: Red Hat-specific minimal setup + ansible.builtin.import_tasks: redhat/main.yml + when: + - ansible_os_family == "RedHat"
playbooks/roles/bootlinux/tasks/install-minimal-deps/redhat/main.yml new file +27 -0
@@ -0,0 +1,27 @@ +--- +# Install minimal dependencies needed for kernel installation on Red Hat +# This is used when bootlinux_9p is enabled and the build happens on the host + +- name: Install minimal build tools for kernel installation + become: yes + become_method: sudo + yum: + name: + - make + - gcc + - kmod + state: present + when: + - ansible_facts['distribution_major_version']|int < 8 + +- name: Install minimal build tools for kernel installation (dnf) + become: yes + become_method: sudo + dnf: + name: + - make + - gcc + - kmod + state: present + when: + - ansible_facts['distribution_major_version']|int >= 8
playbooks/roles/bootlinux/tasks/install-minimal-deps/suse/main.yml new file +13 -0
@@ -0,0 +1,13 @@ +--- +# Install minimal dependencies needed for kernel installation on SUSE +# This is used when bootlinux_9p is enabled and the build happens on the host + +- name: Install minimal build tools for kernel installation + become: yes + become_method: sudo + zypper: + name: + - make + - gcc + - kmod-compat + state: present
playbooks/roles/bootlinux/tasks/main.yml +8 -220
305 lines not on this page · raw message
playbooks/roles/guestfs/tasks/bringup/main.yml +10 -0
@@ -127,6 +127,16 @@ when: - passthrough_devices.matched > 0 +- name: Ensure 9P host directory exists before bringing nodes on libvirt + file: + path: "{{ bootlinux_9p_host_path }}" + state: directory + mode: '0755' + run_once: true + delegate_to: localhost + when: + - bootlinux_9p|bool + - name: Boot each target node community.libvirt.virt: name: "{{ inventory_hostname }}"
Signature · 1 line
2.47.2
PATCH v2 20/33 bootlinux: Move tasks for building on target nodes to a subrole
In reply to Luis ChamberlainFrom: Chuck Lever <[email protected]>
Most everything that is marked with "when: not bootlinux_9p|bool" is moved to a separate .yml file and then dynamically included when bootlinux_targets is true. This makes it easy to identify tasks that are specific to building on the target nodes and ensures those tasks are completely disabled and skipped when other build modes are in use.
--- .../roles/bootlinux/tasks/build/targets.yml | 125 +++++++++++++++++ playbooks/roles/bootlinux/tasks/main.yml | 132 +----------------- 2 files changed, 129 insertions(+), 128 deletions(-) create mode 100644 playbooks/roles/bootlinux/tasks/build/targets.yml
playbooks/roles/bootlinux/tasks/build/targets.yml new file +125 -0
@@ -0,0 +1,125 @@ +--- +- name: Install b4 + become: yes + become_method: sudo + pip: + name: + - b4 + when: + - target_linux_install_b4 is defined + - target_linux_install_b4 + - ansible_facts['os_family']|lower != 'debian' + +- name: git clone {{ target_linux_tree }} on the target nodes + git: + repo: "{{ target_linux_git }}" + dest: "{{ target_linux_dir_path }}" + update: yes + depth: "{{ target_linux_shallow_depth }}" + version: "{{ target_linux_ref }}" + retries: 3 + delay: 5 + register: result + until: not result.failed + tags: [ 'clone'] + +- name: Copy kernel delta if requested on the target nodes + template: + src: "{{ target_linux_extra_patch }}" + dest: "{{ target_linux_dir_path }}/{{ target_linux_extra_patch }}" + owner: "{{ data_user }}" + group: "{{ data_group }}" + mode: 0644 + when: + - target_linux_extra_patch is defined + +- name: Apply kernel delta if requested on the target nodes + command: "git am {{ target_linux_extra_patch }}" + args: + chdir: "{{ target_linux_dir_path }}" + when: + - target_linux_extra_patch is defined + +- name: Set git user name and email if needed + shell: | + if ! $(git config --get user.email) ; then + git config --global user.email [email protected] + fi + if ! $(git config --get user.name) ; then + git config --global user.name user + fi + when: + - target_linux_apply_patch_message_id is defined + - target_linux_apply_patch_message_id | length > 0 + - bootlinux_b4_am_this_host|bool + +- name: Variable values + debug: + msg: "{{ target_linux_apply_patch_message_id }}" + when: + - target_linux_apply_patch_message_id is defined + +- name: Apply message patch set if requested on the target nodes + shell: b4 am -o - {{target_linux_apply_patch_message_id}} | git am + args: + chdir: "{{ target_linux_dir_path }}" + when: + - target_linux_apply_patch_message_id is defined + - target_linux_apply_patch_message_id | length > 0 + - bootlinux_b4_am_this_host|bool + +- name: Copy configuration for Linux {{ target_linux_tree }} to the target nodes + template: + src: "{{ linux_config }}" + dest: "{{ target_linux_dir_path }}/.config" + owner: "{{ data_user }}" + group: "{{ data_group }}" + mode: 0644 + +- name: Set kernel localversion if requested on the target nodes + shell: "echo {{ target_linux_localversion }} > {{ target_linux_dir_path }}/localversion" + when: + - target_linux_localversion is defined and target_linux_localversion != "" + +- name: Configure Linux {{ target_linux_tree }} on the target nodes + shell: | + set -o pipefail + yes "" | make oldconfig + register: configure_done + changed_when: configure_done.rc == 0 or configure_done.rc == 141 + failed_when: configure_done.rc != 0 and configure_done.rc != 141 + args: + chdir: "{{ target_linux_dir_path }}" + executable: /bin/bash + +- name: Build {{ target_linux_tree }} on the target nodes + command: "{{ target_linux_make_cmd }}" + register: build + changed_when: "build.rc == 0" + args: + chdir: "{{ target_linux_dir_path }}" + tags: [ 'build-linux' ] + +- name: Build {{ target_linux_tree }} cxl_test on the target nodes + command: "{{ target_linux_make_cmd }} M=tools/testing/cxl" + register: build_cxl_test + changed_when: "build_cxl_test.rc == 0" + args: + chdir: "{{ target_linux_dir_path }}" + tags: [ 'build-linux', 'cxl-build' ] + when: + - bootlinux_cxl_test|bool + +- name: See if snake-oil cert file is present on client + stat: + path: "{{ target_linux_dir_path }}/certs/signing_key.pem" + register: snaik_oil_file + tags: [ 'build-linux' ] + +- name: Ensure we allow world to read the snake oil in case of NFS or 9p read only usage + file: + path: "{{ target_linux_dir_path }}/certs/signing_key.pem" + mode: "0755" + tags: [ 'build-linux' ] + when: + - snaik_oil_file.stat.exists
playbooks/roles/bootlinux/tasks/main.yml +4 -128
139 lines not on this page · raw message
Signature · 1 line
2.47.2
PATCH v2 21/33 bootlinux: Clean up a grub set-up task
In reply to Luis ChamberlainFrom: Chuck Lever <[email protected]>
The "target_kernel" variable seems to be unused, so remove it.
Address several ansible-lint complaints:
- command-instead-of-shell
- fqcn[action-core]: Use FQCN for builtin module actions (shell).
- jinja[spacing]: Jinja2 spacing could be improved
- name[template]: Jinja templates should only be at the end of 'name'
- no-changed-when
- schema[tasks]: 'become_method' must be one of the currently available values
- yaml[line-length]: Line too long (176 > 160 characters)
- yaml[truthy]: Truthy value should be one of [false, true]
- yaml[brackets]: Too many spaces inside brackets
- fqcn[action-core]: Use FQCN for builtin module actions (set_fact).
Note: The preferred way to select a shell script and run it on a managed system is to use the template module to copy the selected script to each target host, and then use the Ansible scripts module to run it. That could be for another day.
--- .../bootlinux/tasks/update-grub/install.yml | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-)
playbooks/roles/bootlinux/tasks/update-grub/install.yml +11 -8
@@ -131,16 +131,19 @@ # is either you do the work to enhance the heuristic or live happy with the # assumption that grub2's default of picking the latest kernel is the best # option. -- name: Try to find your target kernel's GRUB boot entry number now that the menu is flattened for {{ target_linux_ref }} using inferred KERNELRELEASE {{ kernelrelease.stdout}} - become: yes +- name: Determine the target kernel's GRUB boot entry number + # noqa: command-instead-of-shell + tags: + - saved + become: true become_flags: 'su - -c' - become_method: sudo - shell: " {{ determine_default_kernel_id }} " - vars: - target_kernel: "{{ target_linux_ref | replace('v', '') }}" + become_method: ansible.builtin.sudo + ansible.builtin.shell: + cmd: "{{ determine_default_kernel_id }}" register: grub_boot_number_cmd - tags: [ 'saved' ] - when: kernel_release_file.stat.exists + changed_when: false + when: + - kernel_release_file.stat.exists - name: Obtain command to set default kernel to boot set_fact:
Signature · 1 line
2.47.2
PATCH v2 22/33 bootlinux: Harden update-grub/install.yml
In reply to Luis ChamberlainFrom: Chuck Lever <[email protected]>
After the kernel_release_file variable is set, ensure that subsequent tasks check whether the release file exists so they don't crap out.
Address some ansible-lint complaints:
- fqcn[action-core]: Use FQCN for builtin module actions (set_fact).
- fqcn[action-core]: Use FQCN for builtin module actions (stat).
- name[template]: Jinja templates should only be at the end of 'name'
- command-instead-of-shell: Use shell only when shell functionality is required.
- fqcn[action-core]: Use FQCN for builtin module actions (shell).
- no-changed-when: Commands should not change things if nothing needs doing.
- fqcn[action-core]: Use FQCN for builtin module actions (set_fact).
- fqcn[action-core]: Use FQCN for builtin module actions (set_fact).
To address "command-instead-of-shell", replace
shell: cat {{ kernelrelease_file }}"
with the Ansible slurp module to pull the kernel release name directly into a simple string variable.
--- .../bootlinux/tasks/update-grub/install.yml | 83 ++++++++++++++----- 1 file changed, 64 insertions(+), 19 deletions(-)
playbooks/roles/bootlinux/tasks/update-grub/install.yml +64 -19
@@ -93,39 +93,76 @@ tags: [ 'uninstall-linux', 'manual-update-grub' ] import_tasks: update-grub/main.yml -- name: Set file used to extract KERNELRELEASE variable - set_fact: +- name: Set the pathname used to extract the kernel release + tags: + - vars + ansible.builtin.set_fact: kernelrelease_file: "{{ target_linux_dir_path }}/include/config/kernel.release" - tags: vars -- name: Check if {{ kernelrelease_file }} exists - stat: +- name: Stat {{ kernelrelease_file }} + tags: + - vars + ansible.builtin.stat: + get_checksum: false + get_mime: false path: "{{ kernelrelease_file }}" register: kernel_release_file - tags: vars -- name: Get Linux build KERNELRELEASE varible which is set in include/config/kernel.release - shell: cat {{ kernelrelease_file }} - register: kernelrelease - when: kernel_release_file.stat.exists +- name: Slurp {{ kernelrelease_file }} + tags: + - vars + ansible.builtin.slurp: + src: "{{ kernelrelease_file }}" + register: slurped_kernel_release + when: + - kernel_release_file.stat.exists + +- name: Set default kernelrelease if not determined + ansible.builtin.set_fact: + kernelrelease: "unknown" + when: + - kernelrelease is not defined -- name: Construct command line to determine default kernel ID - set_fact: +- name: Get the kernel release of the kernel to be installed + tags: + - vars + ansible.builtin.set_fact: + kernelrelease: "{{ slurped_kernel_release.content | b64decode | trim }}" + when: + - kernel_release_file.stat.exists + +- name: Construct the command line to determine the default boot entry + tags: + - saved + ansible.builtin.set_fact: determine_default_kernel_id: >- awk -F\' '/menuentry / {print $2}' /boot/grub/grub.cfg | awk '{print NR-1" ... "$0}' | - grep {{ kernelrelease.stdout }} | head -1 | awk '{print $1}' + grep {{ kernelrelease }} | head -1 | awk '{print $1}' when: - ansible_facts['os_family']|lower != 'redhat' or ansible_facts['distribution_major_version'] | int < 8 + - kernel_release_file is defined + - kernel_release_file.stat is defined + - kernel_release_file.stat.exists + - kernelrelease is defined + - kernelrelease != "unknown" + - ansible_os_family != "RedHat" or ansible_distribution_major_version | int < 8 -- name: Construct command line to determine default kernel ID for RHEL >= 8 - set_fact: +- name: Construct the command line to determine default boot entry for RHEL >= 8 + tags: + - saved + ansible.builtin.set_fact: determine_default_kernel_id: >- for f in $(ls -1 /boot/loader/entries/*.conf); do cat $f; - done | grep title | awk '{ gsub("title ", "", $0); print }' | grep '{{ kernelrelease.stdout }}'; + done | grep title | awk '{ gsub("title ", "", $0); print }' | grep '{{ kernelrelease }}'; when: - ansible_facts['os_family']|lower == 'redhat' and ansible_facts['distribution_major_version'] | int >= 8 + - kernel_release_file is defined + - kernel_release_file.stat is defined + - kernel_release_file.stat.exists + - kernelrelease is defined + - kernelrelease != "unknown" + - ansible_os_family == "RedHat" + - ansible_distribution_major_version | int >= 8 # If this fails then grub-set-default won't be run, and the assumption here # is either you do the work to enhance the heuristic or live happy with the
@@ -143,6 +180,8 @@ register: grub_boot_number_cmd changed_when: false when: + - kernel_release_file is defined + - kernel_release_file.stat is defined - kernel_release_file.stat.exists - name: Obtain command to set default kernel to boot
@@ -163,10 +202,13 @@ become_method: sudo command: "{{ grub_set_default_boot_kernel }} \"{{ target_boot_entry }}\"" vars: - target_boot_entry: "{{ grub_boot_number_cmd.stdout_lines.0 }}" + target_boot_entry: "{{ grub_boot_number_cmd.stdout_lines.0 if (grub_boot_number_cmd is defined and grub_boot_number_cmd.stdout_lines is defined) else '' }}" tags: [ 'saved' ] when: + - grub_boot_number_cmd is defined + - grub_boot_number_cmd.rc is defined - grub_boot_number_cmd.rc == 0 + - grub_boot_number_cmd.stdout is defined - grub_boot_number_cmd.stdout != "" - name: Itemize kernel and GRUB entry we just selected
@@ -177,6 +219,9 @@ target_boot_entry: "{{ grub_boot_number_cmd.stdout_lines.0 }}" tags: [ 'saved' ] when: + - grub_boot_number_cmd is defined + - grub_boot_number_cmd.rc is defined - grub_boot_number_cmd.rc == 0 + - grub_boot_number_cmd.stdout is defined - grub_boot_number_cmd.stdout != ""
Signature · 1 line
2.47.2
PATCH v2 23/33 Add a guest/instance for building the test kernel
In reply to Luis ChamberlainFrom: Chuck Lever <[email protected]>
Provision a separate guest/instance for the purpose of building the Linux kernel under test. This builder guest is not used yet.
--- playbooks/roles/gen_hosts/defaults/main.yml | 2 ++ playbooks/roles/gen_hosts/tasks/main.yml | 12 ++++++++++ .../roles/gen_hosts/templates/builder.j2 | 13 +++++++++++ playbooks/roles/gen_nodes/defaults/main.yml | 3 +++ playbooks/roles/gen_nodes/tasks/main.yml | 22 +++++++++++++++++++ workflows/linux/Kconfig | 14 ++++++++++++ workflows/linux/Makefile | 4 ++++ 7 files changed, 70 insertions(+) create mode 100644 playbooks/roles/gen_hosts/templates/builder.j2
playbooks/roles/gen_hosts/defaults/main.yml +2 -0
@@ -41,3 +41,5 @@ kdevops_loopback_nfs_enable: False kdevops_smbd_enable: False kdevops_krb5_enable: False kdevops_enable_iscsi: false + +bootlinux_builder: false
playbooks/roles/gen_hosts/tasks/main.yml +12 -0
@@ -56,6 +56,18 @@ when: - is_fstests +- name: Generate the Ansible hosts file for a Linux kernel build + tags: [ 'hosts' ] + template: + src: "{{ kdevops_hosts_template }}" + dest: "{{ topdir_path }}/{{ kdevops_hosts }}" + force: yes + trim_blocks: True + lstrip_blocks: True + when: + - bootlinux_builder + - ansible_hosts_template.stat.exists + - name: Generate the Ansible hosts file tags: [ 'hosts' ] template:
playbooks/roles/gen_hosts/templates/builder.j2 new file +13 -0
@@ -0,0 +1,13 @@ +[all] +{{ kdevops_hosts_prefix }}-builder +[all:vars] +ansible_python_interpreter = "{{ kdevops_python_interpreter }}" + +[baseline] +{{ kdevops_hosts_prefix }}-builder +[baseline:vars] +ansible_python_interpreter = "{{ kdevops_python_interpreter }}" + +[dev] +[dev:vars] +ansible_python_interpreter = "{{ kdevops_python_interpreter }}"
playbooks/roles/gen_nodes/defaults/main.yml +3 -0
@@ -86,6 +86,7 @@ kdevops_workflows_dedicated_workflow: False kdevops_workflow_enable_fstests: False kdevops_workflow_enable_blktests: False +builder_nodes: [] iscsi_nodes: [] is_fstests: False
@@ -101,6 +102,8 @@ bootlinux_9p_mount_tag: "ignore" bootlinux_9p_security_model: "none" bootlinux_9p_driver: "virtio-9p-pci" +bootlinux_builder: false + guestfs_requires_uefi: False kdevops_workflow_enable_sysbench: False
playbooks/roles/gen_nodes/tasks/main.yml +22 -0
@@ -43,6 +43,14 @@ when: - kdevops_baseline_and_dev +- name: Set builder nodes array + tags: vars + set_fact: + builder_nodes: + - "{{ kdevops_host_prefix + '-builder' }}" + when: + - bootlinux_builder + - name: Set iscsi_nodes list ansible.builtin.set_fact: iscsi_nodes: "{{ [kdevops_host_prefix + '-iscsi'] }}"
@@ -138,6 +146,20 @@ - not kdevops_workflows_dedicated_workflow - ansible_nodes_template.stat.exists +- name: Generate the builder kdevops nodes file using {{ kdevops_nodes_template }} as jinja2 source template + tags: [ 'nodes' ] + vars: + node_template: "{{ kdevops_nodes_template | basename }}" + all_generic_nodes: "{{ builder_nodes }}" + nodes: "{{ all_generic_nodes }}" + template: + src: "{{ node_template }}" + dest: "{{ topdir_path }}/{{ kdevops_nodes }}" + force: yes + when: + - bootlinux_builder + - ansible_nodes_template.stat.exists + - name: Generate the pynfs kdevops nodes file using {{ kdevops_nodes_template }} as jinja2 source template tags: [ 'nodes' ] vars:
workflows/linux/Kconfig +14 -0
@@ -77,6 +77,20 @@ config BOOTLINUX_9P However, 9p is available only when using a local virtualization method such as libvirt. +config BOOTLINUX_BUILDER + bool "Separate kernel builder" + output yaml + help + Enabling this option brings up a separate guest/instance + for building the Linux kernel to test. The new kernel is + packaged appropriately for installation on other systems, + but is not installed. Once the kernel is built, the kernel + packages are saved on the controller host and the builder + node can be destroyed. + + This choice is best when the test runners are resource- + limited or vastly different than the controller host. + endchoice if BOOTLINUX_9P
workflows/linux/Makefile +4 -0
@@ -13,6 +13,10 @@ ifeq (y,$(CONFIG_BOOTLINUX_PURE_IOMAP)) TREE_CONFIG:=config-$(TREE_REF)-pure-iomap endif +ifeq (y,$(CONFIG_BOOTLINUX_BUILDER)) +KDEVOPS_HOSTS_TEMPLATE=builder.j2 +endif + # Describes the Linux clone BOOTLINUX_ARGS += target_linux_git=$(TREE_URL) # ifeq (y,$(CONFIG_BOOTLINUX_TREE_CUSTOM_NAME))
Signature · 1 line
2.47.2
PATCH v2 24/33 bootlinux: Add a new builder choice
In reply to Luis ChamberlainFrom: Chuck Lever <[email protected]>
Currently, for cloud configurations or when 9p is disabled, kdevops builds the test kernel on each test runner. This is inefficient, and gets worse as the test matrix for a single kernel version scales out.
Instead we want to build the test kernel once and make those build artifacts available for test runners to install. This would be similar to what KOTD does now, except it does not require setting up a separate yum repo.
--- playbooks/roles/bootlinux/defaults/main.yml | 2 + .../roles/bootlinux/tasks/build/builder.yml | 228 ++++++++++++++++++ .../tasks/install-deps/redhat/main.yml | 18 ++ playbooks/roles/bootlinux/tasks/main.yml | 6 + 4 files changed, 254 insertions(+) create mode 100644 playbooks/roles/bootlinux/tasks/build/builder.yml
playbooks/roles/bootlinux/defaults/main.yml +2 -0
@@ -46,3 +46,5 @@ kdevops_workflow_enable_cxl: False bootlinux_cxl_test: False bootlinux_tree_set_by_cli: False + +bootlinux_artifacts_dir: "{{ topdir_path }}/workflows/linux/artifacts"
playbooks/roles/bootlinux/tasks/build/builder.yml new file +228 -0
228 lines not on this page · raw message
playbooks/roles/bootlinux/tasks/install-deps/redhat/main.yml +18 -0
@@ -68,6 +68,24 @@ - btrfs-progs when: ansible_distribution == 'Fedora' +- name: Install rpmbuild + become: true + become_method: ansible.builtin.sudo + ansible.builtin.dnf: + name: + - elfutils-devel + - perl-core + - rpm-build + - rsync + state: present + update_cache: true + retries: 3 + delay: 5 + register: rpmbuild_result + until: rpmbuild_result is succeeded + when: + - bootlinux_builder|bool + - name: Remove packages that mess with initramfs become: yes become_method: sudo
playbooks/roles/bootlinux/tasks/main.yml +6 -0
@@ -80,6 +80,12 @@ when: - bootlinux_targets|bool +- name: Build kernel on the builder node + ansible.builtin.include_tasks: + file: "{{ role_path }}/tasks/build/builder.yml" + when: + - bootlinux_builder|bool + - name: Run uname before command: "uname -r" register: uname_cmd_before
Signature · 1 line
2.47.2
PATCH v2 25/33 workflows: Add a kconfig setting for installing kernels via package
In reply to Luis ChamberlainFrom: Chuck Lever <[email protected]>
When the "Target Linux kernel to use" is set to "Upstream Linux or custom kernel", the bootlinux role is enabled in order to download, build and install the kernel to be tested.
When installing the kernel from .rpm or .deb packages, however, the download and build phases have already been done, so it doesn't make sense to add an option under the "Get and install Linux from git" menu to make that happen.
Instead, add an option directly to the "Target Linux kernel to use" menu that will enable the ability to install the test kernel from packages.
For the moment, this option does nothing.
--- kconfigs/workflows/Kconfig | 18 ++++++++++++++++++ playbooks/roles/bootlinux/defaults/main.yml | 2 ++ scripts/ci.Makefile | 8 ++++++++ 3 files changed, 28 insertions(+)
kconfigs/workflows/Kconfig +18 -0
@@ -37,6 +37,18 @@ config WORKFLOW_LINUX_CUSTOM linux, linux-stable, linux-next, or a custom kernel you want to build and install enable this. +config WORKFLOW_LINUX_PACKAGED + bool "Install pre-built kernel package" + output yaml + help + Choose this option to install a pre-built kernel package on each + target node. + + By default, the kernel packages reside in + workflows/linux/artifacts. Later we can introduce a Kconfig + option that lets kdevops pull the packages from other + locations. + endchoice if WORKFLOW_LINUX_CUSTOM
@@ -54,6 +66,12 @@ source "workflows/linux/Kconfig" endmenu endif # WORKFLOW_LINUX_CUSTOM +if WORKFLOW_LINUX_PACKAGED +config BOOTLINUX + bool + default y +endif # WORKFLOW_LINUX_PACKAGED + config WORKFLOWS_TESTS bool "Enable selection of test workflows" default n
playbooks/roles/bootlinux/defaults/main.yml +2 -0
@@ -41,6 +41,8 @@ uninstall_kernel_enable: False bootlinux_b4_am_this_host: False bootlinux_9p: False +bootlinux_targets: false +bootlinux_builder: false kdevops_workflow_enable_cxl: False
scripts/ci.Makefile +8 -0
@@ -5,6 +5,8 @@ CI_WORKFLOW ?= ifeq (y,$(CONFIG_BOOTLINUX)) +ifneq (y,$(CONFIG_WORKFLOW_LINUX_PACKAGED)) + ifeq ($(strip $(CI_WORKFLOW)),) CI_WORKFLOW_BASENAME := $(shell basename $(CONFIG_BOOTLINUX_TREE) | sed 's/\.git$$//') else
@@ -81,6 +83,12 @@ ci-test: ci-build-test: endif # We have ci build tests entries +else # CONFIG_WORKFLOW_LINUX_PACKAGED +ci-results: +ci-test: +ci-build-test: +endif # CONFIG_WORKFLOW_LINUX_PACKAGED + else # CONFIG_BOOTLINUX ci-results: ci-test:
Signature · 1 line
2.47.2
PATCH v2 26/33 bootlinux: Enclose tasks to find kernel release name in a block:
In reply to Luis ChamberlainFrom: Chuck Lever <[email protected]>
This set of tasks is done when installing a new kernel from a source tree. I'm about to add a similar set of tasks that will handle the "install from a pre-built package" case.
Refactor these tasks so they can be switched on and off as a group.
--- .../bootlinux/tasks/update-grub/install.yml | 42 ++++++++++--------- 1 file changed, 23 insertions(+), 19 deletions(-)
playbooks/roles/bootlinux/tasks/update-grub/install.yml +23 -19
@@ -93,29 +93,33 @@ tags: [ 'uninstall-linux', 'manual-update-grub' ] import_tasks: update-grub/main.yml -- name: Set the pathname used to extract the kernel release +- name: Get the name of the kernel release to install (source tree) tags: - vars - ansible.builtin.set_fact: - kernelrelease_file: "{{ target_linux_dir_path }}/include/config/kernel.release" + block: + - name: Set the pathname used to extract the kernel release + ansible.builtin.set_fact: + kernelrelease_file: "{{ target_linux_dir_path }}/include/config/kernel.release" -- name: Stat {{ kernelrelease_file }} - tags: - - vars - ansible.builtin.stat: - get_checksum: false - get_mime: false - path: "{{ kernelrelease_file }}" - register: kernel_release_file + - name: Stat {{ kernelrelease_file }} + ansible.builtin.stat: + get_checksum: false + get_mime: false + path: "{{ kernelrelease_file }}" + register: kernel_release_file -- name: Slurp {{ kernelrelease_file }} - tags: - - vars - ansible.builtin.slurp: - src: "{{ kernelrelease_file }}" - register: slurped_kernel_release - when: - - kernel_release_file.stat.exists + - name: Slurp {{ kernelrelease_file }} + ansible.builtin.slurp: + src: "{{ kernelrelease_file }}" + register: slurped_kernel_release + when: + - kernel_release_file.stat.exists + + - name: Get the kernel release of the kernel to be installed + ansible.builtin.set_fact: + kernelrelease: "{{ slurped_kernel_release.content | b64decode | trim }}" + when: + - kernel_release_file.stat.exists - name: Set default kernelrelease if not determined ansible.builtin.set_fact:
Signature · 1 line
2.47.2
PATCH v2 27/33 bootlinux: Pick up kernel release info for pre-built packages
In reply to Luis ChamberlainFrom: Chuck Lever <[email protected]>
--- .../bootlinux/tasks/update-grub/install.yml | 26 ++++++++++++++----- 1 file changed, 20 insertions(+), 6 deletions(-)
playbooks/roles/bootlinux/tasks/update-grub/install.yml +20 -6
@@ -96,6 +96,8 @@ - name: Get the name of the kernel release to install (source tree) tags: - vars + when: + - not workflow_linux_packaged|bool block: - name: Set the pathname used to extract the kernel release ansible.builtin.set_fact:
@@ -127,13 +129,25 @@ when: - kernelrelease is not defined -- name: Get the kernel release of the kernel to be installed - tags: - - vars - ansible.builtin.set_fact: - kernelrelease: "{{ slurped_kernel_release.content | b64decode | trim }}" +- name: Get the name of the kernel release to install (package) when: - - kernel_release_file.stat.exists + - workflow_linux_packaged|bool + block: + - name: Set the pathname used to extract the kernel release + ansible.builtin.set_fact: + kernelrelease_file: "{{ bootlinux_artifacts_dir }}/kernel.release" + + - name: Stat {{ kernelrelease_file }} + delegate_to: localhost + ansible.builtin.stat: + path: "{{ kernelrelease_file }}" + register: kernel_release_file + + - name: Get the kernel release of packaged kernel to be installed + ansible.builtin.set_fact: + kernelrelease: "{{ lookup('ansible.builtin.file', kernelrelease_file) | trim }}" + when: + - kernel_release_file.stat.exists - name: Construct the command line to determine the default boot entry tags:
Signature · 1 line
2.47.2
PATCH v2 28/33 bootlinux: Install pre-built kernels from packages
In reply to Luis ChamberlainFrom: Chuck Lever <[email protected]>
Add the tasks needed to install a kernel on a test host from a pre-built package (either .deb or .rpm). These are run when the new WORKFLOW_LINUX_PACKAGED Kconfig option is selected.
--- playbooks/roles/bootlinux/defaults/main.yml | 2 + .../bootlinux/tasks/install/packages.yml | 41 +++++++++++++++++++ playbooks/roles/bootlinux/tasks/main.yml | 22 +++++++++- 3 files changed, 64 insertions(+), 1 deletion(-) create mode 100644 playbooks/roles/bootlinux/tasks/install/packages.yml
playbooks/roles/bootlinux/defaults/main.yml +2 -0
@@ -50,3 +50,5 @@ bootlinux_cxl_test: False bootlinux_tree_set_by_cli: False bootlinux_artifacts_dir: "{{ topdir_path }}/workflows/linux/artifacts" +kernel_packages: [] +workflow_linux_packaged: false
playbooks/roles/bootlinux/tasks/install/packages.yml new file +41 -0
41 lines not on this page · raw message
playbooks/roles/bootlinux/tasks/main.yml +21 -1
@@ -13,11 +13,16 @@ - name: Select the .config file for building the test kernel ansible.builtin.include_tasks: file: "{{ role_path }}/tasks/config.yml" + when: + - not workflow_linux_packaged|bool # Distro specific - name: Install dependencies to build and install the Linux kernel ansible.builtin.import_tasks: file: install-deps/main.yml + when: + - not bootlinux_9p|bool + - not workflow_linux_packaged|bool # When using 9P builds, we still need make on the guest for modules_install - name: Install essential build tools for 9P builds
@@ -38,21 +43,27 @@ - target_linux_install_b4 is defined - target_linux_install_b4 - ansible_facts['os_family']|lower != 'debian' + - not workflow_linux_packaged|bool - name: Set bootlinux_b4_am_this_host as a fact for dev hosts only set_fact: bootlinux_b4_am_this_host: "{{ ansible_hostname | regex_search('^.*-dev$') is not none }}" when: - kdevops_baseline_and_dev|bool + - not workflow_linux_packaged|bool - name: Enable b4 am all hosts if not deploying dev and baseline nodes set_fact: bootlinux_b4_am_this_host: True when: - not kdevops_baseline_and_dev|bool + - not workflow_linux_packaged|bool -- include_role: +- name: Create data partition + ansible.builtin.include_role: name: create_data_partition + when: + - not workflow_linux_packaged|bool - name: Mount bootlinux 9p on each target node become: yes
@@ -180,6 +191,12 @@ tags: [ 'saved' ] when: ansible_facts['os_family']|lower == 'redhat' +- name: Install packages on each target node + ansible.builtin.import_tasks: + file: "{{ role_path }}/tasks/install/packages.yml" + when: + - workflow_linux_packaged|bool + - name: Install {{ target_linux_tree }} on the target nodes become: yes become_flags: 'su - -c'
@@ -190,6 +207,8 @@ args: chdir: "{{ target_linux_dir_path }}" tags: [ 'install-linux' ] + when: + - not workflow_linux_packaged|bool - name: Install {{ target_linux_tree }} cxl_test on the target nodes become: yes
@@ -203,6 +222,7 @@ tags: [ 'install-linux', 'cxl-install' ] when: - kdevops_workflow_enable_cxl|bool + - not workflow_linux_packaged|bool - name: Set the default kernel if necessary tags: [ 'saved' ]
Signature · 1 line
2.47.2
PATCH v2 29/33 bootlinux: Add an option to build with clang instead of gcc
In reply to Luis ChamberlainFrom: Chuck Lever <[email protected]>
Currently, gcc does not implement a Rust front-end. As the kernel acquires Rust source code, the clang tool chain must be used to build it.
To enable building test kernels with clang instead of gcc, add a kdevops Kconfig option to install dependences and set the build options to use clang.
See: Documentation/kbuild/llvm.rst
--- .../roles/bootlinux/tasks/build/builder.yml | 36 +++++++++++++++++++ .../tasks/install-deps/redhat/main.yml | 16 +++++++++ workflows/linux/Kconfig | 20 +++++++++++ 3 files changed, 72 insertions(+)
playbooks/roles/bootlinux/tasks/build/builder.yml +36 -0
@@ -110,12 +110,35 @@ community.general.make: chdir: "{{ target_linux_dir_path }}" target: "olddefconfig" + when: + - bootlinux_compiler_gcc|bool - name: Build {{ target_linux_tree }} community.general.make: chdir: "{{ target_linux_dir_path }}" jobs: "{{ ansible_processor_nproc }}" target: "all" + when: + - bootlinux_compiler_gcc|bool + +- name: Configure kernel {{ target_linux_tree }} + community.general.make: + chdir: "{{ target_linux_dir_path }}" + params: + LLVM: 1 + target: "olddefconfig" + when: + - bootlinux_compiler_clang|bool + +- name: Build {{ target_linux_tree }} + community.general.make: + chdir: "{{ target_linux_dir_path }}" + jobs: "{{ ansible_processor_nproc }}" + params: + LLVM: 1 + target: "all" + when: + - bootlinux_compiler_clang|bool - name: Remove the old artifacts directory on the control host delegate_to: localhost
@@ -192,6 +215,19 @@ target: "binrpm-pkg" params: RPMOPTS: '--without devel' + when: + - bootlinux_compiler_gcc|bool + + - name: Make the binrpm-pkg target + community.general.make: + chdir: "{{ target_linux_dir_path }}" + jobs: "{{ ansible_processor_nproc }}" + target: "binrpm-pkg" + params: + RPMOPTS: '--without devel' + LLVM: 1 + when: + - bootlinux_compiler_clang|bool - name: Find the build artifacts ansible.builtin.find:
playbooks/roles/bootlinux/tasks/install-deps/redhat/main.yml +16 -0
@@ -68,6 +68,22 @@ - btrfs-progs when: ansible_distribution == 'Fedora' +- name: Install clang + become: true + ansible.builtin.dnf: + name: + - clang + - lld + - llvm + state: present + update_cache: true + retries: 3 + delay: 5 + register: clang_result + until: clang_result is succeeded + when: + - bootlinux_compiler_clang|bool + - name: Install rpmbuild become: true become_method: ansible.builtin.sudo
workflows/linux/Kconfig +20 -0
@@ -151,6 +151,26 @@ endmenu endif # BOOTLINUX_9P +choice + prompt "Compiler to use to build the kernel" + default BOOTLINUX_COMPILER_GCC + help + Choose which toolchain to use to build the kernel. + +config BOOTLINUX_COMPILER_GCC + bool "gcc" + output yaml + help + Use the gcc compiler toolchain to build the Linux kernel. + +config BOOTLINUX_COMPILER_CLANG + bool "clang" + output yaml + help + Use the clang compiler toolchain to build the Linux kernel. + +endchoice + choice prompt "Type of development version of Linux to use" default BOOTLINUX_LINUS if !BOOTLINUX_TREE_SET_BY_CLI && !BOOTLINUX_TREE_REF_SET_BY_CLI
Signature · 1 line
2.47.2
PATCH v2 30/33 Makefile: add make style for style checking
In reply to Luis ChamberlainAdd a 'make style' which helps humans and bots follow some sensible coding conventions.
- Add scripts/detect_whitespace_issues.py check for white space eye sores
- Add scripts/check_commit_format.py to validate Generated-by and the Signed-off-by spacing
- Add scripts/fix_whitespace_issues.py to help with stupid spacing eyesores
- Update CLAUDE.md to ensure it runs 'make style'
--- CLAUDE.md | 61 +++++++++++++ Makefile | 5 + kdevops-ci | 1 + scripts/check_commit_format.py | 85 +++++++++++++++++ scripts/detect_whitespace_issues.py | 109 ++++++++++++++++++++++ scripts/fix_whitespace_issues.py | 137 ++++++++++++++++++++++++++++ 6 files changed, 398 insertions(+) create mode 160000 kdevops-ci create mode 100755 scripts/check_commit_format.py create mode 100755 scripts/detect_whitespace_issues.py create mode 100755 scripts/fix_whitespace_issues.py
CLAUDE.md +61 -0
@@ -89,6 +89,7 @@ make help # Show available targets make V=1 [target] # Verbose build output make AV=1-6 [target] # Ansible verbose output (levels 0-6) make dynconfig # Generate dynamic configuration +make style # Check for whitespace issues - ALWAYS run before completing work make mrproper # Clean everything and restart from scratch ```
@@ -211,6 +212,66 @@ Developer Certificate or Origin. Use this tag for code generated by Claude code AI. Put this before the Signed-off-by tag. +**CRITICAL FORMATTING RULE**: When using "Generated-by: Claude AI", it MUST be +immediately followed by the "Signed-off-by:" tag with NO empty lines between them. +These two lines must be consecutive. + +Correct format: +``` +Subject line + +Detailed description of changes... + +Generated-by: Claude AI +Signed-off-by: Your Name <[email protected]> +``` + +**WRONG** - Do NOT add empty lines between Generated-by and Signed-off-by: +``` +Generated-by: Claude AI + +Signed-off-by: Your Name <[email protected]> +``` + +**WRONG** - Do NOT add extra empty lines: +``` +Generated-by: Claude AI + + +Signed-off-by: Your Name <[email protected]> +``` + +## Code Quality Requirements + +**IMPORTANT**: Before completing any work, you MUST run `make style` to check for +both whitespace issues and commit message formatting. This ensures code consistency +and prevents formatting issues from being introduced into the codebase. + +The style checker will identify: +- Trailing whitespace +- Mixed tabs and spaces +- Files without newlines at EOF +- Other whitespace-related issues +- Incorrect commit message formatting (Generated-by/Signed-off-by spacing) + +Fix all reported issues before submitting your work. The `make style` command +checks both file whitespace and the most recent commit message format. + +### Automatic Whitespace Fixing + +For convenience, you can automatically fix whitespace issues using: +```bash +python3 scripts/fix_whitespace_issues.py # Fix all modified files +python3 scripts/fix_whitespace_issues.py file1 file2 # Fix specific files +``` + +The fixer script will: +- Remove trailing whitespace from lines +- Add missing newlines at end of files +- Reduce excessive blank lines to maximum 2 consecutive + +Always run `make style` after using the fixer to verify all issues are resolved. + ## Prompt Examples Refer to PROMPTS.md for example set of prompts used to generate code on
Makefile +5 -0
@@ -238,6 +238,11 @@ include scripts/ci.Makefile include scripts/archive.Makefile include scripts/defconfig.Makefile +PHONY += style +style: + $(Q)python3 scripts/detect_whitespace_issues.py + $(Q)python3 scripts/check_commit_format.py + PHONY += clean clean: $(Q)$(MAKE) -f scripts/build.Makefile $@
kdevops-ci new file +1 -0
@@ -0,0 +1 @@ +Subproject commit 812060752af00e601add5716c3180fbb21c41784
scripts/check_commit_format.py new file +85 -0
85 lines not on this page · raw message
scripts/detect_whitespace_issues.py new file +109 -0
109 lines not on this page · raw message
scripts/fix_whitespace_issues.py new file +137 -0
137 lines not on this page · raw message
Signature · 1 line
2.47.2
PATCH v2 31/33 CLAUDE.md: new workflow guide for hosts and nodes
In reply to Luis ChamberlainExtend CLAUDE.md with a slew of guidelines for the gen_host and gen_nodes playbook as well as tons of other tips to work around complex ansible issues which are not easy to infer.
--- CLAUDE.md | 628 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 628 insertions(+)
CLAUDE.md +628 -0
@@ -160,6 +160,131 @@ make mrproper # Clean everything and restart from scratch 4. **Baseline Management**: Comprehensive tracking of known failures and regressions 5. **Template Generation**: Dynamic file generation based on configuration +## Adding New Workflows + +When adding a new workflow to kdevops, you must add node generation rules to both +`playbooks/roles/gen_nodes/tasks/main.yml` and `playbooks/roles/gen_hosts/tasks/main.yml` +to avoid the failure "dedicated workflow has no rules for node configuration". + +### Required Additions + +For each new workflow, add the following sections to both playbooks: + +#### gen_nodes playbook +Add node generation rules with appropriate conditional logic based on whether the +workflow uses individual test configuration flags (like mmtests) or choice-based +configuration (like fio-tests): + +```yaml +# For workflows with individual test flags (like mmtests) +- name: Infer enabled WORKFLOW test section types + set_fact: + workflow_enabled_test_types: >- + {{ + [kdevops_host_prefix + '-'] + | product( + lookup('file', topdir_path + '/.config') + | regex_findall('^CONFIG_WORKFLOW_ENABLE_(.*)=y$', multiline=True) + | map('lower') + | list + ) + | map('join') + | list + }} + when: + - kdevops_workflows_dedicated_workflow + - kdevops_workflow_enable_WORKFLOW + - ansible_nodes_template.stat.exists + - not kdevops_baseline_and_dev + +# For workflows with choice-based configuration (like fio-tests) +- name: Generate the WORKFLOW kdevops nodes file using {{ kdevops_nodes_template }} as jinja2 source template + tags: [ 'hosts' ] + vars: + node_template: "{{ kdevops_nodes_template | basename }}" + nodes: "{{ [kdevops_host_prefix + '-WORKFLOW'] }}" + all_generic_nodes: "{{ [kdevops_host_prefix + '-WORKFLOW'] }}" + template: + src: "{{ node_template }}" + dest: "{{ topdir_path }}/{{ kdevops_nodes }}" + force: yes + when: + - kdevops_workflows_dedicated_workflow + - kdevops_workflow_enable_WORKFLOW + - ansible_nodes_template.stat.exists +``` + +#### gen_hosts playbook +Add host file generation task for the workflow: + +```yaml +- name: Generate the Ansible hosts file for a dedicated WORKFLOW setup + tags: [ 'hosts' ] + template: + src: "{{ kdevops_hosts_template }}" + dest: "{{ topdir_path }}/{{ kdevops_hosts }}" + force: yes + trim_blocks: True + lstrip_blocks: True + when: + - kdevops_workflows_dedicated_workflow + - kdevops_workflow_enable_WORKFLOW + - ansible_hosts_template.stat.exists +``` + +#### Update the generic hosts template +Add support for your workflow in the generic hosts template at +`playbooks/roles/gen_hosts/templates/hosts.j2`. Find the dedicated workflow +section and add your workflow's conditional logic: + +```jinja2 +{% if kdevops_workflows_dedicated_workflow %} +{% if kdevops_workflow_enable_WORKFLOW %} +[all] +{{ kdevops_host_prefix }}-WORKFLOW +{% if kdevops_baseline_and_dev %} +{{ kdevops_host_prefix }}-WORKFLOW-dev +{% endif %} + +[all:vars] +ansible_python_interpreter = "{{ kdevops_python_interpreter }}" + +[baseline] +{{ kdevops_host_prefix }}-WORKFLOW + +[baseline:vars] +ansible_python_interpreter = "{{ kdevops_python_interpreter }}" + +{% if kdevops_baseline_and_dev %} +[dev] +{{ kdevops_host_prefix }}-WORKFLOW-dev + +[dev:vars] +ansible_python_interpreter = "{{ kdevops_python_interpreter }}" + +{% endif %} +[WORKFLOW] +{{ kdevops_host_prefix }}-WORKFLOW +{% if kdevops_baseline_and_dev %} +{{ kdevops_host_prefix }}-WORKFLOW-dev +{% endif %} + +[WORKFLOW:vars] +ansible_python_interpreter = "{{ kdevops_python_interpreter }}" +{% else %} +``` + +### Examples + +Refer to the existing mmtests implementation for workflows with multiple individual +test configuration flags, or the fio-tests implementation for workflows with +choice-based configuration patterns. + +**Important**: All workflows use the same generic hosts template in +`playbooks/roles/gen_hosts/templates/hosts.j2`. Do NOT create workflow-specific +template files. Instead, extend the generic template with conditional logic +for your workflow. + ## Quick Setup Examples ### XFS Filesystem Testing
@@ -272,6 +397,509 @@ The fixer script will: Always run `make style` after using the fixer to verify all issues are resolved. +## Complex System Interactions + +kdevops integrates multiple subsystems (Ansible, Kconfig, Git, Make) that often +interact in non-obvious ways. Understanding these interactions is crucial for +effective debugging and development. + +### Ansible Architecture Patterns + +#### Host vs Control Node Execution +kdevops uses several Ansible execution patterns that affect variable scope: + +- **Control Host Execution**: `run_once: true, delegate_to: localhost` + - Executes once on the control host, not on target nodes + - Per-node variables may not be available in localhost context + - Common in 9P filesystem builds where single build is shared to all guests + - Use `hostvars[groups['group_name'][0]]['variable_name']` to access node-specific vars + +- **Variable Resolution Issues**: + - Variables set per-node (like A/B testing configs) aren't automatically available on localhost + - Need explicit variable resolution for cross-context access + - Git repository state must be managed carefully when switching between refs + +#### A/B Testing Variable Management +```yaml +# Detect dev nodes by hostname pattern +- name: Determine if this is a dev node for A/B testing + set_fact: + bootlinux_is_dev_node: "{{ ansible_hostname | regex_search('^.*-dev$') is not none }}" + +# Resolve active parameters for 9P builds +- name: Determine active kernel parameters for A/B testing with 9P + set_fact: + active_linux_ref: "{{ hostvars[groups['dev'][0]]['target_linux_ref'] if 'dev' in group_names else target_linux_ref }}" + run_once: true + delegate_to: localhost +``` + +### Kconfig Dynamic Configuration Patterns + +#### Shell Command Integration +```kconfig +config BOOTLINUX_DEV_TREE_REF + string "Development kernel reference" + default $(shell, scripts/infer_last_stable_kernel.sh) + help + The default is automatically inferred as the most recent stable + kernel version from the git repository. +``` + +**Best Practices**: +- Always provide fallback values in scripts +- Place scripts in `scripts/` directory +- Use conditional defaults: `default VALUE if CONDITION` +- Test scripts work in different environments + +#### Dependencies and Conflicts +```kconfig +config BOOTLINUX_SHALLOW_CLONE + bool "Shallow git clone" + default y if !KDEVOPS_BASELINE_AND_DEV + depends on !BOOTLINUX_AB_DIFFERENT_REF + help + This option is automatically disabled when using A/B testing with + different kernel references, as shallow clones may not contain all + the required refs for checkout. +``` + +**Key Patterns**: +- `depends on !CONFIG_OPTION` - Prevent incompatible combinations +- `default y if !OTHER_CONFIG` - Conditional defaults +- Document why restrictions exist in help text + +### Git Repository Management + +#### Shallow Clone Limitations +- **Problem**: A/B testing with different refs requires full git history +- **Solution**: Make shallow clones depend on `!BOOTLINUX_AB_DIFFERENT_REF` +- **Detection**: Use `git --git-dir=/path/to/mirror.git` for mirror access + +#### Version Detection Scripts +```bash +# Get latest stable kernel version, excluding release candidates +LAST_STABLE=$(git --git-dir="$GIT_TREE" tag --list 'v6.*' | \ + grep -v -- '-rc' | \ + sort -V | \ + tail -1) +``` + +**Patterns**: +- Use `sort -V` for proper semantic version ordering +- Filter out pre-release versions with `grep -v -- '-rc'` +- Always provide fallback values +- Handle missing git repositories gracefully + +### Systematic Debugging Methodology + +#### Configuration Tracing +1. **Check actual values**: Look at `extra_vars.yaml` for resolved variables +2. **Trace execution context**: Identify if code runs on localhost vs target nodes +3. **Verify prerequisites**: Ensure git refs exist before checkout attempts +4. **Follow variable inheritance**: Understand Ansible variable precedence + +#### A/B Testing Debug Steps +```bash +# Check current configuration +grep "BOOTLINUX.*REF" .config +grep "bootlinux.*tree.*ref" extra_vars.yaml + +# Verify git repository state +git branch -v +git describe --tags --always + +# Test kernel version detection +scripts/infer_last_stable_kernel.sh + +# Check available refs in mirror +git --git-dir=/mirror/linux.git tag --list 'v6.*' | sort -V | tail -10 +``` + +#### Common Root Causes +- **Variable scope mismatches**: Per-node vars not available on localhost +- **Git ref unavailability**: Shallow clones missing required refs +- **Execution context confusion**: Code expecting node context running on localhost +- **Configuration interdependencies**: Features conflicting in unexpected ways + +### Feature Integration Patterns + +#### When Features Conflict +1. **Identify early**: Use Kconfig dependencies to prevent invalid combinations +2. **Provide alternatives**: Suggest compatible configurations +3. **Clear messaging**: Explain why restrictions exist +4. **Graceful degradation**: Disable conflicting features automatically + +Example: Shallow clones + A/B different refs +- **Problem**: Shallow clone may not have required git refs +- **Solution**: `depends on !BOOTLINUX_AB_DIFFERENT_REF` +- **User experience**: Feature automatically disabled with explanation + +#### Smart Defaults Philosophy +- **Infer from system state**: Use dynamic detection where possible +- **Show off capabilities**: Make examples compelling and useful +- **Balance automation with control**: Provide overrides for advanced users +- **Fail gracefully**: Always have sensible fallbacks + +### AI Assistant Development Guidelines + +#### Investigation Sequence +1. **Understand the problem**: What's not working as expected? +2. **Trace execution path**: Follow code from config → ansible → execution +3. **Identify context and scope**: Where does code run? What variables are available? +4. **Find intersection points**: Issues often emerge where subsystems meet +5. **Design holistic solutions**: Fix root cause, enhance the feature +6. **Validate across use cases**: Test both specific case and general functionality + +#### Common Anti-Patterns to Avoid +- Band-aid fixes that ignore root cause +- Breaking existing functionality while fixing edge cases +- Ignoring variable scope and execution context +- Missing cross-feature impact analysis +- Not considering user experience implications + +#### Quality Gates +- Always run `make style` before completion +- Test both the specific case and general functionality +- Consider impact on existing users and configurations +- Document new patterns for future reference +- Verify changes work across different execution contexts + +### Examples from Practice + +#### A/B Kernel Testing Issue +**Symptoms**: `bootlinux_dev_tree_kernelrelease` not being used in dev builds + +**Root Cause Analysis**: +- 9P builds execute `run_once: true, delegate_to: localhost` +- Per-node A/B variables not available in localhost context +- Git checkout failed due to shallow clone missing refs + +**Solution Components**: +1. Variable resolution: `hostvars[groups['dev'][0]]['target_linux_ref']` +2. Git ref management: Force checkout correct ref before build +3. Configuration fix: Disable shallow clones for A/B different refs +4. Smart defaults: Auto-detect latest stable kernel version + +**Key Insight**: Complex issues often involve multiple subsystem interactions +rather than bugs in individual components. + +## Per-Node Variable Management and Scope Issues + +One of the most common and subtle sources of bugs in kdevops is per-node variable +scope issues, particularly when combining Ansible's execution contexts with +complex features like A/B testing and 9P builds. + +### Understanding Ansible Execution Contexts + +kdevops uses multiple Ansible execution patterns that affect variable visibility: + +#### 1. Normal Node Execution +```yaml +- name: Set per-node variable + set_fact: + my_node_var: "{{ some_value }}" + # Runs on each target node, variable is per-node +``` + +#### 2. Control Host Execution (run_once + delegate_to: localhost) +```yaml +- name: Process shared data + set_fact: + shared_var: "{{ processed_value }}" + run_once: true + delegate_to: localhost + # Runs once on control host, not on target nodes +``` + +#### 3. Mixed Context Operations +```yaml +- name: Access per-node data from control host + set_fact: + aggregated_data: "{{ hostvars[groups['target'][0]]['node_var'] }}" + run_once: true + delegate_to: localhost + # Attempts to access per-node variable from control context +``` + +### Common Variable Scope Problems + +#### Problem 1: Per-Node Variables Not Available on localhost + +**Symptom**: Variables set on target nodes are undefined when accessed from +localhost tasks. + +**Example**: +```yaml +# This sets target_linux_ref ONLY on nodes matching the condition +- name: Set development kernel parameters for dev nodes + set_fact: + target_linux_ref: "{{ bootlinux_dev_tree_ref }}" + when: + - kdevops_baseline_and_dev|bool + - bootlinux_ab_different_ref|bool + - bootlinux_is_dev_node|default(false)|bool + +# This tries to access per-node variable from localhost - MAY FAIL +- name: Use dev node's kernel ref for 9P build + set_fact: + active_ref: "{{ hostvars[groups['dev'][0]]['target_linux_ref'] }}" + run_once: true + delegate_to: localhost +``` + +**Root Cause**: The first task only runs on dev nodes and sets a per-node +variable. The second task runs on localhost but may not have access to the +per-node variable if there are timing or context issues. + +#### Problem 2: Host Scope Limiting with HOSTS Parameter + +**Symptom**: When using `make target HOSTS=specific-host`, variables set on +other hosts become inaccessible. + +**Example**: +```bash +# This limits the playbook scope to only the dev node +make linux HOSTS=demo-fio-tests-dev +``` + +If your playbook tries to access variables from baseline nodes or uses +`hostvars[groups['baseline'][0]]`, these may fail because the baseline +nodes are not in the current run scope. + +#### Problem 3: Race Conditions in Variable Resolution + +**Symptom**: Variables appear to be set inconsistently or use wrong values. + +**Root Cause**: Tasks with `run_once: true` may execute before per-node +tasks complete, leading to variable access before they're properly set. + +### Best Practices for Variable Management + +#### 1. Prefer Global Variables for Cross-Context Access + +**Bad**: +```yaml +# Set per-node, access from localhost - fragile +- name: Set node-specific value + set_fact: + node_value: "{{ some_computation }}" + +- name: Use in shared context + command: "process {{ hostvars[groups['target'][0]]['node_value'] }}" + run_once: true + delegate_to: localhost +``` + +**Good**: +```yaml +# Use global variable that's accessible everywhere +- name: Use global configuration + command: "process {{ global_config_value }}" + run_once: true + delegate_to: localhost +``` + +#### 2. Explicit Variable Resolution with Fallbacks + +**Recommended Pattern**: +```yaml +- name: Resolve variable with robust fallback + set_fact: + active_value: >- + {{ + hostvars[groups['dev'][0]]['target_value'] + if (groups['dev'] | length > 0 and + hostvars[groups['dev'][0]]['target_value'] is defined) + else fallback_global_value + }} + run_once: true + delegate_to: localhost +``` + +#### 3. Validate Variable Availability + +**Add Validation Tasks**: +```yaml +- name: Validate required variables are available + fail: + msg: "Required variable {{ item }} not found in dev node context" + when: hostvars[groups['dev'][0]][item] is not defined + loop: + - target_linux_ref + - target_linux_config + run_once: true + delegate_to: localhost +``` + +#### 4. Use Consistent Variable Naming + +**Pattern**: Use prefixes to indicate variable scope: +- `global_*` - Available everywhere +- `node_*` - Per-node variables +- `active_*` - Resolved variables for shared operations + +### Debugging Variable Scope Issues + +#### 1. Add Debug Tasks + +```yaml +- name: Debug variable availability + debug: + msg: | + Groups: {{ groups }} + Dev group: {{ groups['dev'] | default([]) }} + Hostvars keys: {{ hostvars.keys() | list }} + Target var: {{ hostvars[groups['dev'][0]]['target_var'] | default('UNDEFINED') }} + run_once: true + delegate_to: localhost +``` + +#### 2. Check Execution Context + +```yaml +- name: Show execution context + debug: + msg: | + Running on: {{ inventory_hostname }} + Delegate to: {{ ansible_delegated_vars | default('none') }} + Group names: {{ group_names }} + tags: debug +``` + +#### 3. Use Ansible Verbose Mode + +```bash +# Run with verbose output to see variable resolution +make target AV=3 # Ansible verbose level 3 +``` + +### A/B Testing Variable Resolution Example + +The A/B testing feature demonstrates proper variable resolution: + +```yaml +# Step 1: Set per-node variables (runs on dev nodes only) +- name: Set development kernel parameters for dev nodes + set_fact: + target_linux_ref: "{{ bootlinux_dev_tree_ref }}" + when: + - kdevops_baseline_and_dev|bool + - bootlinux_ab_different_ref|bool + - bootlinux_is_dev_node|default(false)|bool + +# Step 2: Resolve for shared operations (robust fallback) +- name: Determine active kernel parameters for A/B testing with 9P + set_fact: + active_linux_ref: "{{ bootlinux_dev_tree_ref }}" + # Direct use of global var instead of fragile hostvars access + when: + - kdevops_baseline_and_dev|bool + - bootlinux_ab_different_ref|bool + - bootlinux_9p|bool + run_once: true + delegate_to: localhost + +# Step 3: Use resolved variable +- name: Checkout correct git ref for A/B testing with 9P + git: + version: "{{ active_linux_ref | default(target_linux_ref) }}" + run_once: true + delegate_to: localhost +``` + +### Testing Variable Resolution + +When developing features that involve per-node variables: + +1. **Test with different HOSTS parameters**: + ```bash + make target HOSTS=demo-fio-tests # baseline only + make target HOSTS=demo-fio-tests-dev # dev only + make target # both nodes + ``` + +2. **Test with different configurations**: + - A/B testing enabled/disabled + - Different node configurations + - Varying group memberships + +3. **Validate variable values**: + ```bash + # Check resolved variables + grep "active_.*:" extra_vars.yaml + + # Verify node-specific settings + make target AV=2 | grep -A5 -B5 "Set.*fact" + ``` + +### Common Patterns to Avoid + +#### Anti-Pattern 1: Assuming Variable Availability +```yaml +# DON'T: Assume hostvars access will work +- name: Use dev node variable + command: "build {{ hostvars[groups['dev'][0]]['target_ref'] }}" +``` + +#### Anti-Pattern 2: Complex Conditional Logic in Variable Access +```yaml +# DON'T: Bury complex logic in variable expressions +- name: Set complex variable + set_fact: + value: "{{ 'dev' in group_names | ternary(dev_value, baseline_value) if condition else other_value }}" +``` + +#### Anti-Pattern 3: Side Effects in Variable Resolution +```yaml +# DON'T: Modify state during variable resolution +- name: Set variable with side effects + set_fact: + computed_value: "{{ some_value }}" + changed_when: true # Misleading change indication +``` + +### Recommended Patterns + +#### Pattern 1: Explicit Variable Resolution Phase +```yaml +# Phase 1: Collect per-node data +- name: Collect node-specific configurations + set_fact: + node_config: "{{ local_config }}" + +# Phase 2: Resolve for shared operations +- name: Resolve shared configuration + set_fact: + shared_config: "{{ resolved_value }}" + run_once: true + delegate_to: localhost + +# Phase 3: Execute with resolved config +- name: Execute shared operation + command: "process {{ shared_config }}" + run_once: true + delegate_to: localhost +``` + +#### Pattern 2: Configuration-Driven Variable Resolution +```yaml +# Use configuration variables that are globally accessible +- name: Resolve kernel reference + set_fact: + active_kernel_ref: >- + {{ + bootlinux_dev_tree_ref + if (kdevops_baseline_and_dev|bool and bootlinux_ab_different_ref|bool) + else target_linux_ref + }} + run_once: true + delegate_to: localhost +``` + +This approach avoids the fragile `hostvars` access pattern and relies on +configuration variables that are available in all execution contexts. + ## Prompt Examples Refer to PROMPTS.md for example set of prompts used to generate code on
Signature · 1 line
2.47.2
PATCH v2 32/33 CLAUDE.md: add don't BS rules
In reply to Luis ChamberlainAdd prominent section explicitly forbidding AI assistance from generating, synthesizing, mocking, or fabricating any test results of any kind. This rule was added after catching AI attempting to create synthetic performance data when encountering issues with VM provisioning instead of properly debugging and running actual tests on real systems.
kdevops is a real Linux kernel testing framework where all results must come from actual execution on real Device Under Test (DUT) systems. Fake results undermine the entire purpose and could affect important development decisions.
--- CLAUDE.md | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+)
CLAUDE.md +31 -0
@@ -13,6 +13,37 @@ and complex testing laboratories for kernel subsystems. **Main Repository**: https://github.com/linux-kdevops/kdevops **License**: copyleft-next-0.3.1 +## ⚠️ CRITICAL RULE: NEVER FAKE TEST RESULTS + +**ABSOLUTELY NEVER generate, synthesize, mock, or fake test results of any kind.** + +kdevops is a professional testing framework used for Linux kernel development and +performance analysis. All test results MUST come from actual execution on real +Device Under Test (DUT) systems. + +### What this means: +- **NEVER** create synthetic performance data or benchmark results +- **NEVER** generate mock IOPS, bandwidth, latency, or throughput numbers +- **NEVER** create fake JSON test output or fabricated metrics +- **ALWAYS** run actual tests on real VMs, bare metal, or cloud instances +- **ALWAYS** collect real data from actual fio, fstests, blktests execution +- **ALWAYS** verify that test systems are running and accessible before analysis + +### Valid approaches: +- ✅ Execute real tests: `ansible -i hosts all -m shell -a "fio --output-format=json ..."` +- ✅ Collect actual JSON output from running VMs +- ✅ Parse and analyze real performance data from live systems +- ✅ Generate graphs and reports from actual test execution results + +### Forbidden approaches: +- ❌ Creating synthetic performance numbers for demonstrations +- ❌ Generating mock test results for visualization examples +- ❌ Fabricating benchmark data to show workflows +- ❌ Using placeholder values like "let's assume 50K IOPS" + +**Violation of this rule undermines the entire purpose of the kdevops testing framework +and produces misleading results that could affect important development decisions.** + ## Core Architecture ### Build System
Signature · 1 line
2.47.2
PATCH v2 33/33 gen_nodes/gen_hosts: avoid usage of fs_config_path on task names
In reply to Luis ChamberlainThe variable fs_config_path is not defined when we don't enable fstests and so we'll get a warning about it not being defined. Fix this by not using it on task names.
--- playbooks/roles/gen_hosts/tasks/main.yml | 4 ++-- playbooks/roles/gen_nodes/tasks/main.yml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-)
playbooks/roles/gen_hosts/tasks/main.yml +2 -2
@@ -49,12 +49,12 @@ - ansible_hosts_template.stat.exists tags: vars -- name: Verify fstest config file file exists {{ fs_config_path }} +- name: Verify fstest config file exists stat: path: "{{ fs_config_path }}" register: fstests_config_file_reg when: - - is_fstests + - is_fstests|bool - name: Generate the Ansible hosts file for a Linux kernel build tags: [ 'hosts' ]
playbooks/roles/gen_nodes/tasks/main.yml +1 -1
@@ -109,7 +109,7 @@ - ansible_nodes_template.stat.exists tags: vars -- name: Verify fstest config file file exists {{ fs_config_path }} +- name: Verify fstest config file exists stat: path: "{{ fs_config_path }}" register: fstests_config_file_reg
Signature · 1 line
2.47.2
Quoted 2 lines · Luis Chamberlain
On this v2 I just dropped the accidental patches which Chuck asked for and merged the fixes onto his patches. That's it.
I've rebased and pushed.
Luis