summaryrefslogtreecommitdiff
path: root/libpod/oci.go
diff options
context:
space:
mode:
authorMatthew Heon <matthew.heon@gmail.com>2018-02-28 09:29:46 -0500
committerAtomic Bot <atomic-devel@projectatomic.io>2018-03-01 21:17:51 +0000
commitc5dc7f81fc5a1078b0bc66bd9e7a1f23a03242c5 (patch)
treef0f80eecfc6bd3b4a03b41d43ebef52207cbe1ca /libpod/oci.go
parentfa5f99effa7dd2ef9fbd5287b6225590b28713d1 (diff)
downloadpodman-c5dc7f81fc5a1078b0bc66bd9e7a1f23a03242c5.tar.gz
podman-c5dc7f81fc5a1078b0bc66bd9e7a1f23a03242c5.tar.bz2
podman-c5dc7f81fc5a1078b0bc66bd9e7a1f23a03242c5.zip
Replace usage of runc with runtime
Signed-off-by: Matthew Heon <matthew.heon@gmail.com> Closes: #412 Approved by: baude
Diffstat (limited to 'libpod/oci.go')
-rw-r--r--libpod/oci.go11
1 files changed, 6 insertions, 5 deletions
diff --git a/libpod/oci.go b/libpod/oci.go
index ef32079f9..4f49a81e4 100644
--- a/libpod/oci.go
+++ b/libpod/oci.go
@@ -36,7 +36,8 @@ const (
// ContainerCreateTimeout represents the value of container creating timeout
ContainerCreateTimeout = 240 * time.Second
- // Timeout before declaring that runc has failed to kill a given container
+ // Timeout before declaring that runtime has failed to kill a given
+ // container
killContainerTimeout = 5 * time.Second
// DefaultShmSize is the default shm size
DefaultShmSize = 64 * 1024 * 1024
@@ -299,7 +300,7 @@ func (r *OCIRuntime) createContainer(ctr *Container, cgroupParent string) (err e
defer func() {
if err != nil {
if err2 := r.deleteContainer(ctr); err2 != nil {
- logrus.Errorf("Error removing container %s from runc after creation failed", ctr.ID())
+ logrus.Errorf("Error removing container %s from runtime after creation failed", ctr.ID())
}
}
}()
@@ -366,7 +367,7 @@ func (r *OCIRuntime) updateContainerStatus(ctr *Container) error {
case "stopped":
ctr.state.State = ContainerStateStopped
default:
- return errors.Wrapf(ErrInternal, "unrecognized status returned by runc for container %s: %s",
+ return errors.Wrapf(ErrInternal, "unrecognized status returned by runtime for container %s: %s",
ctr.ID(), state.Status)
}
@@ -477,7 +478,7 @@ func (r *OCIRuntime) stopContainer(ctr *Container, timeout uint) error {
return errors.Wrapf(err, "error sending SIGKILL to container %s", ctr.ID())
}
- // Give runc a few seconds to make it happen
+ // Give runtime a few seconds to make it happen
if err := waitContainerStop(ctr, killContainerTimeout); err != nil {
return err
}
@@ -485,7 +486,7 @@ func (r *OCIRuntime) stopContainer(ctr *Container, timeout uint) error {
return nil
}
-// deleteContainer deletes a container from runc
+// deleteContainer deletes a container from the OCI runtime
func (r *OCIRuntime) deleteContainer(ctr *Container) error {
_, err := utils.ExecCmd(r.path, "delete", "--force", ctr.ID())
return err