polydawn / repeatr

Repeatr: Reproducible, hermetic Computation. Provision containers from Content-Addressable snapshots; run using familiar containers (e.g. runc); store outputs in Content-Addressable form too! JSON API; connect your own pipelines! (Or, use github.com/polydawn/stellar for pipelines!)
https://repeatr.io
Apache License 2.0
68 stars 5 forks source link

Don't pannic when running repeatr as normal luser. #104

Closed timthelion closed 6 years ago

timthelion commented 7 years ago
timothy@yoga ~/p/p/reppl> repeatr run build.formula 
panic: IO Error: mkdir /var/lib/repeatr/executor/runc/job/bmtx58cr-es4k7epa-z2p0ge35: permission denied

goroutine 20 [running]:
go.polydawn.net/repeatr/lib/flak.WithDir(0xc82003df20, 0xc82003def0, 0x3, 0x3)
    /task/repeatr/.gopath/src/go.polydawn.net/repeatr/lib/flak/assist.go:30 +0x167
go.polydawn.net/repeatr/core/executor/impl/runc.(*Executor).Start.func1(0xc82010b9e0, 0xc82010ba40, 0xc8200fbd10, 0xc820104e00, 0x0, 0x0, 0x7fe6014cece8, 0xc82016b000)
    /task/repeatr/.gopath/src/go.polydawn.net/repeatr/core/executor/impl/runc/runc_executor.go:80 +0x183
created by go.polydawn.net/repeatr/core/executor/impl/runc.(*Executor).Start
    /task/repeatr/.gopath/src/go.polydawn.net/repeatr/core/executor/impl/runc/runc_executor.go:84 +0x1f6

goroutine 1 [chan receive]:
go.polydawn.net/repeatr/core/actors/terminal.step(0xc82010b8c0, 0x7fe602d151e8, 0xc820030018, 0xc82016afc0)
    /task/repeatr/.gopath/src/go.polydawn.net/repeatr/core/actors/terminal/terminal.go:28 +0x5d
go.polydawn.net/repeatr/core/actors/terminal.Consume(0x7fe6014cec98, 0xc8200f6f00, 0xc82016afc0, 0x1a, 0x7fe602d151e8, 0xc820030018, 0x0)
    /task/repeatr/.gopath/src/go.polydawn.net/repeatr/core/actors/terminal/terminal.go:20 +0xa8
go.polydawn.net/repeatr/cmd/repeatr/run.Run.func1(0xc820114a00, 0x0, 0x0)
    /task/repeatr/.gopath/src/go.polydawn.net/repeatr/cmd/repeatr/run/runCmd.go:105 +0x1350
reflect.Value.call(0xbca560, 0xc8200f98f0, 0x13, 0xd01230, 0x4, 0xc820176ad0, 0x1, 0x1, 0x0, 0x0, ...)
    /usr/local/go/src/reflect/value.go:432 +0x120a
reflect.Value.Call(0xbca560, 0xc8200f98f0, 0x13, 0xc820176ad0, 0x1, 0x1, 0x0, 0x0, 0x0)
    /usr/local/go/src/reflect/value.go:300 +0xb1
github.com/codegangsta/cli.HandleAction(0xbca560, 0xc8200f98f0, 0xc820114a00, 0x0, 0x0)
    /task/repeatr/.gopath/src/github.com/codegangsta/cli/app.go:487 +0x2ee
github.com/codegangsta/cli.Command.Run(0xd08ca0, 0x3, 0x0, 0x0, 0x0, 0x0, 0x0, 0xd13a20, 0xd, 0x0, ...)
    /task/repeatr/.gopath/src/github.com/codegangsta/cli/command.go:191 +0xfe6
github.com/codegangsta/cli.(*App).Run(0xc820066780, 0xc82000a240, 0x3, 0x3, 0x0, 0x0)
    /task/repeatr/.gopath/src/github.com/codegangsta/cli/app.go:240 +0xa9d
main.Main.func6()
    /task/repeatr/.gopath/src/go.polydawn.net/repeatr/cmd/repeatr/main.go:229 +0x6c
go.polydawn.net/meep.Try(0xc8201777e0, 0xc820177e30, 0x2, 0x2)
    /task/repeatr/.gopath/src/go.polydawn.net/meep/try.go:40 +0x58
main.Main(0xc82000a240, 0x3, 0x3, 0x7fe602d15348, 0xc820030008, 0x7fe602d151e8, 0xc820030010, 0x7fe602d151e8, 0xc820030018, 0x0)
    /task/repeatr/.gopath/src/go.polydawn.net/repeatr/cmd/repeatr/main.go:244 +0x2910
main.main()
    /task/repeatr/.gopath/src/go.polydawn.net/repeatr/cmd/repeatr/main.go:24 +0xd3

goroutine 17 [syscall, locked to thread]:
runtime.goexit()
    /usr/local/go/src/runtime/asm_amd64.s:1696 +0x1

goroutine 18 [chan receive]:
go.polydawn.net/repeatr/core/executor/impl/runc.(*Executor).Start(0xc8200fbd10, 0xc82017e630, 0xc82017e660, 0x3, 0x3, 0x0, 0x0, 0xc82017e690, 0x0, 0x0, ...)
    /task/repeatr/.gopath/src/go.polydawn.net/repeatr/core/executor/impl/runc/runc_executor.go:86 +0x219
go.polydawn.net/repeatr/core/actors/runner.(*Runner).Run(0xc8200f6f00, 0x7fe6014cec18, 0xc82017e600)
    /task/repeatr/.gopath/src/go.polydawn.net/repeatr/core/actors/runner/runner.go:69 +0x237
go.polydawn.net/repeatr/core/actors/runner.(*Runner).Run-fm(0x7fe6014cec18, 0xc82017e600)
    /task/repeatr/.gopath/src/go.polydawn.net/repeatr/cmd/repeatr/run/runCmd.go:69 +0x34
go.polydawn.net/go-sup.(*writ).Run.func1()
    /task/repeatr/.gopath/src/go.polydawn.net/go-sup/writ.go:108 +0x3e
go.polydawn.net/meep.Try(0xc82003cf38, 0xc82003cf50, 0x1, 0x1)
    /task/repeatr/.gopath/src/go.polydawn.net/meep/try.go:40 +0x58
go.polydawn.net/go-sup.(*writ).Run(0xc82010df10, 0xc82016cad0, 0x7fe6014cec50, 0xc82010df10)
    /task/repeatr/.gopath/src/go.polydawn.net/go-sup/writ.go:113 +0x2a3
created by go.polydawn.net/repeatr/cmd/repeatr/run.Run.func1
    /task/repeatr/.gopath/src/go.polydawn.net/repeatr/cmd/repeatr/run/runCmd.go:69 +0xe43
warpfork commented 6 years ago

Should now be a much more reasonable size of error message in the r200 version.