hashicorp / nomad-pack

Mozilla Public License 2.0
394 stars 51 forks source link

Invalid pack definition #346

Open YiGene opened 1 year ago

YiGene commented 1 year ago

first time trying to explore nomad pack. after following the instruction to install on aws ec2 linux server, when run the command and nomad-packer registry list, all registry are invalid, i am using the latest nightly released rpm file

what does this mean?

          PACK NAME             |  REF   |    METADATA VERSION     | REGISTRY |                  REGISTRY URL

------------------------------------+--------+-------------------------+----------+-------------------------------------------------- alertmanager@latest | latest | Invalid pack definition | default | not parsable - registry contains no valid packs aws_efs_csi@latest | latest | Invalid pack definition | default | not parsable - registry contains no valid packs boundary@latest | latest | Invalid pack definition | default | not parsable - registry contains no valid packs chaotic_ngine@latest | latest | Invalid pack definition | default | not parsable - registry contains no valid packs csi_openstack_cinder@latest | latest | Invalid pack definition | default | not parsable - registry contains no valid packs drone@latest | latest | Invalid pack definition | default | not parsable - registry contains no valid packs faasd@latest | latest | Invalid pack definition | default | not parsable - registry contains no valid packs fabio@latest | latest | Invalid pack definition | default | not parsable - registry contains no valid packs grafana@latest | latest | Invalid pack definition | default | not parsable - registry contains no valid packs haproxy@latest | latest | Invalid pack definition | default | not parsable - registry contains no valid packs hashicups@latest | latest | Invalid pack definition | default | not parsable - registry contains no valid packs hello_world@latest | latest | Invalid pack definition | default | not parsable - registry contains no valid packs influxdb@latest | latest | Invalid pack definition | default | not parsable - registry contains no valid packs jaeger@latest | latest | Invalid pack definition | default | not parsable - registry contains no valid packs jenkins@latest | latest | Invalid pack definition | default | not parsable - registry contains no valid packs kibana@latest | latest | Invalid pack definition | default | not parsable - registry contains no valid packs loki@latest | latest | Invalid pack definition | default | not parsable - registry contains no valid packs nextcloud@latest | latest | Invalid pack definition | default | not parsable - registry contains no valid packs nginx@latest | latest | Invalid pack definition | default | not parsable - registry contains no valid packs

jzweifel commented 1 year ago

I have a similar problem! I get a similar output as above with nomad-pack registry list, and furthermore, nomad-pack run hello_world outputs the following:

! Failed To Process Pack

        Error:   failed to load pack: failed to decode metadata.hcl: metadata.hcl:16,1-12: Unsupported block type; Blocks
of type "integration" are not expected here.
        Type:    *errors.errorString
        Context:
                 - Registry Name: default
                 - Pack Name: hello_world
                 - Pack Ref: latest
                 - Deployment Name: hello_world@latest

I didn't see precompiled binaries for the other non-nightly versions... maybe the nightlies aren't compatible with the existing packs?

edit: what I ended up doing, since I wanted to see nomad-pack work, is I went to https://github.com/hashicorp/nomad-pack-community-registry, cloned it, and removed the offending integration block in each of the metadata.hcl files of the packs I cared about. FWIW, the only pack I cared about so far was hello_world, so the fix may not be as simple for others. :)

tesuvant commented 1 year ago

Which nomad-pack version? I get the same error when I use Docker tag "nomad-pack:0.0.1-techpreview.3", but if I compile the binary from sources then it works. Nomad Pack v0.0.1-techpreview.4 (a94eb6d)

Edit. I just realized that nightly builds go to a different Docker org.

surajthakur commented 11 months ago

Same issue for me, was trying the nomad-ingress-nginx pack. unfortunately could not run using the Version: v0.0.1-techpreview.3 (3b4163b)

kunalsingthakur commented 8 months ago

i am also facing issue with this one and ended with this thread why there is problem with pack name with letter -

smoothie89 commented 5 months ago

Facing the same issue.

$ nomad-pack -v
Nomad Pack v0.0.1-techpreview.3 (3b4163b)

$ nomad-pack info --registry=default hello_world
! Failed To Load Pack From Local Directory

    Error:   failed to decode metadata.hcl: metadata.hcl:16,1-12: Unsupported block type; Blocks of type "integration" are not expected here.
    Type:    *errors.errorString
    Context: 
             - Registry Name: default
             - Pack Name: hello_world
             - Pack Ref: latest

Is this expected behaviour? I can run this after removing integration block from metadata.hcl