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 bug errors with Resource Pools #654

Open
michaelbhughes opened this issue Apr 23, 2024 · 2 comments
Open

Provider bug errors with Resource Pools #654

michaelbhughes opened this issue Apr 23, 2024 · 2 comments

Comments

@michaelbhughes
Copy link

Summary

We are on the Apstra provider version v0.53.2 and are running into weird provider errors when working with resource pools. The desired changes always get implemented correctly within Apstra, but at the end of the apply we get a provider error. See the Error Examples below for what error we are seeing. In both examples, we were creating a fresh blueprint and its resources from scratch.

Running another plan/apply refreshes the state and does not encounter the error again.

These errors aren't blocking us, but we would like to flag them so you are aware of them. Perhaps you'll be able to figure out what is triggering the errors.

Error Examples

│ Error: Provider produced inconsistent result after apply
│ 
│ When applying changes to
│ apstra_asn_pool.asn_pools["tf_kmlpbcnu_pod_03_ip_fabric_global_asn"],
│ provider "provider[\"registry.terraform.io/juniper/apstra\"]" produced an
│ unexpected new value: .ranges: planned set element
│ cty.ObjectVal(map[string]cty.Value{"first":cty.NumberIntVal(4.200000005e+09),
│ "last":cty.NumberIntVal(4.200000005e+09),
│ "status":cty.UnknownVal(cty.String), "total":cty.UnknownVal(cty.Number),
│ "used":cty.UnknownVal(cty.Number),
│ "used_percentage":cty.UnknownVal(cty.Number)}) does not correlate with any
│ element in actual.
│ 
│ This is a bug in the provider, which should be reported in the provider's
│ own issue tracker.
│ Error: Provider produced inconsistent result after apply
│ 
│ When applying changes to
│ apstra_ipv6_pool.ipv6_pools["tf_fabric_external_ipv6_kmlpbcnu_pod_03"],
│ provider "provider[\"registry.terraform.io/juniper/apstra\"]" produced an
│ unexpected new value: .subnets: planned set element
│ cty.ObjectVal(map[string]cty.Value{"network":cty.StringVal("2001:568:FFE2:4e6:0:0:0:0/64"),
│ "status":cty.UnknownVal(cty.String), "total":cty.UnknownVal(cty.Number),
│ "used":cty.UnknownVal(cty.Number),
│ "used_percentage":cty.UnknownVal(cty.Number)}) does not correlate with any
│ element in actual.
│ 
│ This is a bug in the provider, which should be reported in the provider's
│ own issue tracker.
@chrismarget-j
Copy link
Collaborator

Thanks @michaelbhughes,

I have an idea about what's going on here: We're setting the values and then reading everything back from the API to collect usage stats, etc...

When Apstra is particularly busy (hard to duplicate in testing) our read may be executed before everything is "settled" in Apstra's database.

We've worked around this kind of issue in other resources, but didn't realize it might crop up in this one.

As you've noticed, it is safe to proceed when this error pops up.

@chrismarget-j
Copy link
Collaborator

AOS-46273

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants