Open huadongliu opened 3 years ago
@huadongliu it seems clear from your log that api complains but can't tell what was really sent to api. Can you enable debug/trace and share the debug log so we can take a closer look?
TF_LOG=trace terraform apply --var-file=dev.tfvars
https://gist.github.com/huadongliu/0cd20c90c29b66d48a1a6fbf00b4fe4a
The request looks good.
---[ REQUEST ]---------------------------------------
PATCH /v1beta/projects/feature-service-dev/locations/us-central1/services/metastore-service-dev?alt=json&updateMask=hiveMetastoreConfig HTTP/1.1
Host: metastore.googleapis.com
User-Agent: Terraform/0.15.0 (+https://www.terraform.io) Terraform-Plugin-SDK/2.5.0 terraform-provider-google-beta/dev
Content-Length: 238
Content-Type: application/json
Accept-Encoding: gzip
{
"hiveMetastoreConfig": {
"configOverrides": {
"hive.metastore.warehouse.dir": "gs://metastore-bucket-dev2/hive-warehouse"
},
"version": "2.3.6"
},
"labels": {
"gitrepo": "feature-service-metastore",
"terraform": "true"
},
"port": 9083,
"tier": "DEVELOPER"
}
-----------------------------------------------------: timestamp=2021-04-27T09:02:43.506-0700
2021-04-27T09:02:44.364-0700 [INFO] provider.terraform-provider-google-beta_v3.65.0_x5: 2021/04/27 09:02:44 [DEBUG] Google API Response Details:
---[ RESPONSE ]--------------------------------------
HTTP/2.0 400 Bad Request
Alt-Svc: h3-29=":443"; ma=2592000,h3-T051=":443"; ma=2592000,h3-Q050=":443"; ma=2592000,h3-Q046=":443"; ma=2592000,h3-Q043=":443"; ma=2592000,quic=":443"; ma=2592000; v="46,43"
Cache-Control: private
Content-Type: application/json; charset=UTF-8
Date: Tue, 27 Apr 2021 16:02:44 GMT
Server: ESF
Vary: Origin
Vary: X-Origin
Vary: Referer
X-Content-Type-Options: nosniff
X-Frame-Options: SAMEORIGIN
X-Xss-Protection: 0
{
"error": {
"code": 400,
"message": "Found 2 problems:\n\t1) Kerberos Principal () does not match ReGeX (^(?\u003cprimary\u003e.+)\\/(?\u003cinstance\u003e.+)@(?\u003crealm\u003e.+)$).\n\t2) Cloud Storage URI () does not match ReGeX (^gs://(?\u003cbucket\u003e[^/]+)(?:/(?\u003cobject\u003e.*))?$)",
"status": "INVALID_ARGUMENT"
}
}
The api returns the strange error. I can't tell anything wrong in the request. @huadongliu did you use the same account to run the update? Does the gs://metastore-bucket-dev2/hive-warehouse
exist? Same permissions given to it as the first bucket?
It didn't make a difference with or without gs://metastore-bucket-dev2/hive-warehouse being provisioned.
This is caused by a server-side bug in the update validation logic, which is being fixed.
Community Note
modular-magician
user, it is either in the process of being autogenerated, or is planned to be autogenerated soon. If an issue is assigned to a user, that user is claiming responsibility for the issue. If an issue is assigned tohashibot
, a community member has claimed the issue already.Terraform Version
$ terraform -v Terraform v0.15.0 on darwin_amd64
Affected Resource(s)
Terraform Configuration Files
Debug Output
terraform apply failed when I tried to update hive.metastore.warehouse.dir. https://gist.github.com/huadongliu/2c2093696a031005464b098441f2f9f7
Expected Behavior
hive.metastore.warehouse.dir should be updated.
Actual Behavior
terraform apply command failed with error.
Steps to Reproduce
terraform apply
References
https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/dataproc_metastore_service#config_overrides
b/302797703