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

Crash when lauching packer build only with 0.7.2 #140

Closed
jothoma1 opened this issue Jun 11, 2024 · 4 comments · Fixed by #141
Closed

Crash when lauching packer build only with 0.7.2 #140

jothoma1 opened this issue Jun 11, 2024 · 4 comments · Fixed by #141

Comments

@jothoma1
Copy link

Hello
i'm trying to use packer with XCP-NG (already use it with VMware)
When i try a simple packer build i have a crash :
panic: ConfigSpec failed: gob: type cty.Type has no exported fields [recovered] panic: ConfigSpec failed: gob: type cty.Type has no exported fields

I have tried on a Windows machine with packer 1.8.4 and on linux with the latest packer release and it's the same
Don't know where to start, anyone can help ?
thanks

@mtcoffee
Copy link

@jothoma1 after you pointed out in mtcoffee/xcp-ng-packer-examples#1 that it still happens in the latest release, I looked further. The issue is related to the v0.7.2 release dropped yesterday. It looks like @ddelnano and team have been working to improve!

In my case I noticed if the packer file is set to use version = "= v0.7.1" the error is not thrown.

@jothoma1
Copy link
Author

Thanks @mtcoffee you are right the problem is only present with 0.7.2 it works with 0.7.1

@jothoma1 jothoma1 changed the title Crash when lauching packer build Crash when lauching packer build only with 0.7.2 Jun 12, 2024
@ceejatec
Copy link

This is caused by hashicorp/packer-plugin-sdk#187 . The story is complicated, it seems, but the workaround/fix until the Packer team can sort themselves out is for @ddelnano to run packer-sdc fix . in the source directory - this adds a line

replace github.com/zclconf/go-cty => github.com/nywilken/go-cty v1.13.3 // added by packer-sdc fix as noted in github.com/hashicorp/packer-plugin-sdk/issues/187

to go.mod. I've rebuilt packer-builder-xenserver locally with that change and copied it to ~/.config/packer/plugins/github.com/ddelnano/xenserver/packer-plugin-xenserver_v0.7.2_x5.0_linux_amd64, and things are working again.

@ddelnano
Copy link
Owner

Thanks for reporting this, pointing out the upstream issue and identifying the short term solution! #141 addresses this and I'll create a 7.3 release once that is merged.

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

Successfully merging a pull request may close this issue.

4 participants