Hi!
I am running pixiecore in api mode, along with waitron as the api server.
Starting with pixiecore v2, I get this:
pixiecore_1 | panic: runtime error: invalid memory address or nil pointer dereference
pixiecore_1 | [signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x7f2aaf7629cf]
pixiecore_1 | goroutine 38 [running]:
pixiecore_1 | panic(0x7f2aaff83ec0, 0xc420014050)
pixiecore_1 | /usr/lib/go/src/runtime/panic.go:500 +0x1a5
pixiecore_1 | go.universe.tf/netboot/pixiecore.(*apibooter).BootSpec(0xc420042500, 0xc420152c38, 0x6, 0x5a4, 0x0, 0x0, 0x0, 0x0)
pixiecore_1 | /tmp/go/src/go.universe.tf/netboot/pixiecore/booters.go:157 +0xcf
pixiecore_1 | go.universe.tf/netboot/pixiecore.(*Server).serveDHCP(0xc4200780e0, 0xc420015a00, 0x0, 0x0)
pixiecore_1 | /tmp/go/src/go.universe.tf/netboot/pixiecore/dhcp.go:45 +0x3a1
pixiecore_1 | go.universe.tf/netboot/pixiecore.(*Server).Serve.func1(0xc4200780e0, 0xc420015a00)
pixiecore_1 | /tmp/go/src/go.universe.tf/netboot/pixiecore/pixiecore.go:217 +0x37
pixiecore_1 | created by go.universe.tf/netboot/pixiecore.(*Server).Serve
pixiecore_1 | /tmp/go/src/go.universe.tf/netboot/pixiecore/pixiecore.go:217 +0x6fc
whenever a box fires up its PXE firware and tries to obtain the boot files, when the box in question is not in build mode.
This event prompts pixiecore to query waitron about the mac address of the box requesting boot (simulated here with curl):
curl -v http://localhost:9090/v1/boot/70:10:9f:42:de:ad
* About to connect() to localhost port 9090 (#0)
* Trying ::1...
* Connected to localhost (::1) port 9090 (#0)
> GET /v1/boot/70:10:6f:43:d3:08 HTTP/1.1
> User-Agent: curl/7.29.0
> Host: localhost:9090
> Accept: */*
>
< HTTP/1.1 404 Not Found
< Content-Type: text/plain; charset=utf-8
< X-Content-Type-Options: nosniff
< Date: Fri, 02 Sep 2016 10:33:27 GMT
< Content-Length: 18
<
Not in build mode
* Connection #0 to host localhost left intact
According to pixiecore's API specification:
Any non-200 response from the server will cause Pixieboot to ignore the requesting machine.
And yet, pixicore dies as shown in the previous dump.
Please note that when the box is in "build mode", pixiecore works as expected.
Here's the relevant section of the docker-compose.yml
.
pixiecore:
image: danderson/pixiecore
volumes:
- ./pixiecore:/image
command:
- api
- http://localhost:9090
- --debug
- --log-timestamps
- --dhcp-no-bind
- --port
- "80"
network_mode: host
privileged: true
restart: always
I work around this issue for now by setting restart: always
, so pixiecore gets resucitated when it dies.
Also, kudos to the --dhcp-no-bind
option, that allows running pixiecore alongside the dhcp server, yay!
N.B.: I'll probably transition from waitron to coreos' bootcfg soon.
If I manage to fix it, I'll do you a PR.
Cheers, and thanks again for pixiecore!