diff options
Diffstat (limited to 'libpod')
-rw-r--r-- | libpod/oci_conmon_linux.go | 10 | ||||
-rw-r--r-- | libpod/volume_internal_linux.go | 16 |
2 files changed, 6 insertions, 20 deletions
diff --git a/libpod/oci_conmon_linux.go b/libpod/oci_conmon_linux.go index ef0aaba4a..026b13129 100644 --- a/libpod/oci_conmon_linux.go +++ b/libpod/oci_conmon_linux.go @@ -1024,8 +1024,8 @@ func prepareProcessExec(c *Container, cmd, env []string, tty bool, cwd, user, se if err != nil { return nil, err } - pspec := c.config.Spec.Process + pspec.SelinuxLabel = c.config.ProcessLabel pspec.Args = cmd // We need to default this to false else it will inherit terminal as true // from the container. @@ -1221,14 +1221,6 @@ func (r *ConmonOCIRuntime) moveConmonToCgroupAndSignal(ctr *Container, cmd *exec mustCreateCgroup = false } - if rootless.IsRootless() { - ownsCgroup, err := cgroups.UserOwnsCurrentSystemdCgroup() - if err != nil { - return err - } - mustCreateCgroup = !ownsCgroup - } - if mustCreateCgroup { cgroupParent := ctr.CgroupParent() if r.cgroupManager == define.SystemdCgroupsManager { diff --git a/libpod/volume_internal_linux.go b/libpod/volume_internal_linux.go index 4c0332018..70eccbecb 100644 --- a/libpod/volume_internal_linux.go +++ b/libpod/volume_internal_linux.go @@ -3,8 +3,8 @@ package libpod import ( - "io/ioutil" "os/exec" + "strings" "github.com/containers/libpod/libpod/define" "github.com/containers/libpod/pkg/rootless" @@ -72,16 +72,10 @@ func (v *Volume) mount() error { mountArgs = append(mountArgs, volDevice, v.config.MountPoint) mountCmd := exec.Command(mountPath, mountArgs...) - errPipe, err := mountCmd.StderrPipe() - if err != nil { - return errors.Wrapf(err, "error getting stderr pipe for mount") - } - if err := mountCmd.Start(); err != nil { - out, err2 := ioutil.ReadAll(errPipe) - if err2 != nil { - return errors.Wrapf(err2, "error reading mount STDERR") - } - return errors.Wrapf(errors.New(string(out)), "error mounting volume %s", v.Name()) + logrus.Debugf("Running mount command: %s %s", mountPath, strings.Join(mountArgs, " ")) + if output, err := mountCmd.CombinedOutput(); err != nil { + logrus.Debugf("Mount failed with %v", err) + return errors.Wrapf(errors.Errorf(string(output)), "error mounting volume %s", v.Name()) } logrus.Debugf("Mounted volume %s", v.Name()) |