From 89675927b0d8826f1e32a23f6d1f6afe6facf4c7 Mon Sep 17 00:00:00 2001 From: Dmitriy Rabotyagov Date: Sat, 28 Jun 2025 02:31:28 +0200 Subject: [PATCH] Offload kernel module management to openstack_hosts With [1] being implemented, we are having quite a good baseline for managing kernel modules in openstack_hosts role. So we can offload module management to the role alike to networking configuration. Also, 8021q is laready present and managed there [2]. [1] https://review.opendev.org/c/openstack/openstack-ansible-openstack_hosts/+/951852 [2] https://opendev.org/openstack/openstack-ansible-openstack_hosts/src/commit/26deaeb701564b9b2059bab92104d24638f49674/vars/debian.yml#L25 Change-Id: I599d75dcc24cbcfa594cf1293e4c629b2c117c4a Signed-off-by: Dmitriy Rabotyagov --- tests/roles/bootstrap-host/tasks/check-requirements.yml | 9 --------- tests/roles/bootstrap-host/tasks/prepare_aio_config.yml | 3 +++ tests/roles/bootstrap-host/templates/aio1_kernel.yml.j2 | 5 +++++ .../bootstrap-host/templates/user_variables.aio.yml.j2 | 1 + 4 files changed, 9 insertions(+), 9 deletions(-) create mode 100644 tests/roles/bootstrap-host/templates/aio1_kernel.yml.j2 diff --git a/tests/roles/bootstrap-host/tasks/check-requirements.yml b/tests/roles/bootstrap-host/tasks/check-requirements.yml index 997f972ee2..424b2ed185 100644 --- a/tests/roles/bootstrap-host/tasks/check-requirements.yml +++ b/tests/roles/bootstrap-host/tasks/check-requirements.yml @@ -138,12 +138,3 @@ - (host_data_disk_size_bytes | int) < (host_data_disk_min_size_bytes | int) tags: - check-disk-size - -- name: Ensure that the kernel has VXLAN, VLAN, and bonding support - community.general.modprobe: - name: "{{ item }}" - state: present - with_items: - - vxlan - - bonding - - 8021q diff --git a/tests/roles/bootstrap-host/tasks/prepare_aio_config.yml b/tests/roles/bootstrap-host/tasks/prepare_aio_config.yml index a4ca41a4d0..af4a2d5d20 100644 --- a/tests/roles/bootstrap-host/tasks/prepare_aio_config.yml +++ b/tests/roles/bootstrap-host/tasks/prepare_aio_config.yml @@ -154,6 +154,9 @@ - src: aio1_networks.yml.j2 dest: host_vars/aio1/networks.yml condition: true + - src: aio1_kernel.yml.j2 + dest: host_vars/aio1/kernel.yml + condition: true - src: user_variables_ceph.yml.j2 dest: user_variables_ceph.yml condition: "{{ 'ceph' in bootstrap_host_scenarios_expanded }}" diff --git a/tests/roles/bootstrap-host/templates/aio1_kernel.yml.j2 b/tests/roles/bootstrap-host/templates/aio1_kernel.yml.j2 new file mode 100644 index 0000000000..e75e35557d --- /dev/null +++ b/tests/roles/bootstrap-host/templates/aio1_kernel.yml.j2 @@ -0,0 +1,5 @@ +--- + +aio1_kernel_modules_bootstrap: + - name: vxlan + - name: bonding diff --git a/tests/roles/bootstrap-host/templates/user_variables.aio.yml.j2 b/tests/roles/bootstrap-host/templates/user_variables.aio.yml.j2 index 270345f118..7f513fe328 100644 --- a/tests/roles/bootstrap-host/templates/user_variables.aio.yml.j2 +++ b/tests/roles/bootstrap-host/templates/user_variables.aio.yml.j2 @@ -48,6 +48,7 @@ openstack_hosts_journald_config: openstack_hosts_systemd_services: "{{ query('vars', *query('varnames', '^aio_systemd_services_')) | flatten(levels=1) }}" openstack_hosts_systemd_networkd_networks: "{{ query('vars', *query('varnames', '^aio_systemd_networkd_networks_')) | flatten(levels=1) }}" openstack_hosts_systemd_networkd_devices: "{{ query('vars', *query('varnames', '^aio_systemd_networkd_devices_')) | flatten(levels=1) }}" +openstack_host_specific_kernel_modules: "{{ query('vars', *query('varnames', '^aio1_kernel_modules_')) | flatten(levels=1) }}" openstack_hosts_systemd_networkd_prefix: "osa_testing" {% endraw %}