From e6f76976563dd0a89497f8b4cd15113579ba07ad Mon Sep 17 00:00:00 2001 From: Pierre Riteau Date: Wed, 21 Jan 2026 12:56:13 +0100 Subject: [PATCH] Support swap configuration for all host groups An earlier change [1] added support for swap configuration, but the swap playbook was only imported in ansible/overcloud-host-configure.yml. This completes swap support for the seed hypervisor, seed and infra VM hosts and adds missing variables in etc/kayobe/*.yml files. [1] https://review.opendev.org/c/openstack/kayobe/+/851195 Closes-Bug: #2138800 Change-Id: I3971d05f3c09a6841f6666a18f2d2b44b226411d Signed-off-by: Pierre Riteau (cherry picked from commit 6b4028754321b3e20b45f93b6fba159985e850af) --- ansible/infra-vm-host-configure.yml | 1 + ansible/seed-host-configure.yml | 1 + ansible/seed-hypervisor-host-configure.yml | 1 + etc/kayobe/compute.yml | 6 ++++++ etc/kayobe/controllers.yml | 6 ++++++ etc/kayobe/infra-vms.yml | 6 ++++++ etc/kayobe/monitoring.yml | 6 ++++++ etc/kayobe/seed-hypervisor.yml | 6 ++++++ etc/kayobe/seed.yml | 6 ++++++ etc/kayobe/storage.yml | 6 ++++++ releasenotes/notes/fix-swap-support-35ccff76a9b46b4c.yaml | 5 +++++ 11 files changed, 50 insertions(+) create mode 100644 releasenotes/notes/fix-swap-support-35ccff76a9b46b4c.yaml diff --git a/ansible/infra-vm-host-configure.yml b/ansible/infra-vm-host-configure.yml index 35d13a092..644c7f03a 100644 --- a/ansible/infra-vm-host-configure.yml +++ b/ansible/infra-vm-host-configure.yml @@ -21,4 +21,5 @@ - import_playbook: "mdadm.yml" - import_playbook: "luks.yml" - import_playbook: "lvm.yml" +- import_playbook: "swap.yml" - import_playbook: "container-engine.yml" diff --git a/ansible/seed-host-configure.yml b/ansible/seed-host-configure.yml index 64604d74e..00c7eed6c 100644 --- a/ansible/seed-host-configure.yml +++ b/ansible/seed-host-configure.yml @@ -22,6 +22,7 @@ - import_playbook: "mdadm.yml" - import_playbook: "luks.yml" - import_playbook: "lvm.yml" +- import_playbook: "swap.yml" - import_playbook: "kolla-ansible-user.yml" - import_playbook: "kolla-pip.yml" - import_playbook: "kolla-target-venv.yml" diff --git a/ansible/seed-hypervisor-host-configure.yml b/ansible/seed-hypervisor-host-configure.yml index 9bcb1f50c..a91f5781a 100644 --- a/ansible/seed-hypervisor-host-configure.yml +++ b/ansible/seed-hypervisor-host-configure.yml @@ -21,4 +21,5 @@ - import_playbook: "mdadm.yml" - import_playbook: "luks.yml" - import_playbook: "lvm.yml" +- import_playbook: "swap.yml" - import_playbook: "seed-hypervisor-libvirt-host.yml" diff --git a/etc/kayobe/compute.yml b/etc/kayobe/compute.yml index 383abd16f..f8a7deb29 100644 --- a/etc/kayobe/compute.yml +++ b/etc/kayobe/compute.yml @@ -212,6 +212,12 @@ # compute_libvirt_ceph_repo_install is true. Default is 'squid'. #compute_libvirt_ceph_repo_release: +############################################################################### +# Compute node swap configuration. + +# List of swap devices. Each item is a dict containing a 'device' item. +#compute_swap: + ############################################################################### # Dummy variable to allow Ansible to accept this file. workaround_ansible_issue_8743: yes diff --git a/etc/kayobe/controllers.yml b/etc/kayobe/controllers.yml index caa03a6ff..066c42d33 100644 --- a/etc/kayobe/controllers.yml +++ b/etc/kayobe/controllers.yml @@ -171,6 +171,12 @@ # - state: enabled #controller_firewalld_rules: +############################################################################### +# Controller node swap configuration. + +# List of swap devices. Each item is a dict containing a 'device' item. +#controller_swap: + ############################################################################### # Dummy variable to allow Ansible to accept this file. workaround_ansible_issue_8743: yes diff --git a/etc/kayobe/infra-vms.yml b/etc/kayobe/infra-vms.yml index 2b012b8e5..bac35ad8a 100644 --- a/etc/kayobe/infra-vms.yml +++ b/etc/kayobe/infra-vms.yml @@ -180,6 +180,12 @@ # - state: enabled #infra_vm_firewalld_rules: +############################################################################### +# Infrastructure VM node swap configuration. + +# List of swap devices. Each item is a dict containing a 'device' item. +#infra_vm_swap: + ############################################################################### # Dummy variable to allow Ansible to accept this file. workaround_ansible_issue_8743: yes diff --git a/etc/kayobe/monitoring.yml b/etc/kayobe/monitoring.yml index 5a19d7023..8c63bd589 100644 --- a/etc/kayobe/monitoring.yml +++ b/etc/kayobe/monitoring.yml @@ -117,6 +117,12 @@ # - state: enabled #monitoring_firewalld_rules: +############################################################################### +# Monitoring node swap configuration. + +# List of swap devices. Each item is a dict containing a 'device' item. +#monitoring_swap: + ############################################################################### # Dummy variable to allow Ansible to accept this file. workaround_ansible_issue_8743: yes diff --git a/etc/kayobe/seed-hypervisor.yml b/etc/kayobe/seed-hypervisor.yml index cded893f9..5905eefe0 100644 --- a/etc/kayobe/seed-hypervisor.yml +++ b/etc/kayobe/seed-hypervisor.yml @@ -136,6 +136,12 @@ # - state: enabled #seed_hypervisor_firewalld_rules: +############################################################################### +# Seed hypervisor node swap configuration. + +# List of swap devices. Each item is a dict containing a 'device' item. +#seed_hypervisor_swap: + ############################################################################### # Dummy variable to allow Ansible to accept this file. workaround_ansible_issue_8743: yes diff --git a/etc/kayobe/seed.yml b/etc/kayobe/seed.yml index 9f4f7055b..6b4eb9f9b 100644 --- a/etc/kayobe/seed.yml +++ b/etc/kayobe/seed.yml @@ -131,6 +131,12 @@ # - state: enabled #seed_firewalld_rules: +############################################################################### +# Seed node swap configuration. + +# List of swap devices. Each item is a dict containing a 'device' item. +#seed_swap: + ############################################################################### # Dummy variable to allow Ansible to accept this file. workaround_ansible_issue_8743: yes diff --git a/etc/kayobe/storage.yml b/etc/kayobe/storage.yml index 1866e6df3..170ed2ab2 100644 --- a/etc/kayobe/storage.yml +++ b/etc/kayobe/storage.yml @@ -147,6 +147,12 @@ # - state: enabled #storage_firewalld_rules: +############################################################################### +# Storage node swap configuration. + +# List of swap devices. Each item is a dict containing a 'device' item. +#storage_swap: + ############################################################################### # Dummy variable to allow Ansible to accept this file. workaround_ansible_issue_8743: yes diff --git a/releasenotes/notes/fix-swap-support-35ccff76a9b46b4c.yaml b/releasenotes/notes/fix-swap-support-35ccff76a9b46b4c.yaml new file mode 100644 index 000000000..574bf101c --- /dev/null +++ b/releasenotes/notes/fix-swap-support-35ccff76a9b46b4c.yaml @@ -0,0 +1,5 @@ +--- +fixes: + - | + Fixes swap configuration for the seed hypervisor, seed and infra VM hosts. + `LP#2138800 `__