Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

provider/aws: Fix ES Domain acceptance tests #13160

Merged
merged 1 commit into from
Mar 29, 2017
Merged

Conversation

radeksimko
Copy link
Member

Why are tests failing?

See context in #13157 (comment)

Here is a snippet from a debug log before 23rd March:

---[ REQUEST POST-SIGN ]-----------------------------
POST /2015-01-01/es/domain HTTP/1.1
Host: es.us-west-2.amazonaws.com
User-Agent: aws-sdk-go/1.7.9 (go1.8; linux; amd64) APN/1.0 HashiCorp/1.0 Terraform/0.9.2-dev
Content-Length: 72
Authorization: *REDACTED*
X-Amz-Date: 20170322T061231Z
Accept-Encoding: gzip

{"DomainName":"tf-test-530907444151386247","ElasticsearchVersion":"2.3"}
--
2017/03/22 06:12:32 [DEBUG] [aws-sdk-go] DEBUG: Response es/CreateElasticsearchDomain Details:
---[ RESPONSE ]--------------------------------------
HTTP/1.1 200 OK
Content-Length: 734
Content-Type: application/json
Date: Wed, 22 Mar 2017 06:12:32 GMT
X-Amzn-Requestid: *REDACTED*

{"DomainStatus":{"ARN":"arn:aws:es:us-west-2:*REDACTED*:domain/tf-test-530907444151386247","AccessPolicies":"","AdvancedOptions":{"rest.action.multi.allow_explicit_index":"true"},"Created":true,"Deleted":false,"DomainId":"*REDACTED*/tf-test-530907444151386247","DomainName":"tf-test-530907444151386247","EBSOptions":{"EBSEnabled":false,"EncryptionEnabled":null,"Iops":null,"VolumeSize":null,"VolumeType":null},"ElasticsearchClusterConfig":{"DedicatedMasterCount":null,"DedicatedMasterEnabled":false,"DedicatedMasterType":null,"InstanceCount":1,"InstanceType":"m3.medium.elasticsearch","ZoneAwarenessEnabled":false},"ElasticsearchVersion":"2.3","Endpoint":null,"Processing":true,"SnapshotOptions":{"AutomatedSnapshotStartHour":0}}}
-----------------------------------------------------

and snippet from this morning:

2017/03/29 06:14:14 [DEBUG] [aws-sdk-go] DEBUG: Request es/CreateElasticsearchDomain Details:
---[ REQUEST POST-SIGN ]-----------------------------
POST /2015-01-01/es/domain HTTP/1.1
Host: es.us-west-2.amazonaws.com
User-Agent: aws-sdk-go/1.7.9 (go1.8; linux; amd64) APN/1.0 HashiCorp/1.0 Terraform/0.9.3-dev
Content-Length: 73
Authorization: *REDACTED*
X-Amz-Date: 20170329T061414Z
Accept-Encoding: gzip

{"DomainName":"tf-test-4999745254680115254","ElasticsearchVersion":"2.3"}
-----------------------------------------------------
2017/03/29 06:14:15 [DEBUG] [aws-sdk-go] DEBUG: Response es/CreateElasticsearchDomain Details:
---[ RESPONSE ]--------------------------------------
HTTP/1.1 400 Bad Request
Content-Length: 69
Content-Type: application/json
Date: Wed, 29 Mar 2017 06:14:15 GMT
X-Amzn-Errortype: ValidationException
X-Amzn-Requestid: *REDACTED*

{"message":"EBS storage must be selected for m4.large.elasticsearch"}
-----------------------------------------------------

Why make volume_type Computed?

Volume type seems to default to gp2 (general purpose SSD) on the API side if not defined but I was unable to verify from available docs this is the case for all instance types and I wanted to avoid making it Default anyway because the ebs_options block may not be defined at all or ebs_enabled may be false in which case this should be empty.

Test plan

make testacc TEST=./builtin/providers/aws TESTARGS='-run=TestAccAWSElasticSearchDomain'
=== RUN   TestAccAWSElasticSearchDomainPolicy_basic
--- PASS: TestAccAWSElasticSearchDomainPolicy_basic (3527.08s)
=== RUN   TestAccAWSElasticSearchDomain_basic
--- PASS: TestAccAWSElasticSearchDomain_basic (1384.46s)
=== RUN   TestAccAWSElasticSearchDomain_importBasic
--- PASS: TestAccAWSElasticSearchDomain_importBasic (1373.07s)
=== RUN   TestAccAWSElasticSearchDomain_v23
--- PASS: TestAccAWSElasticSearchDomain_v23 (1509.51s)
=== RUN   TestAccAWSElasticSearchDomain_tags
--- PASS: TestAccAWSElasticSearchDomain_tags (1408.22s)

@radeksimko radeksimko merged commit 75979af into master Mar 29, 2017
@radeksimko radeksimko deleted the b-aws-es-acc-tests-fix branch March 29, 2017 17:07
@ghost
Copy link

ghost commented Apr 14, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@ghost ghost locked and limited conversation to collaborators Apr 14, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants