Skip to content

sysctl Init datanode init container to set vm.max_map_count#108

Open
alix-graylog wants to merge 1 commit into
mainfrom
os-vm-max-map
Open

sysctl Init datanode init container to set vm.max_map_count#108
alix-graylog wants to merge 1 commit into
mainfrom
os-vm-max-map

Conversation

@alix-graylog

Copy link
Copy Markdown
Collaborator

Summary

This addresses review reference C-05.

Fix vm.max_map_count kernel parameter requirement for OpenSearch initialization in Data
Node. Implements configurable privileged init container that runs during Data Node pod
startup to set the required kernel parameter. This resolves bootstrap failures on
clusters where the default vm.max_map_count (65530) is below the OpenSearch minimum
(262144).

Details

  • Added sysctlInit block to datanode values with configurable image, securityContext,
    and vmMaxMapCount parameter
  • Implemented privileged init container in Datanode StatefulSet that runs sysctl -w
    vm.max_map_count= during pod startup
  • Added comprehensive Prerequisites section to README documenting both manual
    cluster-wide fix and automatic opt-in approach via Helm
  • Added schema validation for sysctlInit configuration with minimum vmMaxMapCount
    constraint of 262144
  • Init container is opt-in (disabled by default) to maintain backwards compatibility
  • Supports custom image pull secrets via pod-spec inheritance

Linked issues

This fixes [#106]()

PR Checklist

Please check the items that apply to your change.

  • Tests added/updated
  • Documentation updated
  • This PR includes a new feature
  • This PR includes a bugfix
  • This PR includes a refactor

Testing Checklist

Static Validation

  • Linter check passes: helm lint ./charts/graylog
  • Helm renders local template successfully: helm template graylog ./charts/graylog
    --validate

Installation

  • Fresh installation completes successfully with sysctlInit enabled
  • All pods reach Running state with init container completing
  • Fresh installation completes successfully with sysctlInit enabled
  • All pods reach Running state with init container completing
  • Helm tests pass: helm test graylog

Functional (if applicable)

  • Init container successfully sets vm.max_map_count on Data Node pods
  • Data Node bootstrap completes without OpenSearch memory mapping errors
  • DataNodes visible in System > Cluster Configuration

Upgrade (if applicable)

  • Upgrade from previous release succeeds with sysctlInit disabled by default
  • Scaling up/down works correctly with init container
  • Configuration changes apply correctly

Specific to this PR

  • Verified privileged init container can set kernel parameter
  • Confirmed init container runs during pod startup before main container
  • Tested with both opt-in enabled and disabled (default) configurations

Notes for reviewers

  • This is an opt-in feature disabled by default to maintain backwards compatibility
  • The init container uses privileged: true to allow kernel parameter modification
  • Consider Option B follow-up (DaemonSet approach) if pre-node preparation becomes a requirement
  • Documentation includes both manual and automatic remediation options for operators

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant