diff options
Diffstat (limited to 'libpod')
-rw-r--r-- | libpod/container_api.go | 17 | ||||
-rw-r--r-- | libpod/runtime.go | 5 |
2 files changed, 11 insertions, 11 deletions
diff --git a/libpod/container_api.go b/libpod/container_api.go index 83f93cf9e..30c67eb2a 100644 --- a/libpod/container_api.go +++ b/libpod/container_api.go @@ -453,22 +453,19 @@ func (c *Container) Unmount(force bool) error { } } - if c.state.State == ContainerStateRunning || c.state.State == ContainerStatePaused { - return errors.Wrapf(ErrCtrStateInvalid, "cannot unmount storage for container %s as it is running or paused", c.ID()) - } - - // Check if we have active exec sessions - if len(c.state.ExecSessions) != 0 { - return errors.Wrapf(ErrCtrStateInvalid, "container %s has active exec sessions, refusing to unmount", c.ID()) - } - if c.state.Mounted { mounted, err := c.runtime.storageService.MountedContainerImage(c.ID()) if err != nil { return errors.Wrapf(err, "can't determine how many times %s is mounted, refusing to unmount", c.ID()) } if mounted == 1 { - return errors.Wrapf(err, "can't unmount %s last mount, it is still in use", c.ID()) + if c.state.State == ContainerStateRunning || c.state.State == ContainerStatePaused { + return errors.Wrapf(ErrCtrStateInvalid, "cannot unmount storage for container %s as it is running or paused", c.ID()) + } + if len(c.state.ExecSessions) != 0 { + return errors.Wrapf(ErrCtrStateInvalid, "container %s has active exec sessions, refusing to unmount", c.ID()) + } + return errors.Wrapf(ErrInternal, "can't unmount %s last mount, it is still in use", c.ID()) } } return c.unmount(force) diff --git a/libpod/runtime.go b/libpod/runtime.go index 1b26f851f..318cd0369 100644 --- a/libpod/runtime.go +++ b/libpod/runtime.go @@ -184,6 +184,8 @@ var ( RuntimePath: []string{ "/usr/bin/runc", "/usr/sbin/runc", + "/usr/local/bin/runc", + "/usr/local/sbin/runc", "/sbin/runc", "/bin/runc", "/usr/lib/cri-o-runc/sbin/runc", @@ -191,6 +193,7 @@ var ( ConmonPath: []string{ "/usr/libexec/podman/conmon", "/usr/libexec/crio/conmon", + "/usr/local/lib/podman/conmon", "/usr/local/libexec/crio/conmon", "/usr/bin/conmon", "/usr/sbin/conmon", @@ -206,7 +209,7 @@ var ( MaxLogSize: -1, NoPivotRoot: false, CNIConfigDir: "/etc/cni/net.d/", - CNIPluginDir: []string{"/usr/libexec/cni", "/usr/lib/cni", "/opt/cni/bin"}, + CNIPluginDir: []string{"/usr/libexec/cni", "/usr/lib/cni", "/usr/local/lib/cni", "/opt/cni/bin"}, InfraCommand: DefaultInfraCommand, InfraImage: DefaultInfraImage, EnablePortReservation: true, |