ivoronin / packer-plugin-sshkey

Packer plugin used to generate SSH keys.
18 stars 10 forks source link

error in the new version (two hours ago) #21

Closed fga352 closed 2 years ago

fga352 commented 2 years ago

2022/11/11 14:01:27 /root/.config/packer/plugins/github.com/ivoronin/sshkey/packer-plugin-sshkey_v1.0.7_x5.0_linux_amd64: plugin process exited panic: ConfigSpec failed: gob: type cty.Type has no exported fields [recovered] panic: ConfigSpec failed: gob: type cty.Type has no exported fields goroutine 1 [running]: log.Panic({0xc000d447b8, 0xc000d447f8, 0xc000d44828}) /opt/hostedtoolcache/go/1.17.11/x64/src/log/log.go:354 +0x65 github.com/hashicorp/packer/packer.(cmdDatasource).checkExit(0x90, {0x450f860, 0xc0008f61d0}, 0x0) /home/runner/work/packer/packer/packer/cmd_datasource.go:56 +0x7f github.com/hashicorp/packer/packer.(cmdDatasource).ConfigSpec.func1() /home/runner/work/packer/packer/packer/cmd_datasource.go:19 +0x39 panic({0x450f860, 0xc0008f61d0}) /opt/hostedtoolcache/go/1.17.11/x64/src/runtime/panic.go:1038 +0x215 github.com/hashicorp/packer-plugin-sdk/rpc.(commonClient).ConfigSpec(0xc000640000) /home/runner/go/pkg/mod/github.com/hashicorp/packer-plugin-sdk@v0.3.0/rpc/common.go:44 +0x297 github.com/hashicorp/packer/packer.(cmdDatasource).ConfigSpec(0x0) /home/runner/work/packer/packer/packer/cmd_datasource.go:22 +0x65 github.com/hashicorp/packer/hcl2template.decodeHCL2Spec({0x5e772e0, 0xc00107cb00}, 0xc00062a060, {0x7f6a5fbdf120, 0xc00062a060}) /home/runner/work/packer/packer/hcl2template/decode.go:17 +0x39 github.com/hashicorp/packer/hcl2template.(PackerConfig).startDatasource(0xc000135040, {0x7f6a5f9524e8, 0xc000861ce0}, {{0xc00108c280, 0x57e36a}, {0xc00108c297, 0xc00021a280}}, 0x50) /home/runner/work/packer/packer/hcl2template/types.datasource.go:108 +0x44f github.com/hashicorp/packer/hcl2template.(PackerConfig).evaluateDatasources(0xc000135040, 0x0) /home/runner/work/packer/packer/hcl2template/types.packer_config.go:348 +0x65b github.com/hashicorp/packer/hcl2template.(PackerConfig).Initialize(0xc000135040, {0x40}) /home/runner/work/packer/packer/hcl2template/parser.go:317 +0x239 github.com/hashicorp/packer/command.(BuildCommand).RunContext(0xc000cf0840, {0x5e76860, 0xc000d80800}, 0xc00057a240) /home/runner/work/packer/packer/command/build.go:153 +0x82 github.com/hashicorp/packer/command.(BuildCommand).Run(0xc000cf0840, {0xc00006e260, 0x4, 0x4}) /home/runner/work/packer/packer/command/build.go:40 +0xc5 github.com/mitchellh/cli.(CLI).Run(0xc0004363c0) /home/runner/go/pkg/mod/github.com/mitchellh/cli@v1.1.2/cli.go:262 +0x5f8 main.wrappedMain() /home/runner/work/packer/packer/main.go:262 +0xb28 main.realMain() /home/runner/work/packer/packer/main.go:49 +0xf3 main.main() /home/runner/work/packer/packer/main.go:35 +0x19

fga352 commented 2 years ago

this problem occurs in almalinux 8.5

ivoronin commented 2 years ago

Investigating. I temporarily removed the latest release.

fga352 commented 2 years ago

Hi, I have a new problem:

Failed getting the "github.com/ivoronin/sshkey" plugin: 1 error occurred:

it wants to try download the 1.0.7 but the last version is 1.0.3...

thanks for your help!

shuimqcn commented 2 years ago

I also have this issue. I check the release page, the latest version is v1.0.3. But the error is 1.0.7, so I specific "= v1.0.3" instead of ">= v1.0.3", the problem resolved.

So, May be some version configuration was mis-update.

shuimqcn commented 2 years ago
required_plugins {
    sshkey = {
      version = "= v1.0.3"
      source = "github.com/ivoronin/sshkey"
    }
ivoronin commented 2 years ago

https://github.com/zclconf/go-cty/issues/134