Skip to content

Commit

Permalink
Merge pull request #8475 from Iceber/fix_checkpoint_options_1.7
Browse files Browse the repository at this point in the history
[release/1.7] runtime/shim: fix the nil checkpoint options
  • Loading branch information
dmcgowan committed May 9, 2023
2 parents 74ce87e + 3ef5b68 commit c8e99bf
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions runtime/v2/runc/container.go
Original file line number Diff line number Diff line change
Expand Up @@ -470,13 +470,12 @@ func (c *Container) Checkpoint(ctx context.Context, r *task.CheckpointTaskReques
if err != nil {
return err
}
var opts *options.CheckpointOptions

var opts options.CheckpointOptions
if r.Options != nil {
v, err := typeurl.UnmarshalAny(r.Options)
if err != nil {
if err := typeurl.UnmarshalTo(r.Options, &opts); err != nil {
return err
}
opts = v.(*options.CheckpointOptions)
}
return p.(*process.Init).Checkpoint(ctx, &process.CheckpointConfig{
Path: r.Path,
Expand Down

0 comments on commit c8e99bf

Please sign in to comment.