--size does not work with rootless at present

We'd need to join multiple container's user namespaces, which is
not possible for now. The rootless single userns patches under
development by Giuseppe will fix this, but won't land in 1.2.x.

For now, disable --size as rootless.

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
This commit is contained in:
Matthew Heon
2019-04-02 11:59:05 -04:00
parent 2ad5f5cc25
commit c1cd9a3c6d

View File

@ -209,6 +209,10 @@ func psCmd(c *cliconfig.PsValues) error {
span, _ := opentracing.StartSpanFromContext(Ctx, "psCmd")
defer span.Finish()
}
// TODO disable when single rootless userns merges
if c.Bool("size") && os.Geteuid() != 0 {
return errors.New("the --size option is not presently supported without root")
}
var watch bool