Update checkpoint opts with runtime handling

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
This commit is contained in:
Michael Crosby
2019-03-06 12:42:45 -05:00
parent 160737d2c8
commit aaae81189a
3 changed files with 17 additions and 8 deletions

View File

@@ -92,9 +92,9 @@ func WithCheckpointName(name string) CheckpointTaskOpts {
}
// WithCheckpointImagePath sets image path for checkpoint option
func WithCheckpointImagePath(rt, path string) CheckpointTaskOpts {
func WithCheckpointImagePath(path string) CheckpointTaskOpts {
return func(r *CheckpointTaskInfo) error {
if CheckRuntime(rt, "io.containerd.runc") {
if CheckRuntime(r.Runtime(), "io.containerd.runc") {
if r.Options == nil {
r.Options = &options.CheckpointOptions{}
}