From 7335d0c6eff548ea6d57a5078ff84094371ace53 Mon Sep 17 00:00:00 2001 From: Joel Low Date: Mon, 21 Sep 2026 18:17:13 +0800 Subject: [PATCH 1/2] fix: disable Kexec Handover to free up ~128MiB of RAM Required for KUBE-1370. kho reserves memory to be handed over to the kexec'ed kernel; on memory constrained instances this is a significant amount of memory. Disable kho since we don't use kexec to reboot anyway. --- ansible/handlers/main.yml | 2 ++ ansible/handlers/update-grub.yml | 4 ++++ ansible/playbook.yml | 4 ++++ ansible/tasks/setup-system.yml | 10 ++++++++++ 4 files changed, 20 insertions(+) create mode 100644 ansible/handlers/main.yml create mode 100644 ansible/handlers/update-grub.yml diff --git a/ansible/handlers/main.yml b/ansible/handlers/main.yml new file mode 100644 index 0000000000..17f566650f --- /dev/null +++ b/ansible/handlers/main.yml @@ -0,0 +1,2 @@ +- name: Regenerate grub configuration + ansible.builtin.import_tasks: update-grub.yml diff --git a/ansible/handlers/update-grub.yml b/ansible/handlers/update-grub.yml new file mode 100644 index 0000000000..cf0baca97a --- /dev/null +++ b/ansible/handlers/update-grub.yml @@ -0,0 +1,4 @@ +- name: Regenerate grub configuration + ansible.builtin.command: + cmd: 'update-grub' + changed_when: true diff --git a/ansible/playbook.yml b/ansible/playbook.yml index 9edb75307e..93bc178060 100644 --- a/ansible/playbook.yml +++ b/ansible/playbook.yml @@ -205,3 +205,7 @@ when: stage2 and not qemu become: yes import_tasks: tasks/stage2/setup-swap.yml + + handlers: + - name: Import handlers + import_tasks: handlers/main.yml diff --git a/ansible/tasks/setup-system.yml b/ansible/tasks/setup-system.yml index e753046dde..eabfb95334 100644 --- a/ansible/tasks/setup-system.yml +++ b/ansible/tasks/setup-system.yml @@ -109,6 +109,16 @@ owner: 'root' group: 'root' + - name: Disable kexec handover # Saves ~128 MiB of RAM on a nano. + ansible.builtin.copy: + content: + GRUB_CMDLINE_LINUX_DEFAULT="${GRUB_CMDLINE_LINUX_DEFAULT} kho=off" + dest: /etc/default/grub.d/51-disable-kho + owner: root + group: root + notify: + - Regenerate grub configuration + - name: Disable algif_aead module autoload for Copy Fail mitigation ansible.builtin.copy: content: | From 861540f46d2335bff5efc3afb778d14ca2a7084e Mon Sep 17 00:00:00 2001 From: Nicola Ferraro Date: Mon, 21 Sep 2026 16:56:41 +0200 Subject: [PATCH 2/2] fix: use the .cfg extension for grub config --- ansible/tasks/setup-system.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ansible/tasks/setup-system.yml b/ansible/tasks/setup-system.yml index eabfb95334..d590280782 100644 --- a/ansible/tasks/setup-system.yml +++ b/ansible/tasks/setup-system.yml @@ -113,7 +113,7 @@ ansible.builtin.copy: content: GRUB_CMDLINE_LINUX_DEFAULT="${GRUB_CMDLINE_LINUX_DEFAULT} kho=off" - dest: /etc/default/grub.d/51-disable-kho + dest: /etc/default/grub.d/51-disable-kho.cfg owner: root group: root notify: