Skip to content
This repository was archived by the owner on Dec 13, 2018. It is now read-only.

Commit e754214

Browse files
committed
Remove logging for checkpoint code
Signed-off-by: Michael Crosby <[email protected]>
1 parent 5f6ea0e commit e754214

File tree

2 files changed

+2
-15
lines changed

2 files changed

+2
-15
lines changed

Diff for: container_linux.go

+1-14
Original file line numberDiff line numberDiff line change
@@ -388,11 +388,8 @@ func (c *linuxContainer) Checkpoint(criuOpts *CriuOpts) error {
388388

389389
err = c.criuSwrk(nil, &req, criuOpts)
390390
if err != nil {
391-
log.Errorf(filepath.Join(criuOpts.WorkDirectory, "dump.log"))
392391
return err
393392
}
394-
395-
log.Info("Checkpointed")
396393
return nil
397394
}
398395

@@ -446,7 +443,6 @@ func (c *linuxContainer) Restore(process *Process, criuOpts *CriuOpts) error {
446443

447444
err = syscall.Mount(c.config.Rootfs, root, "", syscall.MS_BIND|syscall.MS_REC, "")
448445
if err != nil {
449-
log.Error(err)
450446
return err
451447
}
452448
defer syscall.Unmount(root, syscall.MNT_DETACH)
@@ -519,11 +515,8 @@ func (c *linuxContainer) Restore(process *Process, criuOpts *CriuOpts) error {
519515

520516
err = c.criuSwrk(process, &req, criuOpts)
521517
if err != nil {
522-
log.Errorf(filepath.Join(criuOpts.WorkDirectory, "restore.log"))
523518
return err
524519
}
525-
526-
log.Info("Restored")
527520
return nil
528521
}
529522

@@ -533,9 +526,6 @@ func (c *linuxContainer) criuSwrk(process *Process, req *criurpc.CriuReq, opts *
533526
return err
534527
}
535528

536-
stringOpts, _ := json.Marshal(*req.Opts)
537-
log.Debugf("stringOpts: %s", stringOpts)
538-
539529
criuClient := os.NewFile(uintptr(fds[0]), "criu-transport-client")
540530
criuServer := os.NewFile(uintptr(fds[1]), "criu-transport-server")
541531
defer criuClient.Close()
@@ -557,11 +547,10 @@ func (c *linuxContainer) criuSwrk(process *Process, req *criurpc.CriuReq, opts *
557547

558548
defer func() {
559549
criuClient.Close()
560-
st, err := cmd.Process.Wait()
550+
_, err := cmd.Process.Wait()
561551
if err != nil {
562552
return
563553
}
564-
log.Warn(st.String())
565554
}()
566555

567556
var extFds []string
@@ -599,8 +588,6 @@ func (c *linuxContainer) criuSwrk(process *Process, req *criurpc.CriuReq, opts *
599588
if err != nil {
600589
return err
601590
}
602-
603-
log.Debug(resp.String())
604591
if !resp.GetSuccess() {
605592
return fmt.Errorf("criu failed: type %s errno %d", req.GetType().String(), resp.GetCrErrno())
606593
}

Diff for: nsinit/utils.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ func loadFactory(context *cli.Context) (libcontainer.Factory, error) {
4646
if err != nil {
4747
return nil, err
4848
}
49-
return libcontainer.New(abs, libcontainer.Cgroupfs, func(l *libcontainer.LinuxFactory) error {
49+
return libcontainer.New(abs, cgm, func(l *libcontainer.LinuxFactory) error {
5050
l.CriuPath = context.GlobalString("criu")
5151
return nil
5252
})

0 commit comments

Comments
 (0)