From e7542142a808ba2cadddf78889b059ad150862da Mon Sep 17 00:00:00 2001 From: Michael Crosby Date: Wed, 20 May 2015 15:48:07 -0700 Subject: [PATCH] Remove logging for checkpoint code Signed-off-by: Michael Crosby --- container_linux.go | 15 +-------------- nsinit/utils.go | 2 +- 2 files changed, 2 insertions(+), 15 deletions(-) diff --git a/container_linux.go b/container_linux.go index 6b265bd7..215f35d3 100644 --- a/container_linux.go +++ b/container_linux.go @@ -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()) } diff --git a/nsinit/utils.go b/nsinit/utils.go index 87dcfa4a..7717d86c 100644 --- a/nsinit/utils.go +++ b/nsinit/utils.go @@ -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 })