Skip to content

Commit 7c518d0

Browse files
committed
Fix FPR and hugepages conflict in create-build command
Firecracker rejects balloon devices (used by free-page-reporting) when hugepages is enabled. The create-build CLI was auto-enabling FPR for FC v1.14+ without checking the hugepages flag, causing builds to fail with the default --hugepages=true. This fix applies the same logic as the server build path: only enable FPR automatically when hugepages is disabled. Explicit --free-page-reporting flag still overrides the default behavior.
1 parent a1b3a8f commit 7c518d0

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

  • packages/orchestrator/cmd/create-build

‎packages/orchestrator/cmd/create-build/main.go‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -358,15 +358,16 @@ func doBuild(
358358
})
359359
}
360360

361-
// Default FPR on for FC v1.14+; explicit --free-page-reporting overrides.
361+
// Default FPR on for FC v1.14+ unless hugepages is enabled.
362+
// Firecracker rejects balloon (free-page-reporting) together with hugepages.
362363
var fprEnabled bool
363364
if freePageReporting != nil {
364365
fprEnabled = *freePageReporting
365366
} else {
366367
versionOnly, _, _ := strings.Cut(fcVersion, "_")
367368
supported, err := utils.IsGTEVersion(versionOnly, "v1.14.0")
368369
if err == nil {
369-
fprEnabled = supported
370+
fprEnabled = !hugePages && supported
370371
}
371372
}
372373

0 commit comments

Comments
 (0)