Skip to content

Conversation

@0405ysj
Copy link
Collaborator

@0405ysj 0405ysj commented Oct 20, 2025

Context: b/383428636

Cloud Orchestrator will set proper environment with google/cloud-android-orchestration#486.

@0405ysj 0405ysj force-pushed the enable_vhost_user_vsock branch from 1d9e7c6 to d248bf8 Compare October 21, 2025 01:55
@0405ysj 0405ysj added the kokoro:run Run e2e tests. label Oct 21, 2025
@GoogleCuttlefishTesterBot GoogleCuttlefishTesterBot removed the kokoro:run Run e2e tests. label Oct 21, 2025
@0405ysj 0405ysj marked this pull request as ready for review October 21, 2025 01:58
# Defaults to false.
# build_api_credentials_use_gce_metadata=
#
# Select a default option of vhost_user_vsock for launching CVD.
Copy link
Member

@ser-io ser-io Oct 21, 2025

Choose a reason for hiding this comment

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

If vhost_user_vsock is part of the canonical configuration sent in the create cvd request why do we need this as part of the HO configuration as well?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

What I want to achieve is enabling vhost_user_vsock option for any HO in docker instance launched by CO. If vhost_user_vsock is disabled, we cannot launch CF instances across multiple docker instances. It's enabled on arm64, but it's disabled on x86_64.

When HO receives POST /cvds API request, it may or may not contain canonical configuration as input. If so, it calls cvd load to launch CF with given canonical configuration. Or, it calls cvd create to launch CF based on option flags. As cvdr create deals with both kinds via POST /cvds, HO in docker instance should be able to handle both approaches to achieve above one.

Copy link
Member

@ser-io ser-io Oct 22, 2025

Choose a reason for hiding this comment

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

POST /cvds without canonical config is deprecated, please do not add anything new to this path.

Having said that, the source of truth for cuttlefish creation in HO is the canonical config received in the request, this ensure reproducibility, I can copy/paste the config received by the HO and create the same device in my desktop using cvd create directly, this something I do on a regular basis when device create fails in remote hosts. By adding this config parameter as a HO service configuration you are disrupting this behavior adding a new source of configuration towards device creation breaking the HO device creation reproducibility capability.

If you need to alter the canonical config in Docker Deployment, please do that at the Cloud Orchestrator layer, where you can intercept the request and modify it, there's no need to add another source of configurations towards creating cuttlefish devices, canonical configurations should be the only one.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I would take a look whether intercepting and modifying HTTP request from https://github.com/google/cloud-android-orchestration/blob/main/pkg/app/instances/hostclient.go by CO is applicable or not. If it's applicable, I think CO with DockerIM can adjust canonical config by itself to add vhost_user_vsock as true.

However, I still think I need to support enabling vhost_user_vsock via HO for POST /cvds without canonical config too, though it's deprecated. I'm understanding one of main flows at cvdr is cvdr create with --build_id or build_target options, but it still doesn't use canonical config at HO. Also, I'm not even sure whether canonical config supports build ID/target, which may require help from cvd fetch. I agree with deprecating all flows without canonical config from HO or cvdr, but I think enabling vhost_user_vsock should be orthogonal from the conversion task, not a blocker. HDYT? @ser-io

Copy link
Member

@ser-io ser-io Oct 23, 2025

Choose a reason for hiding this comment

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

You need to make relevant changes to cvdr having commands like cvdr create --build_id --build_target using canonical config behind scenes, this is something I've been trying to do but don't have the time.

google/cloud-android-orchestration#374 is a reference of migrating to canonical config when using local artifacts.

@0405ysj 0405ysj requested a review from ser-io October 22, 2025 01:47
Copy link
Member

@ser-io ser-io left a comment

Choose a reason for hiding this comment

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

@0405ysj 0405ysj requested a review from ser-io October 23, 2025 04:20
Copy link
Member

@ser-io ser-io left a comment

Choose a reason for hiding this comment

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

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.

3 participants