Repository navigation
fix(OMN-13469): durabilize dev redpanda partition cap via .bootstrap.yaml - #2064
Conversation
…yaml Root cause: fresh Redpanda volume boots with DEFAULT cluster cap topic_partitions_per_shard=1000 (single shard). With ~1392 contract topics, the broker jams at ~995 with BROKER_NOT_AVAILABLE, leaving the runtime stuck runtime_pending. The --set flag passed to `redpanda start` is a node-startup flag that does not persist cluster config on a fresh volume; the redpanda-partition-cap init service (restart:"no") does not re-run after a volume reset. Fix: add docker/redpanda/.bootstrap.yaml containing topic_partitions_per_shard: 7000 topic_memory_per_partition: 1048576 Redpanda reads .bootstrap.yaml on FIRST cluster formation (fresh volume), applying the config before any topics are created — making the cap volume-reset-proof regardless of init-service execution order. Three-layer belt-and-suspenders (all must agree on 7000): 1. .bootstrap.yaml (reset-proof, primary) ← this PR 2. --set topic_partitions_per_shard=7000 (node startup flag, warm) 3. redpanda-partition-cap init service (rpk cluster config set, post-boot) Scope: dev compose (docker-compose.infra.yml + catalog/services/redpanda.yaml) only. Prod/stability/judge lanes have independent rpk-based cap management and are NOT touched (follow-up: OMN-13469 prod/stability parity). Evidence-Ticket: OMN-13469
📝 WalkthroughWalkthroughAdds ChangesRedpanda Partition Cap Bootstrap
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
docker/docker-compose.infra.yml (1)
376-376: 🧹 Nitpick | 🔵 Trivial | 💤 Low valueConsider adding
topic_memory_per_partitionto the--setflag for consistency.The
.bootstrap.yaml(Layer 1) sets bothtopic_partitions_per_shard: 7000andtopic_memory_per_partition: 1048576, and theredpanda-partition-capservice (Layer 3, lines 423-424) also sets both values viarpk cluster config set. However, Layer 2 (the--setflag) only setstopic_partitions_per_shard=7000.The PR objectives state: "All three layers must agree. Edit all three if the target value changes."
🔧 Add topic_memory_per_partition to --set flag
# 7000. (OMN-13469) - --set topic_partitions_per_shard=7000 + - --set topic_memory_per_partition=1048576🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@docker/docker-compose.infra.yml` at line 376, The --set flag in the docker-compose.infra.yml file is missing the topic_memory_per_partition parameter that is present in both the .bootstrap.yaml and redpanda-partition-cap service configuration layers. Add topic_memory_per_partition=1048576 to the --set flag alongside the existing topic_partitions_per_shard=7000 setting to ensure consistency across all three configuration layers as specified in the PR objectives.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@docker/docker-compose.infra.yml`:
- Line 376: The --set flag in the docker-compose.infra.yml file is missing the
topic_memory_per_partition parameter that is present in both the .bootstrap.yaml
and redpanda-partition-cap service configuration layers. Add
topic_memory_per_partition=1048576 to the --set flag alongside the existing
topic_partitions_per_shard=7000 setting to ensure consistency across all three
configuration layers as specified in the PR objectives.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: da93c76d-f3e4-40b7-9a27-53bbc6e23464
📒 Files selected for processing (3)
docker/catalog/services/redpanda.yamldocker/docker-compose.infra.ymldocker/redpanda/.bootstrap.yaml
fix(OMN-13469): durabilize dev redpanda partition cap via .bootstrap.yaml
Root Cause (verified live)
Fresh Redpanda volume boots with DEFAULT cluster cap
topic_partitions_per_shard=1000(single shard). With ~1392 contract topics, the broker jams at ~995 withBROKER_NOT_AVAILABLE, leaving the runtime stuckruntime_pending.Why existing mechanisms fail on fresh volume / partial recreate:
--set topic_partitions_per_shard=7000passed toredpanda startis a node-startup hint, NOT a persistent cluster config write — it does not survive fresh volume formation.redpanda-partition-capinit service (restart:"no") runs once on initial stack creation but does NOT re-run after a volume reset or partial recreate.Fix
Added
docker/redpanda/.bootstrap.yaml:Mounted read-only into the
redpandacontainer at/etc/redpanda/.bootstrap.yaml. Redpanda reads this file on first cluster formation (fresh volume), applying the config before any topics are created — making the partition cap volume-reset-proof.Belt-and-suspenders (all three layers agree on 7000)
.bootstrap.yaml← this PR--set topic_partitions_per_shard=7000in compose commandredpanda-partition-capinit service viarpk cluster config setredpandahealthy (existing)Belts #2 and #3 are NOT removed — they are harmless and help on warm restarts. Comment added referencing OMN-13469 to explain the layering.
Files Changed
docker/redpanda/.bootstrap.yaml(new) — cluster bootstrap config, 7000 partitions/sharddocker/docker-compose.infra.yml— added bootstrap.yaml mount + clarifying commentdocker/catalog/services/redpanda.yaml— added bootstrap.yaml mount to catalog manifestScope
Dev compose only (
docker-compose.infra.yml+docker/catalog/services/redpanda.yaml). Prod/stability/judge lanes have independent rpk-based cap management and are NOT touched by this PR. Follow-up: extend to prod/stability for full parity (tracked under OMN-13469).Validation
docker-compose -f docker/docker-compose.infra.yml config -qpasses (syntax valid; env-var interpolation warning is pre-existing)pre-commit run --files docker/docker-compose.infra.yml docker/catalog/services/redpanda.yaml docker/redpanda/.bootstrap.yaml— all hooks passEvidence-Source: 815310265ba79c283c718c1524e1ebab6315f04e
Evidence-Ticket: OMN-13469