Closed melinath closed 1 month ago
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.
Going to skip in VCR for now: https://github.com/GoogleCloudPlatform/magic-modules/pull/11522
@c2thorn these should be passing now, since the resources were deleted - not sure we need to skip them in VCR.
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.
Impacted tests
Affected Resource(s)
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)
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. https://github.com/hashicorp/terraform-provider-google/issues/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: https://github.com/GoogleCloudPlatform/magic-modules/pull/11504#issuecomment-2299949158
b/361323245