terraform-provider-vsphere: `r/content_library_item`: `fatal error: runtime: out of memory`- when uploading multiple ISO images in parallel

Community Guidelines

  • I have read and agree to the HashiCorp Community Guidelines .
  • Vote on this issue by adding a ๐Ÿ‘ reaction to the original issue initial description to help the maintainers prioritize.
  • Do not leave โ€œ+1โ€ or other comments that do not add relevant information or questions.
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment.

Terraform

v1.1.7 on linux_amd64

Terraform Provider

v2.1.1

VMware vSphere

v7.0.3

Description

Uploading multiple ISO images in parallel with size of e.g. 5.6G to a content library fails with an out of memory exception.

Affected Resources

resource/vsphere_content_library_item

Terraform Configuration

https://gist.github.com/lapawa/2353174f8f5488f3cdf09322cfb331b9

Debug Output

No response

Panic Output

https://gist.github.com/lapawa/b9ffa0fe2fd872a9ea8c2d05008b585a

Expected Behavior

Completing apply with successfully uploaded items into the vSphere Content Library.

Actual Behavior

Content library and items were created but the content has 0 bytes and Terraform panics.

Steps to Reproduce

Create a vsphere_content_library and vsphere_content_library_item resource with an ISO image and a http url as content source.

Environment Details

No response

Screenshots

No response

References

No response

About this issue

  • Original URL
  • State: open
  • Created 5 years ago
  • Comments: 16 (12 by maintainers)

Most upvoted comments

Iโ€™ll give this a try, but Iโ€™m guessing the TF provider is attempting to read the entire OVF/OVA into memory:

...
io/ioutil.ReadAll(...)
io/ioutil/ioutil.go:27
github.com/hashicorp/terraform-provider-vsphere/vsphere/internal/helper/ovfdeploy.GetOvfDescriptor(0xc0000451c0, 0x39, 0x10000, 0x0, 0x0, 0x0, 0x0)
...

@tenthirtyam Iยดm going to try to reproduce this in our plataform. As far as I known when you use remote files, vsphere is the responsible of the remote file download into the content library. Perhaps, there is some connectivity issue on the vshpere side that makes the download fail.

Iโ€™ll keep you informed of my local testings.

Iโ€™ve uploaded the configuration and added the gist link to the issues description.