supabase-postgres.git / summary / log / commit / refs
commit dcae072b4b94499f8a67cc7dd23de2facd1d15b2
Author: Joel Low <joel.low@supabase.io>
Commit: GitHub <noreply@github.com>
Date: Tue Sep 22 12:27:24 2026 +0000
fix: disable Kexec Handover to free up ~128MiB of RAM (#2472)
* 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.
* fix: use the .cfg extension for grub config
---------
Co-authored-by: Nicola Ferraro <ni.ferraro@gmail.com>
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(+)
diff --git a/ansible/handlers/main.yml b/ansible/handlers/main.yml
new file mode 100644
index 00000000..17f56665
--- /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 00000000..cf0baca9
--- /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 9edb7530..93bc1780 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 e753046d..d5902807 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.cfg
+ owner: root
+ group: root
+ notify:
+ - Regenerate grub configuration
+
- name: Disable algif_aead module autoload for Copy Fail mitigation
ansible.builtin.copy:
content: |