Add support for specifying a checkpoint directory. (#245)

Signed-off-by: Ross Boucher <rboucher@gmail.com>
This commit is contained in:
Ross Boucher
2016-05-25 20:42:37 -04:00
committed by Michael Crosby
parent 76dd6710dc
commit e756ae42d1
10 changed files with 291 additions and 228 deletions

View File

@@ -1,6 +1,7 @@
package supervisor
import (
"path/filepath"
"time"
"github.com/docker/containerd/runtime"
@@ -17,6 +18,7 @@ type StartTask struct {
Labels []string
NoPivotRoot bool
Checkpoint *runtime.Checkpoint
CheckpointDir string
Runtime string
RuntimeArgs []string
}
@@ -56,7 +58,7 @@ func (s *Supervisor) start(t *StartTask) error {
Stderr: t.Stderr,
}
if t.Checkpoint != nil {
task.Checkpoint = t.Checkpoint.Name
task.CheckpointPath = filepath.Join(t.CheckpointDir, t.Checkpoint.Name)
}
s.startTasks <- task