I'm trying to create a couple of deployment templates for airflow on GCP / Kubernetes. In that deployment, I seek to deploy all dependent managed services together with some required users and passwords.
I've been able to deploy the services, but it complained about a missing "host" parameter when creating two user. This type is documented here and shouldn't really complain, because host is listed as optional:
https://cloud.google.com/sql/docs/mysql/admin-api/v1beta4/users/insert
So I attempted to delete the deployment, but it's never letting me finish that and it's blocking on the two resources that it can probably never delete now. This is what I get in the console:
$ 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"}}'
Probably a bug in the API, but if anyone knows of a way, let me know. Also I heard some googlers hang out on stackoverflow and could potentially forward this to the API developers.
I had a similar problem deleting my deployment. I ended up deleting the resources by hand, and just abandoned the deployment:
gcloud deployment-manager deployments delete <deployment name> --delete-policy=ABANDON
I haven't seen any bugs reported around this, by the way: https://issuetracker.google.com/issues?q=sqladmin.v1beta4.user%20%22Required%20parameter:%20host%22 .
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With