diff --git a/docker/catalog/services/redpanda.yaml b/docker/catalog/services/redpanda.yaml index 9b66e3efb1..f7b8db70b8 100644 --- a/docker/catalog/services/redpanda.yaml +++ b/docker/catalog/services/redpanda.yaml @@ -17,6 +17,11 @@ healthcheck: start_period_s: 30 volumes: - redpanda_data:/var/lib/redpanda/data + # OMN-13469: bootstrap.yaml is the volume-reset-proof primary mechanism for + # setting the cluster partition cap. Applied on first cluster formation before + # any topics are created. Belt #1 (reset-proof); --set flag = belt #2; + # redpanda-partition-cap init service = belt #3. + - ./redpanda/.bootstrap.yaml:/etc/redpanda/.bootstrap.yaml:ro depends_on: [] restart: unless-stopped resources: null diff --git a/docker/docker-compose.infra.yml b/docker/docker-compose.infra.yml index 7592a8386c..f8342c9c0a 100644 --- a/docker/docker-compose.infra.yml +++ b/docker/docker-compose.infra.yml @@ -368,6 +368,11 @@ services: # OMN-7302: raise partition cap from default 1000 to 7000 to prevent # "Not enough resources" failures when topic count × partitions exceeds # the per-shard limit. + # NOTE: --set is a node-startup flag that may not persist to cluster config + # on a fresh volume. The primary reset-proof mechanism is .bootstrap.yaml + # (mounted below). The redpanda-partition-cap init service also applies the + # value via rpk cluster config set post-startup. All three layers agree on + # 7000. (OMN-13469) - --set topic_partitions_per_shard=7000 ports: - "${REDPANDA_EXTERNAL_PORT:-19092}:19092" @@ -379,6 +384,12 @@ services: - "${REDPANDA_ADMIN_PORT:-9644}:9644" volumes: - redpanda_data:/var/lib/redpanda/data + # OMN-13469: .bootstrap.yaml is the volume-reset-proof primary mechanism. + # Redpanda reads this file on first cluster formation (fresh volume) and + # applies the config before any topics are created. This is belt #1; + # the --set flag above is belt #2; the redpanda-partition-cap init service + # is belt #3. Do NOT apply to prod/stability/judge (follow-up: OMN-13469). + - ./redpanda/.bootstrap.yaml:/etc/redpanda/.bootstrap.yaml:ro networks: - omnibase-infra-network healthcheck: diff --git a/docker/redpanda/.bootstrap.yaml b/docker/redpanda/.bootstrap.yaml new file mode 100644 index 0000000000..20ec2edbc5 --- /dev/null +++ b/docker/redpanda/.bootstrap.yaml @@ -0,0 +1,14 @@ +# OMN-13469: Redpanda cluster bootstrap configuration. +# Mounted read-only into the redpanda container at /etc/redpanda/.bootstrap.yaml. +# Redpanda reads this file on FIRST cluster formation (fresh volume) and applies +# these values before any topics are created — making the partition cap +# volume-reset-proof. +# +# Belt-and-suspenders: +# Primary (reset-proof): this file (applied on fresh volume / first boot) +# Secondary (warm restart): --set flag in compose command +# Tertiary (post-start): redpanda-partition-cap init service (rpk cluster config set) +# +# All three layers must agree. Edit all three if the target value changes. +topic_partitions_per_shard: 7000 +topic_memory_per_partition: 1048576