Closed axisofentropy closed 5 years ago
Ok I noticed I hadn't actually built the Go stuff. I've tried Go versions 1.6, 1.10, and 1.12. All of them failed with different errors. What version of Go should I use to build this?
Most recent output with Go 1.12.4:
github.com/Smithx10/nomad-driver-triton/plugin
_/root/nomad-driver-triton
# _/root/nomad-driver-triton
./main.go:10:15: cannot use factory (type func("github.com/hashicorp/go-hclog".Logger) interface {}) as type plugins.PluginFactory in argument to plugins.Serve
./main.go:15:25: cannot use log (type "github.com/hashicorp/go-hclog".Logger) as type "github.com/Smithx10/nomad-driver-triton/vendor/github.com/hashicorp/go-hclog".Logger in argument to plugin.NewDriver:
"github.com/hashicorp/go-hclog".Logger does not implement "github.com/Smithx10/nomad-driver-triton/vendor/github.com/hashicorp/go-hclog".Logger (wrong type for Named method)
have Named(string) "github.com/hashicorp/go-hclog".Logger
want Named(string) "github.com/Smithx10/nomad-driver-triton/vendor/github.com/hashicorp/go-hclog".Logger
Sorry about the bad documentation.
Can you try the following
go get -v github.com/Smithx10/nomad-driver-triton
cd ~/go/src/github.com/Smithx10/nomad-driver-triton/
go build -v
That built for me on a fresh machine.
This worked when I built from within $GOPATH. I'll try that next time! Thanks!
alrite! I got nomad
running with the plugin. The example deployment fails and I don't see any instances created within Triton. How should I troubleshoot that?
@axisofentropy I believe you'd want to use the following commands to debug what nomad see's and the reason for the nomad allocation failures.
I'd use the following commands:
arch@archlinux ~/g/s/g/h/n/command ❯❯❯ nomad status ✘ 130 master ✭ ◼
ID Type Priority Status Submit Date
consul service 50 running 2019-04-23T19:37:28-04:00
arch@archlinux ~/g/s/g/h/n/command ❯❯❯ nomad status consul ✘ 1 master ✭ ◼
ID = consul
Name = consul
Submit Date = 2019-04-23T19:37:28-04:00
Type = service
Priority = 50
Datacenters = dc1
Status = running
Periodic = false
Parameterized = false
Summary
Task Group Queued Starting Running Failed Complete Lost
consul 0 2 3 0 0 0
Latest Deployment
ID = 4c76cde0
Status = running
Description = Deployment is running
Deployed
Task Group Desired Placed Healthy Unhealthy Progress Deadline
consul 5 5 0 0 2019-04-23T19:47:28-04:00
Allocations
ID Node ID Task Group Version Desired Status Created Modified
27d53347 fe6aef87 consul 0 run pending 46s ago 46s ago
348b4855 fe6aef87 consul 0 run running 46s ago 3s ago
3e1b85fd fe6aef87 consul 0 run pending 46s ago 46s ago
dee7ef30 fe6aef87 consul 0 run running 46s ago 7s ago
e2982b50 fe6aef87 consul 0 run running 46s ago 8s ago
arch@archlinux ~/g/s/g/h/n/command ❯❯❯ nomad alloc status 27d53347 master ✭ ◼
ID = 27d53347
Eval ID = 896a210e
Name = consul.consul[1]
Node ID = fe6aef87
Job ID = consul
Job Version = 0
Client Status = running
Client Description = Tasks are running
Desired Status = run
Desired Description = <none>
Created = 1m11s ago
Modified = 7s ago
Deployment ID = 4c76cde0
Deployment Health = unset
Task "consul" is "running"
Task Resources
CPU Memory Disk Addresses
100 MHz 300 MiB 300 MiB
Task Events:
Started At = 2019-04-23T23:38:32Z
Finished At = N/A
Total Restarts = 0
Last Restart = N/A
Recent Events:
Time Type Description
2019-04-23T19:38:32-04:00 Started Task started by client
2019-04-23T19:37:28-04:00 Task Setup Building Task Directory
2019-04-23T19:37:28-04:00 Received Task received by client
Ok I changed the image name and that worked! Thanks! Now I'll dig deeper into this.
I've very new to nomad, but this example failed with the message
How should I troubleshoot this?
Thanks!