gcloud.app.deploy 错误响应:[13] 无法创建云构建:无效存储桶

问题描述 投票:0回答:1

突然间,几天前

gcloud app deploy
,一个 Go 应用完全崩溃了。

重现步骤:

  1. 任何 gmail 帐户注册 Google Cloud Platform,并在那里创建一个计费帐户(有免费试用)。
  2. 安装 Google Cloud CLI(包括测试版)并执行
    gcloud init
    /
    gcloud auth login <your_gmail>
  3. 创建一个新项目:
    gcloud projects create xxx-yyy
  4. 为其启用计费:
    gcloud beta billing projects link xxx-yyy --billing-account XXX-YYY-XXX
  5. 为此项目创建 App Engine:
    gcloud app create --project xxx-yyy
  6. 部署应用程序:
    gcloud app deploy --appyaml myapp.yaml --project xxx-yyy
  7. 您很快就会(成功上传应用程序的文件后)收到此错误:
ERROR: (gcloud.app.deploy) Error Response: [13] Failed to create cloud build: invalid bucket "205143635137.cloudbuild-logs.googleusercontent.com"; default Cloud Build service account or user-specified service account does not have access to the bucket
com.google.net.rpc3.client.RpcClientException: <eye3 title='/ArgoAdminNoCloudAudit.CreateBuild, INVALID_ARGUMENT'/> APPLICATION_ERROR;google.devtools.cloudbuild.v1/ArgoAdminNoCloudAudit.CreateBuild;invalid bucket "205143635137.cloudbuild-logs.googleusercontent.com"; default Cloud Build service account or user-specified service account does not have access to the bucket;AppErrorCode=3;StartTimeMs=1711390344614;unknown;ResFormat=uncompressed;ServerTimeSec=9.701026299;LogBytes=256;Non-FailFast;EndUserCredsRequested;EffSecLevel=none;ReqFormat=uncompressed;ReqID=a06ef84bab72e6f6;GlobalID=0;Server=[2002:a1b:7246:0:b0:32b:ca81:def]:4001.

请注意,您在第 1 步中使用哪个帐户完全无关。我使用了 4(四)个不同的帐户,其中我注册了 GCP(包括我注册了很多年的帐户以及我创建了数百个使用上述命令部署应用程序的项目),并且错误始终完全相同。当然只是存储桶地址中的项目编号不同。

另请注意,3 月 22 日(即 3 天前)一切仍然运行良好 — 那天我成功部署了几个项目和应用程序。

另请注意,只有 3 月 22 日之后创建的新项目才会受到影响。对于年纪较大的人来说

gcloud app deploy
仍然可以完美地工作。

我发现较新的项目在 IAM 中获得了不同的默认权限集,因此 Google 肯定在 3 月 22 日左右更改了一些敏感内容。但我无法弄清楚是哪个项目造成了此问题 - 我尝试添加旧项目的所有权限项目必须是新的,它仍然给我同样的错误。我还尝试了我可以谷歌搜索的所有其他解决方案(例如在“云构建设置”页面上启用“App Engine Admin”并再次执行

gcloud auth login
)-没有任何帮助。

看起来 Google 要么在 3 天前破坏了他们这边的某些东西,要么在没有通知用户的情况下进行了一些不兼容的更改。通过阅读错误消息,我可以了解到构建过程无法访问某些内部存储桶来写入 Cloud Build 日志,并因此失败。但由于这个存储桶是隐藏的,我什至无法检查它的权限。我认为它应该由 Google 正确且自动地设置,这正是 Google Cloud 文档针对使用默认日志记录存储桶时的情况所说的内容(正如我所做的那样)。我迷路了。

PS。

myapp.yaml
非常微不足道,我不认为这个问题与 Go 本身有关:

runtime: go121
app_engine_apis: true

main: mydomain/mypkg

env_variables:
  VAR: value

automatic_scaling:
  max_concurrent_requests: 80
  target_cpu_utilization: 0.6

handlers:
  - url: /.*
    script: auto
    secure: always

PPS。已经有一个类似的问题,但我创建了一个新问题,因为我有更多细节要分享。

google-app-engine
1个回答
© www.soinside.com 2019 - 2024. All rights reserved.