Skip to content

Commit 6196f77

Browse files
committed
Use newer credential flags from HO
Only for `cvd fetch` since `cvd load` doesn't support the new flags yet. Bug: b/438554403
1 parent 1f63191 commit 6196f77

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

  • frontend/src/host_orchestrator/orchestrator/cvd

frontend/src/host_orchestrator/orchestrator/cvd/cvd.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ func (cli *CLI) Fetch(mainBuild AndroidBuild, targetDir string, opts FetchOpts)
124124
cmd := cli.buildCmd(CVDBin, args...)
125125

126126
if opts.Credentials.UseGCEServiceAccountCredentials {
127-
cmd.Args = append(cmd.Args, "--credential_source=gce")
127+
cmd.Args = append(cmd.Args, "--use_gce_metadata")
128128
} else if opts.Credentials.AccessTokenCredentials != (AccessTokenCredentials{}) {
129129
file, err := createCredentialsFile(opts.Credentials.AccessTokenCredentials.AccessToken)
130130
if err != nil {
@@ -135,8 +135,7 @@ func (cli *CLI) Fetch(mainBuild AndroidBuild, targetDir string, opts FetchOpts)
135135
cmd.ExtraFiles = append(cmd.ExtraFiles, file)
136136
// The actual fd number is not retained, the lowest available number is used instead.
137137
fd := 3 + len(cmd.ExtraFiles) - 1
138-
// TODO(b/401592023) Use --credential_filepath when cvd load supports it
139-
cmd.Args = append(cmd.Args, fmt.Sprintf("--credential_source=/proc/self/fd/%d", fd))
138+
cmd.Args = append(cmd.Args, fmt.Sprintf("--credential_filepath=/proc/self/fd/%d", fd))
140139
}
141140

142141
if _, err := cli.runCmd(cmd); err != nil {

0 commit comments

Comments
 (0)