Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion .github/actions/build-sandbox-template/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ inputs:
description: "Number of frame encode workers"
required: false
default: ""
disk_size_mb:
description: "Base template rootfs disk size in MB. Larger than the create-build default to leave headroom for disk-heavy build steps after the build-reserved-disk-space-mb reservation."
required: false
default: "2048"

runs:
using: "composite"
Expand All @@ -27,6 +31,7 @@ runs:
TEMPLATE_ID: "2j6ly824owf4awgai1xo"
KERNEL_VERSION: "vmlinux-6.1.158-c1a568c"
FIRECRACKER_VERSION: "v1.14.1_431f1fc"
DISK_SIZE_MB: ${{ inputs.disk_size_mb }}
COMPRESS_ENABLED: ${{ inputs.compress_enabled }}
COMPRESS_TYPE: ${{ inputs.compress_type }}
COMPRESS_LEVEL: ${{ inputs.compress_level }}
Expand All @@ -50,5 +55,6 @@ runs:
TEMPLATE_ID=${TEMPLATE_ID} \
BUILD_ID=${BUILD_ID} \
KERNEL_VERSION=${KERNEL_VERSION} \
FC_VERSION=${FC_VERSION}
FC_VERSION=${FC_VERSION} \
DISK_SIZE_MB=${DISK_SIZE_MB}
shell: bash
7 changes: 6 additions & 1 deletion packages/orchestrator/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,10 @@ test-docker:
@echo "Done"

.PHONY: build-template
# Disk size (MB) of the base template rootfs. Matches create-build's own
# default; callers (e.g. integration-test CI) can override to leave headroom
# for disk-heavy build steps after the build-reserved-disk-space-mb reservation.
DISK_SIZE_MB ?= 1024
build-template: fetch-busybox
TEMPLATE_BUCKET_NAME=$(TEMPLATE_BUCKET_NAME) \
GOOGLE_SERVICE_ACCOUNT_BASE64=$(GOOGLE_SERVICE_ACCOUNT_BASE64) \
Expand All @@ -163,7 +167,8 @@ build-template: fetch-busybox
-template $(TEMPLATE_ID) \
-to-build $(BUILD_ID) \
-kernel $(KERNEL_VERSION) \
-firecracker $(FIRECRACKER_VERSION)
-firecracker $(FIRECRACKER_VERSION) \
-disk $(DISK_SIZE_MB)

.PHONY: migrate
migrate:
Expand Down
2 changes: 1 addition & 1 deletion packages/shared/pkg/featureflags/flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ var (

// BuildReservedDiskSpaceMB is the amount of disk space in MB reserved for root on the guest filesystem.
// Reserved blocks are only usable by root (uid 0), protecting the guest OS from disk-full conditions.
BuildReservedDiskSpaceMB = NewIntFlag("build-reserved-disk-space-mb", 0)
BuildReservedDiskSpaceMB = NewIntFlag("build-reserved-disk-space-mb", 256)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Keep integration build quota in sync with the new reservation

With this fallback now reserving 256 MB for every local/offline build, API-triggered integration template builds still use the integration team's base disk_mb limit of 512 because RegisterBuild sends data.Team.Limits.DiskMb to template-manager and the seed addon only increases concurrency, not extra_disk_mb. The updated env_builds rows only affect the already-seeded template, so disk-heavy integration builds created through /v3/templates still lose half their writable space before RUN steps and can fail despite the intended 1024 MB bump.

Useful? React with 👍 / 👎.


// MaxStartingInstancesPerNode limits concurrent sandbox start/resume operations on a single orchestrator node.
// Must be > 0.
Expand Down
Loading