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

Import of large schema fails with unexpected end of JSON input (DCNE-301) #338

Open
juchowan opened this issue Jan 29, 2025 · 0 comments
Open
Labels
jira-sync Sync this issue to Jira

Comments

@juchowan
Copy link
Contributor

juchowan commented Jan 29, 2025

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Terraform Version

1.5.7

MSO version

  • V 4.2.3k

APIC version and APIC Platform for Site Level Resources

  • V 5.2

Affected Resource(s)

  • various resources affected

Terraform Configuration Files

import {
  to = module.ndo.mso_schema_template_anp_epg.schema_template_anp_epg["<schema>/<template>/<AP>/<EPG>"]
  id = "<id>/template/<template>/anp/<AP>/epg/<EPG>"
}

Debug Output

2025-01-26T20:37:42.983Z [DEBUG] provider.terraform-provider-mso_v1.4.0: 2025/01/26 20:37:42 Error occured while json parsing unexpected end of JSON input
2025-01-26T20:37:42.984Z [TRACE] NodeAbstractResouceInstance.writeResourceInstanceState to prevRunState for module.ndo.mso_schema_template_anp_epg.schema_template_anp_epg["<schema>/<template>/<AP>/<EPG>"]
2025-01-26T20:37:42.984Z [TRACE] NodeAbstractResouceInstance.writeResourceInstanceState: writing state object for module.ndo.mso_schema_template_anp_epg.schema_template_anp_epg["<schema>/<template>/<AP>/<EPG>"]
2025-01-26T20:37:42.984Z [ERROR] vertex "module.ndo.mso_schema_template_anp_epg.schema_template_anp_epg[\"<schema>/<template>/<AP>/<EPG>\"]" error: unexpected end of JSON input
2025-01-26T20:37:42.984Z [TRACE] vertex "module.ndo.mso_schema_template_anp_epg.schema_template_anp_epg[\"<schema>/<template>/<AP>/<EPG>\"]": visit complete, with errors

2025-01-26T20:57:29.875Z [TRACE] vertex "module.ndo.mso_schema_template_anp_epg.schema_template_anp_epg (expand)": dynamic subgraph encountered errors: unexpected end of JSON input
2025-01-26T20:57:29.875Z [ERROR] vertex "module.ndo.mso_schema_template_anp_epg.schema_template_anp_epg (expand)" error: unexpected end of JSON input
2025-01-26T20:57:29.875Z [TRACE] vertex "module.ndo.mso_schema_template_anp_epg.schema_template_anp_epg (expand)": visit complete, with errors

All resources that didn't complete import/read prompt following errors in the console:

Error: Cannot import to non-existent resource address

Importing to resource address module.ndo.mso_schema_site_anp_epg.schema_site_anp_epg["<schema>/<template>/<AP>/<EPG>/<site>"] is not possible, because that address does
not exist in configuration. Please ensure that the resource key is correct, or remove this import block.

Panic Output

Expected Behavior

We suspect a bottleneck in a network as we see some packets retransmitted or out of order.
If corrupted JSON or incomplete JSON is received due to any kind of packet drop or bottleneck, it should retry the operation and continue, and prompt more meaningful error than Cannot import to non-existent resource address

Actual Behavior

Single resource failing will kill entire execution instead of retrying

Steps to Reproduce

  1. terraform apply

Important Factoids

References

  • #0000
@akinross akinross added the jira-sync Sync this issue to Jira label Jan 29, 2025
@github-actions github-actions bot changed the title Import of large schema fails with unexpected end of JSON input Import of large schema fails with unexpected end of JSON input (DCNE-301) Jan 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
jira-sync Sync this issue to Jira
Projects
None yet
Development

No branches or pull requests

2 participants