Skip to content

Warn before configuring full Malcolm on undersized hosts - #1242

Merged
mmguero merged 1 commit into
cisagov:contributor-prsfrom
sylvesterkaczmarek:fix/483-warn-under-minimum-ram-20261015
Oct 15, 2026
Merged

mmguero merged 1 commit into
cisagov:contributor-prsfrom
sylvesterkaczmarek:fix/483-warn-under-minimum-ram-20261015

Conversation

@sylvesterkaczmarek

Copy link
Copy Markdown
Contributor

Description

Warn when the full Malcolm stack is configured for a local host whose detected physical RAM is below Malcolm's documented 24 GiB minimum. This follows the maintainer's requested direction in #483 rather than changing Java heap defaults (the smaller-heap approach in #1188 was deliberately rejected).

  • Display a non-blocking warning after the final profile/orchestration choices have been loaded, but before exporting or writing configuration.
  • Show the warning in the TUI/DUI and installer logs, including silent/noninteractive installs. Linux hosts also report when /proc/meminfo indicates no configured swap. If swap is configured, clarify that swap is not a replacement for RAM.
  • Skip the local-host preflight for capture-only Hedgehog and Kubernetes, where the installer's host-memory reading does not describe the remotely scheduled workload.
  • Preserve user-provided settings, OpenSearch/Logstash heap defaults, dry-run behaviour and normal installer control flow.
  • Document the preflight and the full-stack minimum.

Related issue(s)

Addresses #483. This is intentionally separate from the rejected heap-reduction PR #1188.

Type of change

  • Bug fix
  • New feature or enhancement
  • Documentation
  • Other (please describe)

How has this been tested?

python -m unittest scripts.installer.tests.unit.test_host_memory_preflight -v
python -m py_compile scripts/install.py scripts/installer/utils/host_memory_preflight.py scripts/installer/tests/unit/test_host_memory_preflight.py

8 focused tests pass, covering 4–23 GiB hosts, 24 GiB and larger hosts, no swap / swap present / unknown, missing and malformed /proc/meminfo, interactive message display, silent mode, Hedgehog/Kubernetes exclusions, and confirmation that heap defaults are unchanged. The warning is log-only and does not invoke configuration mutation methods.

The repository's larger installer unit suite was also run locally: 67 tests, 4 failures and 6 errors. These are the same 4 failures and 6 errors reproduced on unchanged upstream main (59 tests) in pre-existing configuration round-trip, Traefik, and validation tests; the 8 added cases pass. Static correctness checks and git diff --check passed (excluding longstanding install.py star-import/E402 warnings). No Docker/ISO or Kubernetes deployment was run; this is CPU-only, dependency-backed testing on macOS.

Documentation

  • Updated docs/system-requirements.md.

Was AI used in writing the code, tests, or description for this pull request?

  • No
  • Yes (please describe below)

ChatGPT assisted with source review, drafting the preflight implementation, unit tests, and this description. I inspected the changes, reproduced the original behaviour and ran the tests and static checks reported above.

Additional context

This intentionally does not change or enforce host hardware requirements. The warning is informational, and an undersized evaluation system remains unsupported for the full stack.

@mmguero
mmguero changed the base branch from main to contributor-prs October 15, 2026 20:02
@mmguero mmguero self-assigned this Oct 15, 2026
@mmguero mmguero added the install.py Relating to the install.py configuration script label Oct 15, 2026
@mmguero mmguero added this to Malcolm Oct 15, 2026
@mmguero mmguero moved this to Review in Malcolm Oct 15, 2026
@mmguero mmguero added this to the v26.10.0 milestone Oct 15, 2026
@mmguero
mmguero merged commit 301c88e into cisagov:contributor-prs Oct 15, 2026
@github-project-automation github-project-automation Bot moved this from Review to Done in Malcolm Oct 15, 2026
mmguero added a commit to mmguero-dev/Malcolm that referenced this pull request Oct 15, 2026
@mmguero mmguero mentioned this pull request Oct 29, 2026
@mmguero mmguero moved this from Done to Released in Malcolm Oct 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

install.py Relating to the install.py configuration script

Projects

Status: Released

Development

Successfully merging this pull request may close these issues.

2 participants