Skip to content

Support per-instance start bypassing assembly#2617

Open
SuperStrongDinosaur wants to merge 1 commit into
google:mainfrom
SuperStrongDinosaur:backend_start
Open

Support per-instance start bypassing assembly#2617
SuperStrongDinosaur wants to merge 1 commit into
google:mainfrom
SuperStrongDinosaur:backend_start

Conversation

@SuperStrongDinosaur
Copy link
Copy Markdown
Collaborator

@SuperStrongDinosaur SuperStrongDinosaur commented May 28, 2026

### Summary

Running cvd start typically triggers assemble_cvd, which regenerates the cuttlefish_config.json for all configured instances. Running this in a shared environment for a single instance can overwrite and corrupt the configuration of already running instances. This change allows starting a specific stopped instance using its existing assembled configuration.

### Key Changes

Assembly Bypass: Modified CvdStartCommandHandler::Handle to detect if a specific instance is targeted via selectors. Added a disk check for cuttlefish_config.json before bypassing assembly. If the configuration is missing, it correctly falls back to the normal group start path, runs assemble_cvd, and boots all instances.
LaunchSingleInstance Implementation: Added LaunchSingleInstance which directly constructs and invokes the run_cvd command for the target instance, bypassing assemble_cvd.
Environment Setup: Ensures LaunchSingleInstance sets up the exact environment variables required for run_cvd to boot the specific instance.
Database Status Update Fix: Updated LaunchSingleInstance to only update the database state for the targeted instance being started, preventing other stopped instances in the group from being incorrectly marked as active.

Bug
b/459780275

Document
go/cuttlefish-per-instance-control

Frontend pr
#2618

@SuperStrongDinosaur SuperStrongDinosaur changed the title feat(backend): support per-instance start bypassing assembly Support per-instance start bypassing assembly May 28, 2026
@SuperStrongDinosaur SuperStrongDinosaur added the kokoro:run Run e2e tests. label May 28, 2026
@GoogleCuttlefishTesterBot GoogleCuttlefishTesterBot removed the kokoro:run Run e2e tests. label May 28, 2026
@SuperStrongDinosaur SuperStrongDinosaur force-pushed the backend_start branch 5 times, most recently from 29a424c to 2d985ec Compare June 2, 2026 15:56
@SuperStrongDinosaur SuperStrongDinosaur force-pushed the backend_start branch 2 times, most recently from 0997443 to ef25374 Compare June 8, 2026 09:25
@SuperStrongDinosaur SuperStrongDinosaur marked this pull request as ready for review June 8, 2026 11:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants