bug fix:#3448
Signed-off-by: Bowen Yan <loneybw@gmail.com>
This commit is contained in:
parent
394be74fdb
commit
019148ef4c
@ -87,21 +87,21 @@ func WithRestoreRuntime(ctx context.Context, id string, client *Client, checkpoi
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
var options *ptypes.Any
|
var options ptypes.Any
|
||||||
if m != nil {
|
if m != nil {
|
||||||
store := client.ContentStore()
|
store := client.ContentStore()
|
||||||
data, err := content.ReadBlob(ctx, store, *m)
|
data, err := content.ReadBlob(ctx, store, *m)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return errors.Wrap(err, "unable to read checkpoint runtime")
|
return errors.Wrap(err, "unable to read checkpoint runtime")
|
||||||
}
|
}
|
||||||
if err := proto.Unmarshal(data, options); err != nil {
|
if err := proto.Unmarshal(data, &options); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
c.Runtime = containers.RuntimeInfo{
|
c.Runtime = containers.RuntimeInfo{
|
||||||
Name: name,
|
Name: name,
|
||||||
Options: options,
|
Options: &options,
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user