Save bootstrap.json instead of address file
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
This commit is contained in:
@@ -129,7 +129,7 @@ func (b *binary) Start(ctx context.Context, opts *types.Any, onClose func()) (_
|
||||
return nil, err
|
||||
}
|
||||
|
||||
params, err := parseStartResponse(ctx, response)
|
||||
params, err := parseStartResponse(response)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -139,6 +139,11 @@ func (b *binary) Start(ctx context.Context, opts *types.Any, onClose func()) (_
|
||||
return nil, err
|
||||
}
|
||||
|
||||
// Save bootstrap configuration (so containerd can restore shims after restart).
|
||||
if err := writeBootstrapParams(filepath.Join(b.bundle.Path, "bootstrap.json"), params); err != nil {
|
||||
return nil, fmt.Errorf("failed to write bootstrap.json: %w", err)
|
||||
}
|
||||
|
||||
return &shim{
|
||||
bundle: b.bundle,
|
||||
client: conn,
|
||||
|
||||
Reference in New Issue
Block a user