我正在尝试为GCP / Kubernetes上的气流创建几个部署模板。在该部署中,我寻求将所有从属托管服务与一些必需的用户和密码一起部署。
我已经能够部署这些服务,但它抱怨了一个失踪的主持人"创建两个用户时的参数。此类型在此处记录,并且不应该抱怨,因为主机列为可选:
https://cloud.google.com/sql/docs/mysql/admin-api/v1beta4/users/insert
所以我试图删除部署,但它永远不会让我完成它并且它阻止它现在可能永远不会删除的两个资源。这就是我在控制台中得到的结果:
$ gcloud deployment-manager deployments delete airflow-on-k8s
The following deployments will be deleted:
- airflow-on-k8s
Do you want to continue (y/N)? y
Waiting for delete [operation-1502140582303-556305bcf9519-0af00aa8-d01c8bf6]...failed.
ERROR: (gcloud.deployment-manager.deployments.delete) Delete operation operation-1502140582303-556305bcf9519-0af00aa8-d01c8bf6 failed.
Error in Operation [operation-1502140582303-556305bcf9519-0af00aa8-d01c8bf6]: errors:
- code: RESOURCE_ERROR
location: /deployments/airflow-on-k8s/resources/root-user
message: '{"ResourceType":"sqladmin.v1beta4.user","ResourceErrorCode":"400","ResourceErrorMessage":{"code":400,"errors":[{"domain":"global","location":"host","locationType":"parameter","message":"Required
parameter: host","reason":"required"}],"message":"Required parameter: host","statusMessage":"Bad
Request","requestPath":"https://www.googleapis.com/sql/v1beta4/projects/<...>/instances/airflow-db-instance4/users"}}'
- code: RESOURCE_ERROR
location: /deployments/airflow-on-k8s/resources/regular-airflow-user
message: '{"ResourceType":"sqladmin.v1beta4.user","ResourceErrorCode":"400","ResourceErrorMessage":{"code":400,"errors":[{"domain":"global","location":"host","locationType":"parameter","message":"Required
parameter: host","reason":"required"}],"message":"Required parameter: host","statusMessage":"Bad
Request","requestPath":"https://www.googleapis.com/sql/v1beta4/projects/<...>/instances/airflow-db-instance4/users"}}'
可能是API中的错误,但如果有人知道某种方式,请告诉我。另外我听说有些googlers在stackoverflow上闲逛,可能会将此转发给API开发人员。
答案 0 :(得分:6)
我在删除部署时遇到了类似的问题。我最终手动删除了资源,并放弃了部署:
gcloud deployment-manager deployments delete <deployment name> --delete-policy=ABANDON
顺便说一下,我还没有看到有关此问题的报道:https://issuetracker.google.com/issues?q=sqladmin.v1beta4.user%20%22Required%20parameter:%20host%22。