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

Index out of bounds when building vsphere images #98

Closed
Gnonthgol opened this issue Aug 9, 2021 · 2 comments · Fixed by #159
Closed

Index out of bounds when building vsphere images #98

Gnonthgol opened this issue Aug 9, 2021 · 2 comments · Fixed by #159

Comments

@Gnonthgol
Copy link

Works fine in packer 1.7.2, fails in 1.7.4. Problem have been identified in this line.

Changing the string to either double quotes or to remove the escaped slashes fixes the problem:

re := regexp.MustCompile(`\[(.*?)\]`)
@tierpod
Copy link

tierpod commented Sep 17, 2021

Looks like I faced the same problem

packer-post-processor-vsphere-template plugin: 
packer-post-processor-vsphere-template plugin: goroutine 31 [running]:
packer-post-processor-vsphere-template plugin: github.com/hashicorp/packer-plugin-vsphere/post-processor/vsphere-template.datastorePath(0xc000bf0ac0)
packer-post-processor-vsphere-template plugin:      /home/circleci/go/pkg/mod/github.com/hashicorp/packer-plugin-vsphere@v1.0.1/post-processor/vsphere-template/step_mark_as_template.go:133 +0x437
packer-post-processor-vsphere-template plugin: github.com/hashicorp/packer-plugin-vsphere/post-processor/vsphere-template.(*stepMarkAsTemplate).Run(0xc000d46c00, {0x5229702, 0x28}, {0x59ac1c8, 0xc0003e77a0})
packer-post-processor-vsphere-template plugin:      /home/circleci/go/pkg/mod/github.com/hashicorp/packer-plugin-vsphere@v1.0.1/post-processor/vsphere-template/step_mark_as_template.go:69 +0x3a5

The change was made in this commit eb17fbb#diff-90daccde26d091676affc4a2d9fb7904e389a9c8f0989c31e8d1951a20034db6

@Gnonthgol
Copy link
Author

Problem still persists in packer 1.7.8

cosandr added a commit to cosandr/packer-plugin-vsphere that referenced this issue Jan 21, 2022
nywilken pushed a commit that referenced this issue Jan 21, 2022
@bodgit bodgit mentioned this issue Feb 23, 2022
hmalphettes pushed a commit to hmalphettes/packer-plugin-vsphere that referenced this issue May 7, 2022
powertim pushed a commit to powertim/packer-plugin-vsphere that referenced this issue Nov 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants