fix(ansible): refactor kernel parameters and fix tuned integration#2198
Queued
hunleyd wants to merge 9 commits into
Queued
fix(ansible): refactor kernel parameters and fix tuned integration#2198hunleyd wants to merge 9 commits into
hunleyd wants to merge 9 commits into
Conversation
romanhx
approved these changes
Jun 10, 2026
Any commits made after this event will not be merged.
Any commits made after this event will not be merged.
- Ensure tcp_keepalive sysctls are always applied in tuned profile - Remove dangerous bootloader section from tuned profile to prevent command line corruption - Move THP disabling to GRUB configuration in bootstrap script - Guard tuned service/profile activation to avoid chroot failures
Any commits made after this event will not be merged.
romanhx
reviewed
Jun 12, 2026
| function setup_grub_conf { | ||
| # Note: Unknown kernel parameters (like zswap settings on kernels without zswap support) | ||
| # are safely ignored by the kernel and passed to user-space. This allows us to | ||
| # include them here without risking boot failures on older or incompatible kernels. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR refactors how kernel parameters and
tunedprofiles are handled to ensure reliability and prevent command-line corruption.Changes:
1. Tuned & Kernel Parameter Refactoring
tunedintegration insetup-tuned.yml.[bootloader]section from thepostgresqltuned profile. This section was identified as dangerous as it could lead to corruption of the kernel command line during profile activation.tcp_keepalive_intvlandtcp_keepalive_timesettings fromsetup-system.ymlinto thepostgresqltuned profile's[sysctl]section.when: stage2_nix) totunedservice activation to avoid failures when running in restricted environments (like chroot during AMI builds).ebssurrogate/scripts/chroot-bootstrap-nix.sh.zswapparameters (zswap.enabled=1 zswap.zpool=zsmalloc zswap.compressor=zstd zswap.max_pool_percent=10) toGRUB_CMDLINE_LINUX_DEFAULT.transparent_hugepage=nevertoGRUB_CMDLINE_LINUX_DEFAULT.2. Systemd & Cleanup
ansible/tasks/setup-postgres.ymlfromoverride.conftooverrides.conffor thetuned.servicedependency.net.ipv4.tcp_keepalive_*sysctl tasks fromsetup-system.yml.Why?
tunedbootloader plugin is known to be fragile in certain environments and was causing issues with command-line management.tunedprofile makes the configuration more modular and easier to manage.