Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
luke-lombardi committed Oct 25, 2024
1 parent 1dbf35b commit 6ddff52
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions pkg/worker/cedana.go
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ func (c *CedanaClient) Checkpoint(ctx context.Context, containerId string) error
}

// Restore a runc container
func (c *CedanaClient) Restore(ctx context.Context, containerId string) (*api.ProcessState, error) {
func (c *CedanaClient) Restore(ctx context.Context, containerId, bundlePath string) (*api.ProcessState, error) {
ctx, cancel := context.WithTimeout(ctx, defaultCheckpointDeadline)
defer cancel()

Expand All @@ -229,7 +229,9 @@ func (c *CedanaClient) Restore(ctx context.Context, containerId string) (*api.Pr
Type: api.CRType_LOCAL,
JID: containerId,
CriuOpts: &api.CriuOpts{TcpEstablished: true},
RuncOpts: &api.RuncOpts{},
RuncOpts: &api.RuncOpts{
Bundle: bundlePath,
},
// Need option to override overlay FD
}
res, err := c.service.JobRestore(ctx, args)
Expand Down
2 changes: 1 addition & 1 deletion pkg/worker/lifecycle.go
Original file line number Diff line number Diff line change
Expand Up @@ -502,7 +502,7 @@ func (s *Worker) spawn(request *types.ContainerRequest, spec *specs.Spec, output
if createCheckpoint {
go s.createCheckpoint(ctx, request)
} else if state.Status == types.CheckpointStatusAvailable {
processState, err := s.cedanaClient.Restore(ctx, state.ContainerId)
processState, err := s.cedanaClient.Restore(ctx, state.ContainerId, opts.BundlePath)
if err != nil {
log.Printf("<%s> - failed to restore checkpoint: %v\n", request.ContainerId, err)

Expand Down

0 comments on commit 6ddff52

Please sign in to comment.