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

repeatr should automatically detect it is not running as root #69

Closed timthelion closed 7 years ago

timthelion commented 8 years ago

repeatr scan --kind dir foo Repeatr encountered a serious issue and was unable to complete your request! Please file an issue to help us fix it. We've logged the full error to a file: "/tmp/repeatr-error-report-997445596". Please include this in the report.

This is the short version of the problem: TransmatError: Unable to create cacher work dirs: mkdir /var/lib/repeatr: permission denied

timthelion commented 8 years ago

Repeatr error report

Date: 2016-03-11 12:58:48.729936938 +0100 CET Briefly: TransmatError: Unable to create cacher work dirs: mkdir /var/lib/repeatr: permission denied

Full error:

TransmatError: Unable to create cacher work dirs: mkdir /var/lib/repeatr: permission denied "TransmatError" backtrace: polydawn.net/repeatr/io/transmat/cachedir.New:dircacher.go:50 polydawn.net/repeatr/executor/util.DefaultTransmat:capabilities.go:34 polydawn.net/repeatr/cli.Scan:scan_command.go:84 polydawn.net/repeatr/cli.ScanCommandPattern.func1:scan_command.go:55 github.com/codegangsta/cli.Command.Run:command.go:119 github.com/codegangsta/cli.(_App).Run:app.go:158 polydawn.net/repeatr/cli.Main:cli.go:56 main.main.func1:repeatr.go:18 github.com/spacemonkeygo/errors/try.(_Plan).Done:try.go:171 main.main:repeatr.go:77 runtime.main:proc.go:120 runtime.goexit:asm_amd64.s:1697 "TransmatError" exits: polydawn.net/repeatr/io/transmat/cachedir.New:dircacher.go:50

Structure:

&errors.Error{err:(_errors.errorString)(0xc820013ee0), class:(_errors.ErrorClass)(0xc82000faa0), stack:[]errors.frame{errors.frame{pc:0x60c143}, errors.frame{pc:0x5a608d}, errors.frame{pc:0x4a1c11}, errors.frame{pc:0x4a31ff}, errors.frame{pc:0x54920e}, errors.frame{pc:0x54624b}, errors.frame{pc:0x49fa2f}, errors.frame{pc:0x402590}, errors.frame{pc:0x49ead8}, errors.frame{pc:0x4011e1}, errors.frame{pc:0x42e3a0}, errors.frame{pc:0x45da21}}, exits:[]errors.frame{errors.frame{pc:0x60c185}}, data:map[errors.DataKey]interface {}(nil)}

Stack:

goroutine 1 [running]: main.saveErrorReport(0x7f1ae71b8d90, 0xc82000adc0, 0x0, 0x0, 0x0, 0x0) /task/repeatr/.gopath/src/polydawn.net/repeatr/cmd/repeatr/repeatr.go:113 +0xaa1 main.main.func4(0x7f1ae71b8d90, 0xc82000adc0) /task/repeatr/.gopath/src/polydawn.net/repeatr/cmd/repeatr/repeatr.go:57 +0x87 github.com/spacemonkeygo/errors/try.(_Plan).Done.func1(0xc8200ff110) /task/repeatr/.gopath/src/github.com/spacemonkeygo/errors/try/try.go:131 +0x271 polydawn.net/repeatr/io/transmat/cachedir.New(0xc820108660, 0x1d, 0xc8200ff440, 0xc8200b2b98) /task/repeatr/.gopath/src/polydawn.net/repeatr/io/transmat/cachedir/dircacher.go:50 +0x235 polydawn.net/repeatr/executor/util.DefaultTransmat(0x0, 0x0) /task/repeatr/.gopath/src/polydawn.net/repeatr/executor/util/capabilities.go:34 +0x2fd polydawn.net/repeatr/cli.Scan(0x0, 0x0, 0xc820013e30, 0x3, 0x0, 0x0, 0x0, 0x0, 0x0, 0xc820013e50, ...) /task/repeatr/.gopath/src/polydawn.net/repeatr/cli/scan_command.go:84 +0x151 polydawn.net/repeatr/cli.ScanCommandPattern.func1(0xc8200aa2a0) /task/repeatr/.gopath/src/polydawn.net/repeatr/cli/scan_command.go:55 +0x44f github.com/codegangsta/cli.Command.Run(0xbafdf8, 0x4, 0x0, 0x0, 0x0, 0x0, 0x0, 0xca0760, 0x40, 0x0, ...) /task/repeatr/.gopath/src/github.com/codegangsta/cli/command.go:118 +0x108e github.com/codegangsta/cli.(_App).Run(0xc820132000, 0xc82000a0a0, 0x5, 0x5, 0x0, 0x0) /task/repeatr/.gopath/src/github.com/codegangsta/cli/app.go:158 +0xb9b polydawn.net/repeatr/cli.Main(0xc82000a0a0, 0x5, 0x5, 0x7f1ae71b8330, 0xc82002e018, 0x7f1ae71b8330, 0xc82002e010) /task/repeatr/.gopath/src/polydawn.net/repeatr/cli/cli.go:55 +0x3bf main.main.func1() /task/repeatr/.gopath/src/polydawn.net/repeatr/cmd/repeatr/repeatr.go:17 +0x90 github.com/spacemonkeygo/errors/try.(*Plan).Done(0xc8200ff110) /task/repeatr/.gopath/src/github.com/spacemonkeygo/errors/try/try.go:170 +0x48 main.main() /task/repeatr/.gopath/src/polydawn.net/repeatr/cmd/repeatr/repeatr.go:76 +0x1e1

timthelion commented 8 years ago

It actually seems that nothing usefull is written to /var/ by that command and that repeatr might as well NOT be root in that case...

timthelion commented 8 years ago

I just realized that the nightly builds at http://repeatr.io/dl/nightly/linux-amd64/repeatr are out of date...

warpfork commented 7 years ago

This error message has now been much improved in the "r200" major rewrite.