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

Failing test(s): compute disk + storage pool #19199

Closed
melinath opened this issue Aug 21, 2024 · 4 comments · Fixed by GoogleCloudPlatform/magic-modules#11571, hashicorp/terraform-provider-google-beta#8119 or #19388

Comments

@melinath
Copy link
Collaborator

melinath commented Aug 21, 2024

Impacted tests

  • TestAccComputeDisk_storagePoolSpecified
  • TestAccComputeInstance_bootDisk_storagePoolSpecified

Affected Resource(s)

  • google_compute_disk

Failure rates

These were failing 100% in PRs due to quota issues. I've deleted the resources causing the quota issue, so this is temporarily resolved, but it could happen again at any time (or start failing in nightly test environments.)

Message(s)

resource_compute_disk_test.go:1655: Error creating StoragePool: googleapi: Error 400: Maximum storage pools in this zone has been reached. Please delete an existing storage pool before creating a new storage pool., badRequest

This comes from the setupTestingStoragePool function, and happens because deletion of the existing resources wasn't successful at one point. Specifically, Hyperdisk Balanced Storage Pools Advanced Iops was at 100%.

Ideally, the storage pools would be implemented as a separate Terraform resource, which would have a sweeper that would automatically clean up any trailing pools on a regular basis.

Alternatively, I think it would be possible to implement a sweeper on its own, without a resource - it just wouldn't be autogenerated. #17891 has some information about how to write sweepers.

Another mitigation would be to make the storage pools use less IOPS quota each - this would be great to do, but would not replace the need to have a sweeper - it would just make us less likely to hit the quota before the sweeper runs each night.

Nightly build test history

Example failure: GoogleCloudPlatform/magic-modules#11504 (comment)

b/361323245

@sizzle0121
Copy link

We avoid adding storage pools as a Terraform resource, since Terraform will plan to delete all the disks in a storage pool when users only want to delete the storage pool, which is risky and not we want.
Therefore, I think adding handwritten sweeper would be a better solution.

@c2thorn
Copy link
Collaborator

c2thorn commented Aug 21, 2024

Going to skip in VCR for now: GoogleCloudPlatform/magic-modules#11522

@melinath
Copy link
Collaborator Author

@c2thorn these should be passing now, since the resources were deleted - not sure we need to skip them in VCR.

Copy link

github-actions bot commented Oct 6, 2024

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 6, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.