Remove logging for checkpoint code
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
This commit is contained in:
parent
5f6ea0e8a4
commit
e7542142a8
|
@ -388,11 +388,8 @@ func (c *linuxContainer) Checkpoint(criuOpts *CriuOpts) error {
|
|||
|
||||
err = c.criuSwrk(nil, &req, criuOpts)
|
||||
if err != nil {
|
||||
log.Errorf(filepath.Join(criuOpts.WorkDirectory, "dump.log"))
|
||||
return err
|
||||
}
|
||||
|
||||
log.Info("Checkpointed")
|
||||
return nil
|
||||
}
|
||||
|
||||
|
@ -446,7 +443,6 @@ func (c *linuxContainer) Restore(process *Process, criuOpts *CriuOpts) error {
|
|||
|
||||
err = syscall.Mount(c.config.Rootfs, root, "", syscall.MS_BIND|syscall.MS_REC, "")
|
||||
if err != nil {
|
||||
log.Error(err)
|
||||
return err
|
||||
}
|
||||
defer syscall.Unmount(root, syscall.MNT_DETACH)
|
||||
|
@ -519,11 +515,8 @@ func (c *linuxContainer) Restore(process *Process, criuOpts *CriuOpts) error {
|
|||
|
||||
err = c.criuSwrk(process, &req, criuOpts)
|
||||
if err != nil {
|
||||
log.Errorf(filepath.Join(criuOpts.WorkDirectory, "restore.log"))
|
||||
return err
|
||||
}
|
||||
|
||||
log.Info("Restored")
|
||||
return nil
|
||||
}
|
||||
|
||||
|
@ -533,9 +526,6 @@ func (c *linuxContainer) criuSwrk(process *Process, req *criurpc.CriuReq, opts *
|
|||
return err
|
||||
}
|
||||
|
||||
stringOpts, _ := json.Marshal(*req.Opts)
|
||||
log.Debugf("stringOpts: %s", stringOpts)
|
||||
|
||||
criuClient := os.NewFile(uintptr(fds[0]), "criu-transport-client")
|
||||
criuServer := os.NewFile(uintptr(fds[1]), "criu-transport-server")
|
||||
defer criuClient.Close()
|
||||
|
@ -557,11 +547,10 @@ func (c *linuxContainer) criuSwrk(process *Process, req *criurpc.CriuReq, opts *
|
|||
|
||||
defer func() {
|
||||
criuClient.Close()
|
||||
st, err := cmd.Process.Wait()
|
||||
_, err := cmd.Process.Wait()
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
log.Warn(st.String())
|
||||
}()
|
||||
|
||||
var extFds []string
|
||||
|
@ -599,8 +588,6 @@ func (c *linuxContainer) criuSwrk(process *Process, req *criurpc.CriuReq, opts *
|
|||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
log.Debug(resp.String())
|
||||
if !resp.GetSuccess() {
|
||||
return fmt.Errorf("criu failed: type %s errno %d", req.GetType().String(), resp.GetCrErrno())
|
||||
}
|
||||
|
|
|
@ -46,7 +46,7 @@ func loadFactory(context *cli.Context) (libcontainer.Factory, error) {
|
|||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return libcontainer.New(abs, libcontainer.Cgroupfs, func(l *libcontainer.LinuxFactory) error {
|
||||
return libcontainer.New(abs, cgm, func(l *libcontainer.LinuxFactory) error {
|
||||
l.CriuPath = context.GlobalString("criu")
|
||||
return nil
|
||||
})
|
||||
|
|
Loading…
Reference in New Issue