summaryrefslogtreecommitdiff
path: root/libpod/oci.go
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2019-06-27 16:01:45 +0200
committerGitHub <noreply@github.com>2019-06-27 16:01:45 +0200
commit0906b32087c3d7db6844873a7d46241430a1b065 (patch)
tree3c68a0c2d6e2e5742b4cc314136ddb8e9877ec75 /libpod/oci.go
parent5e3d63a53c0762c99c5eb7863ef7fc8d0b2e8eec (diff)
parent8561b996447793999a6465f9b9e3f0f7bbea2c6a (diff)
downloadpodman-0906b32087c3d7db6844873a7d46241430a1b065.tar.gz
podman-0906b32087c3d7db6844873a7d46241430a1b065.tar.bz2
podman-0906b32087c3d7db6844873a7d46241430a1b065.zip
Merge pull request #3442 from baude/removelibpodfrommainphase2
libpod removal from main (phase 2)
Diffstat (limited to 'libpod/oci.go')
-rw-r--r--libpod/oci.go16
1 files changed, 8 insertions, 8 deletions
diff --git a/libpod/oci.go b/libpod/oci.go
index 343738a3a..efb5e42cc 100644
--- a/libpod/oci.go
+++ b/libpod/oci.go
@@ -217,7 +217,7 @@ func (r *OCIRuntime) updateContainerStatus(ctr *Container, useRuntime bool) erro
// If not using the OCI runtime, we don't need to do most of this.
if !useRuntime {
// If the container's not running, nothing to do.
- if ctr.state.State != ContainerStateRunning && ctr.state.State != ContainerStatePaused {
+ if ctr.state.State != define.ContainerStateRunning && ctr.state.State != define.ContainerStatePaused {
return nil
}
@@ -233,7 +233,7 @@ func (r *OCIRuntime) updateContainerStatus(ctr *Container, useRuntime bool) erro
}
// Alright, it exists. Transition to Stopped state.
- ctr.state.State = ContainerStateStopped
+ ctr.state.State = define.ContainerStateStopped
// Read the exit file to get our stopped time and exit code.
return ctr.handleExitFile(exitFile, info)
@@ -264,7 +264,7 @@ func (r *OCIRuntime) updateContainerStatus(ctr *Container, useRuntime bool) erro
ctr.removeConmonFiles()
ctr.state.ExitCode = -1
ctr.state.FinishedTime = time.Now()
- ctr.state.State = ContainerStateExited
+ ctr.state.State = define.ContainerStateExited
return nil
}
return errors.Wrapf(err, "error getting container %s state. stderr/out: %s", ctr.ID(), out)
@@ -283,13 +283,13 @@ func (r *OCIRuntime) updateContainerStatus(ctr *Container, useRuntime bool) erro
switch state.Status {
case "created":
- ctr.state.State = ContainerStateCreated
+ ctr.state.State = define.ContainerStateCreated
case "paused":
- ctr.state.State = ContainerStatePaused
+ ctr.state.State = define.ContainerStatePaused
case "running":
- ctr.state.State = ContainerStateRunning
+ ctr.state.State = define.ContainerStateRunning
case "stopped":
- ctr.state.State = ContainerStateStopped
+ ctr.state.State = define.ContainerStateStopped
default:
return errors.Wrapf(define.ErrInternal, "unrecognized status returned by runtime for container %s: %s",
ctr.ID(), state.Status)
@@ -297,7 +297,7 @@ func (r *OCIRuntime) updateContainerStatus(ctr *Container, useRuntime bool) erro
// Only grab exit status if we were not already stopped
// If we were, it should already be in the database
- if ctr.state.State == ContainerStateStopped && oldState != ContainerStateStopped {
+ if ctr.state.State == define.ContainerStateStopped && oldState != define.ContainerStateStopped {
var fi os.FileInfo
chWait := make(chan error)
defer close(chWait)