-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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 produced inconsistent result after apply" creating multiple ec2 spot requests #12679
Comments
Maybe this is related to #12671? |
@ewbankkit I am no expert, but I suspect it is not. @realflash Have you run this before without issues? Is this a new problem? I think that would be an important data point. I wonder if it is just because so many spot instance requests are created too quickly. Perhaps if The log seems to indicate that the read immediately after the creation returns |
What I was doing at the time was trying to get at the troublesome attribute for #12680 I was seeing the behaviour described in there (that the instance deployed was not in the requested region), and I thought there might be some kind of load balancing going on whereby AWS was creating the spot instance in the least loaded zone. So I thought I would create ten to see how many would end up in the requested zone. In the end, none did. This was the output from my first run of ten. My second run of ten, all of them completed and I did not get this error. So it is certainly not occurring every time. I then did many more similar runs, knocking attributes out of my resource definition as I went to find the one causing the problem. I dropped down to five instances and then three as I became more confident that it was an attribute problem and not some kind of load balancing. Then on roughly run 7 (number of instances 3), the error occurred again. Run 8 went fine. Given an occurrence rate of under 1 in 10, I'd say your theory is reasonable. Given a count of only three servers was enough to produce it, it seems likely to be a problem others will hit. |
… consistency Reference: #12679 Reference: #16796 Output from acceptance testing in AWS Commercial: ``` --- PASS: TestAccAWSSpotInstanceRequest_basic (65.29s) --- PASS: TestAccAWSSpotInstanceRequest_vpc (75.75s) --- PASS: TestAccAWSSpotInstanceRequest_InterruptStop (96.45s) --- PASS: TestAccAWSSpotInstanceRequest_withBlockDuration (97.68s) --- PASS: TestAccAWSSpotInstanceRequest_withLaunchGroup (108.30s) --- PASS: TestAccAWSSpotInstanceRequest_SubnetAndSGAndPublicIpAddress (119.75s) --- PASS: TestAccAWSSpotInstanceRequest_InterruptHibernate (125.90s) --- PASS: TestAccAWSSpotInstanceRequest_NetworkInterfaceAttributes (140.51s) --- PASS: TestAccAWSSpotInstanceRequest_tags (165.36s) --- PASS: TestAccAWSSpotInstanceRequest_getPasswordData (187.44s) --- PASS: TestAccAWSSpotInstanceRequest_disappears (320.26s) --- PASS: TestAccAWSSpotInstanceRequest_withoutSpotPrice (328.46s) --- PASS: TestAccAWSSpotInstanceRequest_validUntil (338.82s) ``` Output from acceptance testing in AWS GovCloud (US): ``` --- PASS: TestAccAWSSpotInstanceRequest_withoutSpotPrice (66.13s) --- PASS: TestAccAWSSpotInstanceRequest_basic (66.24s) --- PASS: TestAccAWSSpotInstanceRequest_withBlockDuration (66.32s) --- PASS: TestAccAWSSpotInstanceRequest_InterruptHibernate (74.19s) --- PASS: TestAccAWSSpotInstanceRequest_vpc (95.40s) --- PASS: TestAccAWSSpotInstanceRequest_withLaunchGroup (107.94s) --- PASS: TestAccAWSSpotInstanceRequest_validUntil (107.98s) --- PASS: TestAccAWSSpotInstanceRequest_InterruptStop (127.16s) --- PASS: TestAccAWSSpotInstanceRequest_tags (155.38s) --- PASS: TestAccAWSSpotInstanceRequest_SubnetAndSGAndPublicIpAddress (160.34s) --- PASS: TestAccAWSSpotInstanceRequest_NetworkInterfaceAttributes (161.00s) --- PASS: TestAccAWSSpotInstanceRequest_getPasswordData (209.51s) --- PASS: TestAccAWSSpotInstanceRequest_disappears (332.58s) ```
… consistency (#18473) * resource/aws_spot_instance_request: Handle read-after-create eventual consistency Reference: #12679 Reference: #16796 Output from acceptance testing in AWS Commercial: ``` --- PASS: TestAccAWSSpotInstanceRequest_basic (65.29s) --- PASS: TestAccAWSSpotInstanceRequest_vpc (75.75s) --- PASS: TestAccAWSSpotInstanceRequest_InterruptStop (96.45s) --- PASS: TestAccAWSSpotInstanceRequest_withBlockDuration (97.68s) --- PASS: TestAccAWSSpotInstanceRequest_withLaunchGroup (108.30s) --- PASS: TestAccAWSSpotInstanceRequest_SubnetAndSGAndPublicIpAddress (119.75s) --- PASS: TestAccAWSSpotInstanceRequest_InterruptHibernate (125.90s) --- PASS: TestAccAWSSpotInstanceRequest_NetworkInterfaceAttributes (140.51s) --- PASS: TestAccAWSSpotInstanceRequest_tags (165.36s) --- PASS: TestAccAWSSpotInstanceRequest_getPasswordData (187.44s) --- PASS: TestAccAWSSpotInstanceRequest_disappears (320.26s) --- PASS: TestAccAWSSpotInstanceRequest_withoutSpotPrice (328.46s) --- PASS: TestAccAWSSpotInstanceRequest_validUntil (338.82s) ``` Output from acceptance testing in AWS GovCloud (US): ``` --- PASS: TestAccAWSSpotInstanceRequest_withoutSpotPrice (66.13s) --- PASS: TestAccAWSSpotInstanceRequest_basic (66.24s) --- PASS: TestAccAWSSpotInstanceRequest_withBlockDuration (66.32s) --- PASS: TestAccAWSSpotInstanceRequest_InterruptHibernate (74.19s) --- PASS: TestAccAWSSpotInstanceRequest_vpc (95.40s) --- PASS: TestAccAWSSpotInstanceRequest_withLaunchGroup (107.94s) --- PASS: TestAccAWSSpotInstanceRequest_validUntil (107.98s) --- PASS: TestAccAWSSpotInstanceRequest_InterruptStop (127.16s) --- PASS: TestAccAWSSpotInstanceRequest_tags (155.38s) --- PASS: TestAccAWSSpotInstanceRequest_SubnetAndSGAndPublicIpAddress (160.34s) --- PASS: TestAccAWSSpotInstanceRequest_NetworkInterfaceAttributes (161.00s) --- PASS: TestAccAWSSpotInstanceRequest_getPasswordData (209.51s) --- PASS: TestAccAWSSpotInstanceRequest_disappears (332.58s) ``` * Update CHANGELOG for #18473
This has been released in version 3.35.0 of the Terraform AWS provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template for triage. Thanks! |
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 feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks! |
Community Note
Terraform Version
Terraform v0.12.24
Affected Resource(s)
aws_spot_instance_request
Terraform Configuration Files
Debug Output
https://gist.githubusercontent.com/realflash/6d08ea50718075263a7d99b4c424dfd2/raw/49400c590bde68aaf6f35fb28c3a315a80497673/az.log
Expected Behaviour
10 spot requests created without error.
Actual Behaviour
10 spot requests created with errors implying only 5 were created. Incorrect state; subsequent plans indicate terraform want to create the 5 that errored previously.
Steps to Reproduce
terraform apply
The text was updated successfully, but these errors were encountered: