Add support for specifying a checkpoint directory. (#245)

Signed-off-by: Ross Boucher <rboucher@gmail.com>
This commit is contained in:
Ross Boucher 2016-05-25 20:42:37 -04:00 committed by Michael Crosby
parent 76dd6710dc
commit e756ae42d1
10 changed files with 291 additions and 228 deletions

View file

@ -56,6 +56,7 @@ func (s *apiServer) CreateContainer(ctx context.Context, c *types.CreateContaine
e.RuntimeArgs = c.RuntimeArgs e.RuntimeArgs = c.RuntimeArgs
e.StartResponse = make(chan supervisor.StartResponse, 1) e.StartResponse = make(chan supervisor.StartResponse, 1)
if c.Checkpoint != "" { if c.Checkpoint != "" {
e.CheckpointDir = c.CheckpointDir
e.Checkpoint = &runtime.Checkpoint{ e.Checkpoint = &runtime.Checkpoint{
Name: c.Checkpoint, Name: c.Checkpoint,
} }
@ -77,6 +78,7 @@ func (s *apiServer) CreateContainer(ctx context.Context, c *types.CreateContaine
func (s *apiServer) CreateCheckpoint(ctx context.Context, r *types.CreateCheckpointRequest) (*types.CreateCheckpointResponse, error) { func (s *apiServer) CreateCheckpoint(ctx context.Context, r *types.CreateCheckpointRequest) (*types.CreateCheckpointResponse, error) {
e := &supervisor.CreateCheckpointTask{} e := &supervisor.CreateCheckpointTask{}
e.ID = r.Id e.ID = r.Id
e.CheckpointDir = r.CheckpointDir
e.Checkpoint = &runtime.Checkpoint{ e.Checkpoint = &runtime.Checkpoint{
Name: r.Checkpoint.Name, Name: r.Checkpoint.Name,
Exit: r.Checkpoint.Exit, Exit: r.Checkpoint.Exit,
@ -84,6 +86,7 @@ func (s *apiServer) CreateCheckpoint(ctx context.Context, r *types.CreateCheckpo
UnixSockets: r.Checkpoint.UnixSockets, UnixSockets: r.Checkpoint.UnixSockets,
Shell: r.Checkpoint.Shell, Shell: r.Checkpoint.Shell,
} }
s.sv.SendTask(e) s.sv.SendTask(e)
if err := <-e.ErrorCh(); err != nil { if err := <-e.ErrorCh(); err != nil {
return nil, err return nil, err
@ -97,6 +100,7 @@ func (s *apiServer) DeleteCheckpoint(ctx context.Context, r *types.DeleteCheckpo
} }
e := &supervisor.DeleteCheckpointTask{} e := &supervisor.DeleteCheckpointTask{}
e.ID = r.Id e.ID = r.Id
e.CheckpointDir = r.CheckpointDir
e.Checkpoint = &runtime.Checkpoint{ e.Checkpoint = &runtime.Checkpoint{
Name: r.Name, Name: r.Name,
} }
@ -124,7 +128,7 @@ func (s *apiServer) ListCheckpoint(ctx context.Context, r *types.ListCheckpointR
return nil, grpc.Errorf(codes.NotFound, "no such containers") return nil, grpc.Errorf(codes.NotFound, "no such containers")
} }
var out []*types.Checkpoint var out []*types.Checkpoint
checkpoints, err := container.Checkpoints() checkpoints, err := container.Checkpoints(r.CheckpointDir)
if err != nil { if err != nil {
return nil, err return nil, err
} }

View file

@ -71,7 +71,10 @@ var _ = math.Inf
// This is a compile-time assertion to ensure that this generated file // This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against. // is compatible with the proto package it is being compiled against.
const _ = proto.ProtoPackageIsVersion1 // A compilation error at this line likely means your copy of the
// proto package needs to be updated.
// FIXME: I can't seeem to get this to work.
const _ = proto.ProtoPackageIsVersion1 // please upgrade the proto package
type GetServerVersionRequest struct { type GetServerVersionRequest struct {
} }
@ -115,16 +118,17 @@ func (*UpdateProcessResponse) ProtoMessage() {}
func (*UpdateProcessResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{3} } func (*UpdateProcessResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{3} }
type CreateContainerRequest struct { type CreateContainerRequest struct {
Id string `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"` Id string `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"`
BundlePath string `protobuf:"bytes,2,opt,name=bundlePath" json:"bundlePath,omitempty"` BundlePath string `protobuf:"bytes,2,opt,name=bundlePath" json:"bundlePath,omitempty"`
Checkpoint string `protobuf:"bytes,3,opt,name=checkpoint" json:"checkpoint,omitempty"` Checkpoint string `protobuf:"bytes,3,opt,name=checkpoint" json:"checkpoint,omitempty"`
Stdin string `protobuf:"bytes,4,opt,name=stdin" json:"stdin,omitempty"` Stdin string `protobuf:"bytes,4,opt,name=stdin" json:"stdin,omitempty"`
Stdout string `protobuf:"bytes,5,opt,name=stdout" json:"stdout,omitempty"` Stdout string `protobuf:"bytes,5,opt,name=stdout" json:"stdout,omitempty"`
Stderr string `protobuf:"bytes,6,opt,name=stderr" json:"stderr,omitempty"` Stderr string `protobuf:"bytes,6,opt,name=stderr" json:"stderr,omitempty"`
Labels []string `protobuf:"bytes,7,rep,name=labels" json:"labels,omitempty"` Labels []string `protobuf:"bytes,7,rep,name=labels" json:"labels,omitempty"`
NoPivotRoot bool `protobuf:"varint,8,opt,name=noPivotRoot" json:"noPivotRoot,omitempty"` NoPivotRoot bool `protobuf:"varint,8,opt,name=noPivotRoot" json:"noPivotRoot,omitempty"`
Runtime string `protobuf:"bytes,9,opt,name=runtime" json:"runtime,omitempty"` Runtime string `protobuf:"bytes,9,opt,name=runtime" json:"runtime,omitempty"`
RuntimeArgs []string `protobuf:"bytes,10,rep,name=runtimeArgs" json:"runtimeArgs,omitempty"` RuntimeArgs []string `protobuf:"bytes,10,rep,name=runtimeArgs" json:"runtimeArgs,omitempty"`
CheckpointDir string `protobuf:"bytes,11,opt,name=checkpointDir" json:"checkpointDir,omitempty"`
} }
func (m *CreateContainerRequest) Reset() { *m = CreateContainerRequest{} } func (m *CreateContainerRequest) Reset() { *m = CreateContainerRequest{} }
@ -235,8 +239,9 @@ func (*AddProcessResponse) ProtoMessage() {}
func (*AddProcessResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{11} } func (*AddProcessResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{11} }
type CreateCheckpointRequest struct { type CreateCheckpointRequest struct {
Id string `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"` Id string `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"`
Checkpoint *Checkpoint `protobuf:"bytes,2,opt,name=checkpoint" json:"checkpoint,omitempty"` Checkpoint *Checkpoint `protobuf:"bytes,2,opt,name=checkpoint" json:"checkpoint,omitempty"`
CheckpointDir string `protobuf:"bytes,3,opt,name=checkpointDir" json:"checkpointDir,omitempty"`
} }
func (m *CreateCheckpointRequest) Reset() { *m = CreateCheckpointRequest{} } func (m *CreateCheckpointRequest) Reset() { *m = CreateCheckpointRequest{} }
@ -260,8 +265,9 @@ func (*CreateCheckpointResponse) ProtoMessage() {}
func (*CreateCheckpointResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{13} } func (*CreateCheckpointResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{13} }
type DeleteCheckpointRequest struct { type DeleteCheckpointRequest struct {
Id string `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"` Id string `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"`
Name string `protobuf:"bytes,2,opt,name=name" json:"name,omitempty"` Name string `protobuf:"bytes,2,opt,name=name" json:"name,omitempty"`
CheckpointDir string `protobuf:"bytes,3,opt,name=checkpointDir" json:"checkpointDir,omitempty"`
} }
func (m *DeleteCheckpointRequest) Reset() { *m = DeleteCheckpointRequest{} } func (m *DeleteCheckpointRequest) Reset() { *m = DeleteCheckpointRequest{} }
@ -278,7 +284,8 @@ func (*DeleteCheckpointResponse) ProtoMessage() {}
func (*DeleteCheckpointResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{15} } func (*DeleteCheckpointResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{15} }
type ListCheckpointRequest struct { type ListCheckpointRequest struct {
Id string `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"` Id string `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"`
CheckpointDir string `protobuf:"bytes,2,opt,name=checkpointDir" json:"checkpointDir,omitempty"`
} }
func (m *ListCheckpointRequest) Reset() { *m = ListCheckpointRequest{} } func (m *ListCheckpointRequest) Reset() { *m = ListCheckpointRequest{} }
@ -1310,150 +1317,152 @@ var _API_serviceDesc = grpc.ServiceDesc{
} }
var fileDescriptor0 = []byte{ var fileDescriptor0 = []byte{
// 2307 bytes of a gzipped FileDescriptorProto // 2337 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xec, 0x59, 0xcd, 0x73, 0x1b, 0x49, 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xec, 0x59, 0xcd, 0x72, 0x23, 0x49,
0x15, 0x8f, 0xa4, 0x91, 0x6c, 0x3d, 0x7d, 0xd8, 0x9e, 0xf8, 0x43, 0xd1, 0x6e, 0xb2, 0x61, 0x0a, 0x11, 0x1e, 0x49, 0x2d, 0xd9, 0x4a, 0xfd, 0xd8, 0xee, 0xf5, 0x8f, 0x46, 0xbb, 0x33, 0x3b, 0x74,
0xd8, 0x00, 0x8b, 0x09, 0xce, 0x6e, 0x91, 0x82, 0x82, 0xaa, 0xc4, 0x09, 0x4b, 0xd8, 0x78, 0x71, 0x2c, 0x30, 0xc0, 0x62, 0x06, 0xcf, 0x6e, 0x30, 0x01, 0x11, 0x44, 0xcc, 0xd8, 0xc3, 0x32, 0xec,
0xc6, 0x36, 0x7b, 0xa1, 0x4a, 0x35, 0x9e, 0xe9, 0x48, 0x83, 0xa5, 0x99, 0xd9, 0x99, 0x96, 0x2d, 0x78, 0xf1, 0xb4, 0x6d, 0xf6, 0xa8, 0x68, 0x77, 0xd7, 0x48, 0x8d, 0xa5, 0xee, 0xde, 0xee, 0x92,
0x5f, 0x38, 0xc2, 0x8d, 0x7f, 0x80, 0x2a, 0x2e, 0x70, 0xe2, 0xce, 0x81, 0xbf, 0x80, 0xff, 0x84, 0x2d, 0x5f, 0x38, 0x70, 0x80, 0x1b, 0x2f, 0x40, 0x04, 0x17, 0x6e, 0xdc, 0x39, 0xf0, 0x04, 0x44,
0xe2, 0xc2, 0x9d, 0x23, 0xaf, 0xbb, 0xdf, 0xf4, 0xf4, 0xe8, 0xc3, 0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0x1f, 0x8a, 0xa8, 0xd5, 0xe9, 0x0e, 0xa9, 0x91, 0x62, 0xfe, 0x88, 0x4d, 0x32, 0x43, 0x4d, 0xea, 0x22, 0x2b, 0x00, 0x9a, 0x3d, 0x61, 0x69, 0x18, 0x07, 0xd4, 0x25, 0x15, 0x80,
0x2a, 0x73, 0x03, 0x11, 0x96, 0xab, 0x68, 0xbe, 0x16, 0x49, 0x4d, 0xf5, 0x6e, 0x42, 0x42, 0x82, 0x28, 0x03, 0x48, 0xbc, 0x99, 0xc6, 0xdc, 0xa3, 0xae, 0x5a, 0xd3, 0xb2, 0xb9, 0xc5, 0x18, 0x31,
0x22, 0x4f, 0xae, 0xbc, 0x44, 0x96, 0x7d, 0xc7, 0x35, 0x10, 0x4c, 0xe4, 0x2d, 0x45, 0xa1, 0x37, 0x7e, 0x28, 0xa2, 0x56, 0xa7, 0xe6, 0x56, 0x23, 0xc5, 0xfc, 0x31, 0x9b, 0x64, 0x74, 0xcc, 0x0d,
0xf0, 0x8b, 0xc1, 0x13, 0x47, 0xa1, 0x6c, 0x03, 0x1d, 0x77, 0x71, 0x42, 0x70, 0x5f, 0xb0, 0x34, 0x44, 0x58, 0xae, 0xa2, 0xf9, 0x5a, 0x24, 0x35, 0x9d, 0x77, 0x13, 0x12, 0x12, 0x14, 0x79, 0x7a,
0x62, 0xe3, 0x23, 0x43, 0x2b, 0x28, 0xee, 0x85, 0x09, 0xf1, 0x8d, 0xb2, 0x10, 0x73, 0x3a, 0x7b, 0xed, 0x25, 0xf2, 0xd8, 0x77, 0x5c, 0x03, 0xc1, 0x44, 0xde, 0x52, 0x14, 0x7a, 0x03, 0x3f, 0x65,
0xbe, 0x0b, 0x9d, 0x97, 0x97, 0x0c, 0xbb, 0x71, 0x9e, 0x05, 0xe8, 0x43, 0x91, 0xcc, 0x18, 0xd9, 0x3c, 0x71, 0xfb, 0xca, 0x32, 0xd0, 0x71, 0x17, 0x27, 0x04, 0xf7, 0x25, 0x4b, 0x23, 0x36,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d, 0x4e, 0x80, 0xd2, 0x77, 0x5e, 0xbf, 0x6d, 0xa2, 0xce,
0x1b, 0x00, 0x00, 0xbd, 0x27, 0x95, 0x5c, 0x4f, 0x56, 0xd2, 0x93, 0x2d, 0xd3, 0x63, 0x04, 0xe7, 0xa2, 0x21, 0xff,
0xa6, 0x7b, 0xfa, 0xef, 0x00, 0x00, 0x00, 0xff, 0xff, 0xb7, 0xce, 0x6c, 0xd6, 0xb3, 0x1b, 0x00,
0x00,
} }

View file

@ -49,6 +49,7 @@ message CreateContainerRequest {
bool noPivotRoot = 8; bool noPivotRoot = 8;
string runtime = 9; string runtime = 9;
repeated string runtimeArgs = 10; repeated string runtimeArgs = 10;
string checkpointDir = 11; // Directory where checkpoints are stored
} }
message CreateContainerResponse { message CreateContainerResponse {
@ -100,6 +101,7 @@ message AddProcessResponse {
message CreateCheckpointRequest { message CreateCheckpointRequest {
string id = 1; // ID of container string id = 1; // ID of container
Checkpoint checkpoint = 2; // Checkpoint configuration Checkpoint checkpoint = 2; // Checkpoint configuration
string checkpointDir = 3; // Directory where checkpoints are stored
} }
message CreateCheckpointResponse { message CreateCheckpointResponse {
@ -108,6 +110,7 @@ message CreateCheckpointResponse {
message DeleteCheckpointRequest { message DeleteCheckpointRequest {
string id = 1; // ID of container string id = 1; // ID of container
string name = 2; // Name of checkpoint string name = 2; // Name of checkpoint
string checkpointDir = 3; // Directory where checkpoints are stored
} }
message DeleteCheckpointResponse { message DeleteCheckpointResponse {
@ -115,6 +118,7 @@ message DeleteCheckpointResponse {
message ListCheckpointRequest { message ListCheckpointRequest {
string id = 1; // ID of container string id = 1; // ID of container
string checkpointDir = 2; // Directory where checkpoints are stored
} }
message Checkpoint { message Checkpoint {

View file

@ -36,31 +36,32 @@ type checkpoint struct {
type processState struct { type processState struct {
specs.ProcessSpec specs.ProcessSpec
Exec bool `json:"exec"` Exec bool `json:"exec"`
Stdin string `json:"containerdStdin"` Stdin string `json:"containerdStdin"`
Stdout string `json:"containerdStdout"` Stdout string `json:"containerdStdout"`
Stderr string `json:"containerdStderr"` Stderr string `json:"containerdStderr"`
RuntimeArgs []string `json:"runtimeArgs"` RuntimeArgs []string `json:"runtimeArgs"`
NoPivotRoot bool `json:"noPivotRoot"` NoPivotRoot bool `json:"noPivotRoot"`
Checkpoint string `json:"checkpoint"` CheckpointPath string `json:"checkpoint"`
RootUID int `json:"rootUID"` RootUID int `json:"rootUID"`
RootGID int `json:"rootGID"` RootGID int `json:"rootGID"`
} }
type process struct { type process struct {
sync.WaitGroup sync.WaitGroup
id string id string
bundle string bundle string
stdio *stdio stdio *stdio
exec bool exec bool
containerPid int containerPid int
checkpoint *checkpoint checkpoint *checkpoint
shimIO *IO checkpointPath string
stdinCloser io.Closer shimIO *IO
console *os.File stdinCloser io.Closer
consolePath string console *os.File
state *processState consolePath string
runtime string state *processState
runtime string
} }
func newProcess(id, bundle, runtimeName string) (*process, error) { func newProcess(id, bundle, runtimeName string) (*process, error) {
@ -74,12 +75,13 @@ func newProcess(id, bundle, runtimeName string) (*process, error) {
return nil, err return nil, err
} }
p.state = s p.state = s
if s.Checkpoint != "" { if s.CheckpointPath != "" {
cpt, err := loadCheckpoint(bundle, s.Checkpoint) cpt, err := loadCheckpoint(s.CheckpointPath)
if err != nil { if err != nil {
return nil, err return nil, err
} }
p.checkpoint = cpt p.checkpoint = cpt
p.checkpointPath = s.CheckpointPath
} }
if err := p.openIO(); err != nil { if err := p.openIO(); err != nil {
return nil, err return nil, err
@ -100,8 +102,8 @@ func loadProcess() (*processState, error) {
return &s, nil return &s, nil
} }
func loadCheckpoint(bundle, name string) (*checkpoint, error) { func loadCheckpoint(checkpointPath string) (*checkpoint, error) {
f, err := os.Open(filepath.Join(bundle, "checkpoints", name, "config.json")) f, err := os.Open(filepath.Join(checkpointPath, "config.json"))
if err != nil { if err != nil {
return nil, err return nil, err
} }
@ -130,7 +132,7 @@ func (p *process) start() error {
) )
} else if p.checkpoint != nil { } else if p.checkpoint != nil {
args = append(args, "restore", args = append(args, "restore",
"--image-path", filepath.Join(p.bundle, "checkpoints", p.checkpoint.Name), "--image-path", filepath.Join(p.checkpointPath),
) )
add := func(flags ...string) { add := func(flags ...string) {
args = append(args, flags...) args = append(args, flags...)

View file

@ -35,6 +35,13 @@ var listCheckpointCommand = cli.Command{
Name: "list", Name: "list",
Usage: "list all checkpoints for a container", Usage: "list all checkpoints for a container",
Action: listCheckpoints, Action: listCheckpoints,
Flags: []cli.Flag{
cli.StringFlag{
Name: "checkpoint-dir",
Value: "",
Usage: "path to checkpoint directory",
},
},
} }
func listCheckpoints(context *cli.Context) { func listCheckpoints(context *cli.Context) {
@ -47,6 +54,7 @@ func listCheckpoints(context *cli.Context) {
} }
resp, err := c.ListCheckpoint(netcontext.Background(), &types.ListCheckpointRequest{ resp, err := c.ListCheckpoint(netcontext.Background(), &types.ListCheckpointRequest{
Id: id, Id: id,
CheckpointDir: context.String("checkpoint-dir"),
}) })
if err != nil { if err != nil {
fatal(err.Error(), 1) fatal(err.Error(), 1)
@ -81,6 +89,11 @@ var createCheckpointCommand = cli.Command{
Name: "shell", Name: "shell",
Usage: "checkpoint shell jobs", Usage: "checkpoint shell jobs",
}, },
cli.StringFlag{
Name: "checkpoint-dir",
Value: "",
Usage: "directory to store checkpoints",
},
}, },
Action: func(context *cli.Context) { Action: func(context *cli.Context) {
var ( var (
@ -96,6 +109,7 @@ var createCheckpointCommand = cli.Command{
c := getClient(context) c := getClient(context)
if _, err := c.CreateCheckpoint(netcontext.Background(), &types.CreateCheckpointRequest{ if _, err := c.CreateCheckpoint(netcontext.Background(), &types.CreateCheckpointRequest{
Id: containerID, Id: containerID,
CheckpointDir: context.String("checkpoint-dir"),
Checkpoint: &types.Checkpoint{ Checkpoint: &types.Checkpoint{
Name: name, Name: name,
Exit: context.Bool("exit"), Exit: context.Bool("exit"),
@ -112,6 +126,13 @@ var createCheckpointCommand = cli.Command{
var deleteCheckpointCommand = cli.Command{ var deleteCheckpointCommand = cli.Command{
Name: "delete", Name: "delete",
Usage: "delete a container's checkpoint", Usage: "delete a container's checkpoint",
Flags: []cli.Flag{
cli.StringFlag{
Name: "checkpoint-dir",
Value: "",
Usage: "path to checkpoint directory",
},
},
Action: func(context *cli.Context) { Action: func(context *cli.Context) {
var ( var (
containerID = context.Args().Get(0) containerID = context.Args().Get(0)
@ -125,8 +146,9 @@ var deleteCheckpointCommand = cli.Command{
} }
c := getClient(context) c := getClient(context)
if _, err := c.DeleteCheckpoint(netcontext.Background(), &types.DeleteCheckpointRequest{ if _, err := c.DeleteCheckpoint(netcontext.Background(), &types.DeleteCheckpointRequest{
Id: containerID, Id: containerID,
Name: name, Name: name,
CheckpointDir: context.String("checkpoint-dir"),
}); err != nil { }); err != nil {
fatal(err.Error(), 1) fatal(err.Error(), 1)
} }

View file

@ -134,6 +134,11 @@ var startCommand = cli.Command{
Value: "", Value: "",
Usage: "checkpoint to start the container from", Usage: "checkpoint to start the container from",
}, },
cli.StringFlag{
Name: "checkpoint-dir",
Value: "",
Usage: "path to checkpoint directory",
},
cli.BoolFlag{ cli.BoolFlag{
Name: "attach,a", Name: "attach,a",
Usage: "connect to the stdio of the container", Usage: "connect to the stdio of the container",
@ -177,14 +182,15 @@ var startCommand = cli.Command{
tty bool tty bool
c = getClient(context) c = getClient(context)
r = &types.CreateContainerRequest{ r = &types.CreateContainerRequest{
Id: id, Id: id,
BundlePath: bpath, BundlePath: bpath,
Checkpoint: context.String("checkpoint"), Checkpoint: context.String("checkpoint"),
Stdin: s.stdin, CheckpointDir: context.String("checkpoint-dir"),
Stdout: s.stdout, Stdin: s.stdin,
Stderr: s.stderr, Stdout: s.stdout,
Labels: context.StringSlice("label"), Stderr: s.stderr,
NoPivotRoot: context.Bool("no-pivot"), Labels: context.StringSlice("label"),
NoPivotRoot: context.Bool("no-pivot"),
} }
) )
restoreAndCloseStdin = func() { restoreAndCloseStdin = func() {

View file

@ -22,7 +22,7 @@ type Container interface {
// Path returns the path to the bundle // Path returns the path to the bundle
Path() string Path() string
// Start starts the init process of the container // Start starts the init process of the container
Start(checkpoint string, s Stdio) (Process, error) Start(checkpointPath string, s Stdio) (Process, error)
// Exec starts another process in an existing container // Exec starts another process in an existing container
Exec(string, specs.ProcessSpec, Stdio) (Process, error) Exec(string, specs.ProcessSpec, Stdio) (Process, error)
// Delete removes the container's state and any resources // Delete removes the container's state and any resources
@ -38,11 +38,11 @@ type Container interface {
// RemoveProcess removes the specified process from the container // RemoveProcess removes the specified process from the container
RemoveProcess(string) error RemoveProcess(string) error
// Checkpoints returns all the checkpoints for a container // Checkpoints returns all the checkpoints for a container
Checkpoints() ([]Checkpoint, error) Checkpoints(checkpointDir string) ([]Checkpoint, error)
// Checkpoint creates a new checkpoint // Checkpoint creates a new checkpoint
Checkpoint(Checkpoint) error Checkpoint(checkpoint Checkpoint, checkpointDir string) error
// DeleteCheckpoint deletes the checkpoint for the provided name // DeleteCheckpoint deletes the checkpoint for the provided name
DeleteCheckpoint(name string) error DeleteCheckpoint(name string, checkpointDir string) error
// Labels are user provided labels for the container // Labels are user provided labels for the container
Labels() []string Labels() []string
// Pids returns all pids inside the container // Pids returns all pids inside the container
@ -290,8 +290,12 @@ func (c *container) Resume() error {
return nil return nil
} }
func (c *container) Checkpoints() ([]Checkpoint, error) { func (c *container) Checkpoints(checkpointDir string) ([]Checkpoint, error) {
dirs, err := ioutil.ReadDir(filepath.Join(c.bundle, "checkpoints")) if checkpointDir == "" {
checkpointDir = filepath.Join(c.bundle, "checkpoints")
}
dirs, err := ioutil.ReadDir(checkpointDir)
if err != nil { if err != nil {
return nil, err return nil, err
} }
@ -300,7 +304,7 @@ func (c *container) Checkpoints() ([]Checkpoint, error) {
if !d.IsDir() { if !d.IsDir() {
continue continue
} }
path := filepath.Join(c.bundle, "checkpoints", d.Name(), "config.json") path := filepath.Join(checkpointDir, d.Name(), "config.json")
data, err := ioutil.ReadFile(path) data, err := ioutil.ReadFile(path)
if err != nil { if err != nil {
return nil, err return nil, err
@ -314,11 +318,16 @@ func (c *container) Checkpoints() ([]Checkpoint, error) {
return out, nil return out, nil
} }
func (c *container) Checkpoint(cpt Checkpoint) error { func (c *container) Checkpoint(cpt Checkpoint, checkpointDir string) error {
if err := os.MkdirAll(filepath.Join(c.bundle, "checkpoints"), 0755); err != nil { if checkpointDir == "" {
checkpointDir = filepath.Join(c.bundle, "checkpoints")
}
if err := os.MkdirAll(checkpointDir, 0755); err != nil {
return err return err
} }
path := filepath.Join(c.bundle, "checkpoints", cpt.Name)
path := filepath.Join(checkpointDir, cpt.Name)
if err := os.Mkdir(path, 0755); err != nil { if err := os.Mkdir(path, 0755); err != nil {
return err return err
} }
@ -360,11 +369,14 @@ func (c *container) Checkpoint(cpt Checkpoint) error {
return err return err
} }
func (c *container) DeleteCheckpoint(name string) error { func (c *container) DeleteCheckpoint(name string, checkpointDir string) error {
return os.RemoveAll(filepath.Join(c.bundle, "checkpoints", name)) if checkpointDir == "" {
checkpointDir = filepath.Join(c.bundle, "checkpoints")
}
return os.RemoveAll(filepath.Join(checkpointDir, name))
} }
func (c *container) Start(checkpoint string, s Stdio) (Process, error) { func (c *container) Start(checkpointPath string, s Stdio) (Process, error) {
processRoot := filepath.Join(c.root, c.id, InitProcessID) processRoot := filepath.Join(c.root, c.id, InitProcessID)
if err := os.Mkdir(processRoot, 0755); err != nil { if err := os.Mkdir(processRoot, 0755); err != nil {
return nil, err return nil, err
@ -381,7 +393,7 @@ func (c *container) Start(checkpoint string, s Stdio) (Process, error) {
return nil, err return nil, err
} }
config := &processConfig{ config := &processConfig{
checkpoint: checkpoint, checkpoint: checkpointPath,
root: processRoot, root: processRoot,
id: InitProcessID, id: InitProcessID,
c: c, c: c,

View file

@ -6,8 +6,9 @@ import "github.com/docker/containerd/runtime"
type CreateCheckpointTask struct { type CreateCheckpointTask struct {
baseTask baseTask
ID string ID string
Checkpoint *runtime.Checkpoint CheckpointDir string
Checkpoint *runtime.Checkpoint
} }
func (s *Supervisor) createCheckpoint(t *CreateCheckpointTask) error { func (s *Supervisor) createCheckpoint(t *CreateCheckpointTask) error {
@ -15,13 +16,14 @@ func (s *Supervisor) createCheckpoint(t *CreateCheckpointTask) error {
if !ok { if !ok {
return ErrContainerNotFound return ErrContainerNotFound
} }
return i.container.Checkpoint(*t.Checkpoint) return i.container.Checkpoint(*t.Checkpoint, t.CheckpointDir)
} }
type DeleteCheckpointTask struct { type DeleteCheckpointTask struct {
baseTask baseTask
ID string ID string
Checkpoint *runtime.Checkpoint CheckpointDir string
Checkpoint *runtime.Checkpoint
} }
func (s *Supervisor) deleteCheckpoint(t *DeleteCheckpointTask) error { func (s *Supervisor) deleteCheckpoint(t *DeleteCheckpointTask) error {
@ -29,5 +31,5 @@ func (s *Supervisor) deleteCheckpoint(t *DeleteCheckpointTask) error {
if !ok { if !ok {
return ErrContainerNotFound return ErrContainerNotFound
} }
return i.container.DeleteCheckpoint(t.Checkpoint.Name) return i.container.DeleteCheckpoint(t.Checkpoint.Name, t.CheckpointDir)
} }

View file

@ -1,6 +1,7 @@
package supervisor package supervisor
import ( import (
"path/filepath"
"time" "time"
"github.com/docker/containerd/runtime" "github.com/docker/containerd/runtime"
@ -17,6 +18,7 @@ type StartTask struct {
Labels []string Labels []string
NoPivotRoot bool NoPivotRoot bool
Checkpoint *runtime.Checkpoint Checkpoint *runtime.Checkpoint
CheckpointDir string
Runtime string Runtime string
RuntimeArgs []string RuntimeArgs []string
} }
@ -56,7 +58,7 @@ func (s *Supervisor) start(t *StartTask) error {
Stderr: t.Stderr, Stderr: t.Stderr,
} }
if t.Checkpoint != nil { if t.Checkpoint != nil {
task.Checkpoint = t.Checkpoint.Name task.CheckpointPath = filepath.Join(t.CheckpointDir, t.Checkpoint.Name)
} }
s.startTasks <- task s.startTasks <- task

View file

@ -13,13 +13,13 @@ type Worker interface {
} }
type startTask struct { type startTask struct {
Container runtime.Container Container runtime.Container
Checkpoint string CheckpointPath string
Stdin string Stdin string
Stdout string Stdout string
Stderr string Stderr string
Err chan error Err chan error
StartResponse chan StartResponse StartResponse chan StartResponse
} }
func NewWorker(s *Supervisor, wg *sync.WaitGroup) Worker { func NewWorker(s *Supervisor, wg *sync.WaitGroup) Worker {
@ -38,7 +38,7 @@ func (w *worker) Start() {
defer w.wg.Done() defer w.wg.Done()
for t := range w.s.startTasks { for t := range w.s.startTasks {
started := time.Now() started := time.Now()
process, err := t.Container.Start(t.Checkpoint, runtime.NewStdio(t.Stdin, t.Stdout, t.Stderr)) process, err := t.Container.Start(t.CheckpointPath, runtime.NewStdio(t.Stdin, t.Stdout, t.Stderr))
if err != nil { if err != nil {
logrus.WithFields(logrus.Fields{ logrus.WithFields(logrus.Fields{
"error": err, "error": err,