Closed jcesario closed 8 years ago
When there are errors running mysql-datadir-available-space it panics
[martini] Started GET /api/mysql-datadir-available-space for 192.168.57.200:48631 [martini] PANIC: runtime error: index out of range /usr/lib/golang/src/runtime/panic.go:423 (0x429d59) gopanic: reflectcall(nil, unsafe.Pointer(d.fn), deferArgs(d), uint32(d.siz), uint32(d.siz)) /usr/lib/golang/src/runtime/panic.go:12 (0x428239) panicindex: panic(indexError) /home/vagrant/go/src/github.com/outbrain/orchestrator-agent/src/github.com/outbrain/orchestrator-agent/osagent/osagent.go:319 (0x5805aa) GetMySQLDataDirAvailableDiskSpace: result, err := strconv.ParseInt(lineTokens[4], 10, 0) /home/vagrant/go/src/github.com/outbrain/orchestrator-agent/src/github.com/outbrain/orchestrator-agent/http/api.go:360 (0x5a1ad1) (*HttpAPI).GetMySQLDataDirAvailableDiskSpace: output, err := osagent.GetMySQLDataDirAvailableDiskSpace() /home/vagrant/go/src/github.com/outbrain/orchestrator-agent/src/github.com/outbrain/orchestrator-agent/http/api.go:502 (0x5a7a28) (*HttpAPI).GetMySQLDataDirAvailableDiskSpace-fm: m.Get("/api/mysql-datadir-available-space", this.GetMySQLDataDirAvailableDiskSpace) /usr/lib/golang/src/runtime/asm_amd64.s:437 (0x459d8e) call32: CALLFN(·call32, 32) /usr/lib/golang/src/reflect/value.go:432 (0x5ce3da) Value.call: call(frametype, fn, args, uint32(frametype.size), uint32(retOffset)) /usr/lib/golang/src/reflect/value.go:300 (0x5cd0a1) Value.Call: return v.call("Call", in) /home/vagrant/go/src/github.com/codegangsta/inject/inject.go:102 (0x68e7d2) (*injector).Invoke: return reflect.ValueOf(f).Call(in), nil <autogenerated>:30 (0x591aed) /home/vagrant/go/src/github.com/go-martini/martini/router.go:408 (0x58e3a7) (*routeContext).run: vals, err := r.Invoke(handler) /home/vagrant/go/src/github.com/go-martini/martini/router.go:285 (0x58d4f9) (*route).Handle: context.run() /home/vagrant/go/src/github.com/go-martini/martini/router.go:132 (0x58c0b4) (*router).Handle: bestRoute.Handle(context, res) /home/vagrant/go/src/github.com/go-martini/martini/martini.go:125 (0x58f314) (Router).Handle-fm: m.Action(r.Handle) /usr/lib/golang/src/runtime/asm_amd64.s:438 (0x459e2e) call64: CALLFN(·call64, 64) /usr/lib/golang/src/reflect/value.go:432 (0x5ce3da) Value.call: call(frametype, fn, args, uint32(frametype.size), uint32(retOffset)) /usr/lib/golang/src/reflect/value.go:300 (0x5cd0a1) Value.Call: return v.call("Call", in) /home/vagrant/go/src/github.com/codegangsta/inject/inject.go:102 (0x68e7d2) (*injector).Invoke: return reflect.ValueOf(f).Call(in), nil /home/vagrant/go/src/github.com/go-martini/martini/martini.go:179 (0x58a0ee) (*context).run: _, err := c.Invoke(c.handler()) /home/vagrant/go/src/github.com/go-martini/martini/martini.go:170 (0x589ffc) (*context).Next: c.run() /home/vagrant/go/src/github.com/martini-contrib/gzip/gzip.go:40 (0x596aed) glob.func1: c.Next() /home/vagrant/go/src/github.com/martini-contrib/gzip/gzip.go:56 (0x596bc1) All.func1: serveGzip(w, r, c, opt) /usr/lib/golang/src/runtime/asm_amd64.s:438 (0x459e2e) call64: CALLFN(·call64, 64) /usr/lib/golang/src/reflect/value.go:432 (0x5ce3da) Value.call: call(frametype, fn, args, uint32(frametype.size), uint32(retOffset)) /usr/lib/golang/src/reflect/value.go:300 (0x5cd0a1) Value.Call: return v.call("Call", in) /home/vagrant/go/src/github.com/codegangsta/inject/inject.go:102 (0x68e7d2) (*injector).Invoke: return reflect.ValueOf(f).Call(in), nil /home/vagrant/go/src/github.com/go-martini/martini/martini.go:179 (0x58a0ee) (*context).run: _, err := c.Invoke(c.handler()) /home/vagrant/go/src/github.com/go-martini/martini/martini.go:170 (0x589ffc) (*context).Next: c.run() /home/vagrant/go/src/github.com/go-martini/martini/recovery.go:142 (0x58fa02) Recovery.func1: c.Next() /usr/lib/golang/src/runtime/asm_amd64.s:437 (0x459d8e) call32: CALLFN(·call32, 32) /usr/lib/golang/src/reflect/value.go:432 (0x5ce3da) Value.call: call(frametype, fn, args, uint32(frametype.size), uint32(retOffset)) /usr/lib/golang/src/reflect/value.go:300 (0x5cd0a1) Value.Call: return v.call("Call", in) /home/vagrant/go/src/github.com/codegangsta/inject/inject.go:102 (0x68e7d2) (*injector).Invoke: return reflect.ValueOf(f).Call(in), nil /home/vagrant/go/src/github.com/go-martini/martini/martini.go:179 (0x58a0ee) (*context).run: _, err := c.Invoke(c.handler()) /home/vagrant/go/src/github.com/go-martini/martini/martini.go:170 (0x589ffc) (*context).Next: c.run() /home/vagrant/go/src/github.com/go-martini/martini/logger.go:25 (0x58ef52) Logger.func1: c.Next() /usr/lib/golang/src/runtime/asm_amd64.s:438 (0x459e2e) call64: CALLFN(·call64, 64) /usr/lib/golang/src/reflect/value.go:432 (0x5ce3da) Value.call: call(frametype, fn, args, uint32(frametype.size), uint32(retOffset)) /usr/lib/golang/src/reflect/value.go:300 (0x5cd0a1) Value.Call: return v.call("Call", in) /home/vagrant/go/src/github.com/codegangsta/inject/inject.go:102 (0x68e7d2) (*injector).Invoke: return reflect.ValueOf(f).Call(in), nil /home/vagrant/go/src/github.com/go-martini/martini/martini.go:179 (0x58a0ee) (*context).run: _, err := c.Invoke(c.handler()) /home/vagrant/go/src/github.com/go-martini/martini/martini.go:75 (0x588c2d) (*Martini).ServeHTTP: m.createContext(res, req).run() /usr/lib/golang/src/net/http/server.go:1862 (0x55e6ae) serverHandler.ServeHTTP: handler.ServeHTTP(rw, req) /usr/lib/golang/src/net/http/server.go:1361 (0x55be2e) (*conn).serve: serverHandler{c.server}.ServeHTTP(w, w.req) /usr/lib/golang/src/runtime/asm_amd64.s:1696 (0x45c0b1) goexit: BYTE $0x90 // NOP
Closed by https://github.com/outbrain/orchestrator-agent/pull/16
When there are errors running mysql-datadir-available-space it panics