Skip to content

Commit dcae072

Browse files
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>
1 parent e6d0d7c commit dcae072

4 files changed

Lines changed: 20 additions & 0 deletions

File tree

‎ansible/handlers/main.yml‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
- name: Regenerate grub configuration
2+
ansible.builtin.import_tasks: update-grub.yml

‎ansible/handlers/update-grub.yml‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
- name: Regenerate grub configuration
2+
ansible.builtin.command:
3+
cmd: 'update-grub'
4+
changed_when: true

‎ansible/playbook.yml‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,3 +205,7 @@
205205
when: stage2 and not qemu
206206
become: yes
207207
import_tasks: tasks/stage2/setup-swap.yml
208+
209+
handlers:
210+
- name: Import handlers
211+
import_tasks: handlers/main.yml

‎ansible/tasks/setup-system.yml‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,16 @@
109109
owner: 'root'
110110
group: 'root'
111111

112+
- name: Disable kexec handover # Saves ~128 MiB of RAM on a nano.
113+
ansible.builtin.copy:
114+
content:
115+
GRUB_CMDLINE_LINUX_DEFAULT="${GRUB_CMDLINE_LINUX_DEFAULT} kho=off"
116+
dest: /etc/default/grub.d/51-disable-kho.cfg
117+
owner: root
118+
group: root
119+
notify:
120+
- Regenerate grub configuration
121+
112122
- name: Disable algif_aead module autoload for Copy Fail mitigation
113123
ansible.builtin.copy:
114124
content: |

0 commit comments

Comments
 (0)