Skip to content

[Tech Debt]: chaos-network installs kernel-modules-extra at first boot; pre-bake in golden image #72

Description

@mrhillsman

Category

Performance

Description

internal/workloads/chaos_network.go runs dnf install -y kernel-modules-extra-$(uname -r) from its cloud-init runcmd block to ensure sch_netem is available. This:

  • Adds notable boot time (network fetch + DNF transaction) — measurable minutes on first boot.
  • Will fail on a kernel mismatch between the package repo and the running kernel image.
  • Requires the VM to have internet egress at first boot, which is exactly the network this workload is designed to disrupt.

Severity

Medium — increases maintenance burden or risk of future bugs

Affected Files

  • internal/workloads/chaos_network.goRunCmd includes the dnf install
  • build/golden-image/Containerfile — does not currently install kernel-modules-extra
  • build/golden-image/README.md — should mention sch_netem provenance once fixed
  • docs/chaos-workloads.md — currently says "loaded from kernel-modules-extra … on first boot"

(File path assumes the rename in the companion tech-debt issue [chaos-network.gochaos_network.go] has landed. If not, substitute the hyphenated name.)

Proposed Fix

Pre-install kernel-modules-extra in the golden image:

  1. Add kernel-modules-extra to the dnf install layer in build/golden-image/Containerfile.
  2. Remove the dnf install from chaos_network.go's RunCmd, leaving only modprobe sch_netem.
  3. Update docs/chaos-workloads.md to note that the golden image carries sch_netem and the default Fedora container disk requires internet egress + a kernel match at first boot.

This also makes chaos-network resilient when run with latency-ms or packet-loss-percent high enough to defeat the dnf install itself.

Area

Workloads

Architecture Layer

Layer 3 - Workload Definitions (workloads, registry)

Metadata

Metadata

Assignees

No one assigned

    Labels

    size/SDenotes a PR that changes 10-29 lines, ignoring generated files.tech-debtTechnical debt, code quality, or maintenance concerntriage/acceptedIndicates an issue or PR is ready to be actively worked on.

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions