runtime/shim: fix the nil checkpoint options
Signed-off-by: Iceber Gu <wei.cai-nat@daocloud.io>
This commit is contained in:
parent
c5a43b0007
commit
18d7e84f9b
@ -470,13 +470,12 @@ func (c *Container) Checkpoint(ctx context.Context, r *task.CheckpointTaskReques
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
var opts *options.CheckpointOptions
|
|
||||||
|
var opts options.CheckpointOptions
|
||||||
if r.Options != nil {
|
if r.Options != nil {
|
||||||
v, err := typeurl.UnmarshalAny(r.Options)
|
if err := typeurl.UnmarshalTo(r.Options, &opts); err != nil {
|
||||||
if err != nil {
|
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
opts = v.(*options.CheckpointOptions)
|
|
||||||
}
|
}
|
||||||
return p.(*process.Init).Checkpoint(ctx, &process.CheckpointConfig{
|
return p.(*process.Init).Checkpoint(ctx, &process.CheckpointConfig{
|
||||||
Path: r.Path,
|
Path: r.Path,
|
||||||
|
Loading…
Reference in New Issue
Block a user