mirror of
https://github.com/podman-container-tools/podman.git
synced 2026-08-27 18:57:53 +00:00
info: add rootless field
Add a rootless field to the info data (e.g., `podman info`) to indicate if the executing user is root or not. In most cases, this can be guessed but now it is clear and may aid in debugging, reporting and understanding certain issues. Signed-off-by: Valentin Rothberg <vrothberg@suse.com>
This commit is contained in:
parent
f5473c6cc3
commit
615df2ecd7
1 changed files with 2 additions and 0 deletions
|
|
@ -12,6 +12,7 @@ import (
|
|||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/containers/libpod/pkg/rootless"
|
||||
"github.com/containers/libpod/utils"
|
||||
"github.com/containers/storage/pkg/system"
|
||||
"github.com/pkg/errors"
|
||||
|
|
@ -30,6 +31,7 @@ func (r *Runtime) hostInfo() (map[string]interface{}, error) {
|
|||
info["os"] = runtime.GOOS
|
||||
info["arch"] = runtime.GOARCH
|
||||
info["cpus"] = runtime.NumCPU()
|
||||
info["rootless"] = rootless.IsRootless()
|
||||
mi, err := system.ReadMemInfo()
|
||||
if err != nil {
|
||||
return nil, errors.Wrapf(err, "error reading memory info")
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue