Giter Site home page Giter Site logo

Comments (9)

ddelnano avatar ddelnano commented on July 17, 2024 1

Actually I closed this too soon. The documentation needs to be updated first.

from packer-plugin-xenserver.

4censord avatar 4censord commented on July 17, 2024

I have done some tests:
with a known good plugin for comparison upcloud

packer {
  required_plugins {
   xenserver= {
      version = "= v0.3.0-dev9"
      source = "github.com/ddelnano/xenserver"
    }
   upcloud = {
      version = "= v1.0.0"
      source = "github.com/UpCloudLtd/upcloud"
    }
  }
}

PACKER_LOG=1 packer init centos8-init.pkr.hcl
produces [packer-init-log.txt](https://github.com/ddelnano/packer-plugin-xenserver/files/6133370/packer-
init-log.txt)

Looking at the logs, packer ist unable to match the right plugin executable for the provided version.

2021/03/12 23:27:06 [TRACE] Ignoring remote binary packer-plugin-xenserver_v0.3.0-dev9_x5.0_linux_amd64.zip, wrong version, expected v0.3.0-dev9 

comparing to the known good, the only real difference is '-dev9'

packer-plugin-upcloud  _v1.0.0     _x5.0_linux_arm64.zip
packer-plugin-xenserver_v0.3.0-dev9_x5.0_linux_amd64.zip

Could you maybe have Github actions build the 'v0.3.0' tag for further testing?

from packer-plugin-xenserver.

4censord avatar 4censord commented on July 17, 2024

If one manually populates the plugins dir,
packer still errors with
packer validate
Error: no plugin installed for github.com/ddelnano/xenserver = v0.3.0-dev9
packer init
could not find a local nor a remote checksum for plugin "github.com/ddelnano/xenserver" "= v0.3.0-dev9"
it looks as tho it doesnt like the '-dev9' designation

from packer-plugin-xenserver.

ddelnano avatar ddelnano commented on July 17, 2024

It doesn't seem to like the v0.3.0 release I made either.

I updated the "ignoring remote binary" log message and recompiled packer to see why it's not matching the file correctly and see that the file seems to be missing the 'v' prefix

2021/03/12 17:05:11 [DEBUG] github-getter: getting "https://github.com/ddelnano/packer-plugin-xenserver/releases/download/v0.3.0/packer-plugin-xenserver_v0.3.0_SHA256SUMS"
2021/03/12 17:05:11 [TRACE] Ignoring remote binary packer-plugin-xenserver_v0.3.0_x5.0_freebsd_arm.zip, wrong version: '0.3.0' does not match expected v0.3.0
2021/03/12 17:05:11 [TRACE] Ignoring remote binary packer-plugin-xenserver_v0.3.0_x5.0_freebsd_arm64.zip, wrong version: '0.3.0' does not match expected v0.3.0
2021/03/12 17:05:11 [TRACE] Ignoring remote binary packer-plugin-xenserver_v0.3.0_x5.0_linux_arm64.zip, wrong version: '0.3.0' does not match expected v0.3.0
2021/03/12 17:05:11 [TRACE] Ignoring remote binary packer-plugin-xenserver_v0.3.0_x5.0_linux_arm.zip, wrong version: '0.3.0' does not match expected v0.3.0
2021/03/12 17:05:11 [TRACE] Ignoring remote binary packer-plugin-xenserver_v0.3.0_x5.0_linux_386.zip, wrong version: '0.3.0' does not match expected v0.3.0
2021/03/12 17:05:11 [TRACE] Ignoring remote binary packer-plugin-xenserver_v0.3.0_x5.0_darwin_amd64.zip, wrong version: '0.3.0' does not match expected v0.3.0
2021/03/12 17:05:11 [TRACE] Ignoring remote binary packer-plugin-xenserver_v0.3.0_x5.0_darwin_arm64.zip, wrong version: '0.3.0' does not match expected v0.3.0
2021/03/12 17:05:11 [TRACE] Ignoring remote binary packer-plugin-xenserver_v0.3.0_x5.0_freebsd_amd64.zip, wrong version: '0.3.0' does not match expected v0.3.0
2021/03/12 17:05:11 [TRACE] Ignoring remote binary packer-plugin-xenserver_v0.3.0_x5.0_freebsd_386.zip, wrong version: '0.3.0' does not match expected v0.3.0
2021/03/12 17:05:11 [TRACE] Ignoring remote binary packer-plugin-xenserver_v0.3.0_x5.0_windows_386.zip, wrong version: '0.3.0' does not match expected v0.3.0
2021/03/12 17:05:11 [TRACE] Ignoring remote binary packer-plugin-xenserver_v0.3.0_x5.0_windows_amd64.zip, wrong version: '0.3.0' does not match expected v0.3.0
2021/03/12 17:05:11 [TRACE] Ignoring remote binary packer-plugin-xenserver_v0.3.0_x5.0_linux_amd64.zip, wrong version: '0.3.0' does not match expected v0.3.0
could not find a local nor a remote checksum for plugin "github.com/ddelnano/xenserver" "= v0.3.0"

from packer-plugin-xenserver.

ddelnano avatar ddelnano commented on July 17, 2024

Turns out this was a packer bug 😄

hashicorp/packer#10760 fixes this issue. Any packer plugin whose name contains a "v" (such as xenserVer) will experience this problem.

from packer-plugin-xenserver.

ddelnano avatar ddelnano commented on July 17, 2024

hashicorp/packer#10760 has been merged and will be released in packer 1.7.1. Once that version is released, I will close this.

from packer-plugin-xenserver.

ddelnano avatar ddelnano commented on July 17, 2024

This now works on packer 1.7.1!

ddelnano@ddelnano-desktop:~/go/src/github.com/xenserver/packer-builder-xenserver$ cat file.pkr.hcl
packer {
  required_plugins {
   xenserver= {
      version = ">= v0.3.0"
      source = "github.com/ddelnano/xenserver"
    }
  }
}

ddelnano@ddelnano-desktop:~/go/src/github.com/xenserver/packer-builder-xenserver$ packer1.7.1 init file.pkr.hcl
Installed plugin github.com/ddelnano/xenserver v0.3.2 in "/home/ddelnano/.packer.d/plugins/github.com/ddelnano/xenserver/packer-plugin-xenserver_v0.3.2_x5.0_linux_amd64"

from packer-plugin-xenserver.

ddelnano avatar ddelnano commented on July 17, 2024

In addition to updating the documentation to use packer init, we need to migrate all the json templates to hcl. That work is being done in #7.

from packer-plugin-xenserver.

ddelnano avatar ddelnano commented on July 17, 2024

Now that #7 is complete and I've updated the documentation (6005f12), this is complete.

from packer-plugin-xenserver.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.