summaryrefslogtreecommitdiff
path: root/pkg
diff options
context:
space:
mode:
authorGiuseppe Scrivano <gscrivan@redhat.com>2019-02-28 09:39:41 +0100
committerGiuseppe Scrivano <gscrivan@redhat.com>2019-02-28 16:16:48 +0100
commit23615099e904326ef9e523e0215ac112580db96f (patch)
tree70109e3c431e0eb06bb6f7cc4fe7efd98bdeb273 /pkg
parent5afae0b25bba4e2274747b32cf8b3bc929daf06e (diff)
downloadpodman-23615099e904326ef9e523e0215ac112580db96f.tar.gz
podman-23615099e904326ef9e523e0215ac112580db96f.tar.bz2
podman-23615099e904326ef9e523e0215ac112580db96f.zip
rootless, new[ug]idmap: on failure add output
if any of the mapping tools for setting up the user namespace fail, then include their output in the error message. Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Diffstat (limited to 'pkg')
-rw-r--r--pkg/rootless/rootless_linux.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/pkg/rootless/rootless_linux.go b/pkg/rootless/rootless_linux.go
index 9a192c0fa..98692707f 100644
--- a/pkg/rootless/rootless_linux.go
+++ b/pkg/rootless/rootless_linux.go
@@ -93,7 +93,8 @@ func tryMappingTool(tool string, pid int, hostID int, mappings []idtools.IDMap)
Args: args,
}
- if err := cmd.Run(); err != nil {
+ if output, err := cmd.CombinedOutput(); err != nil {
+ logrus.Debugf("error from %s: %s", tool, output)
return errors.Wrapf(err, "cannot setup namespace using %s", tool)
}
return nil