Support per-instance start bypassing assembly#2617
Open
SuperStrongDinosaur wants to merge 1 commit into
Open
Conversation
d8ed72c to
58c54a5
Compare
29a424c to
2d985ec
Compare
0997443 to
ef25374
Compare
ef25374 to
066564f
Compare
066564f to
4cb3d8d
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
### 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