Merge pull request #5229 from wzshiming/fix/log-cp-file

Fix error log when copy file
This commit is contained in:
Derek McGowan 2021-03-19 10:51:23 -07:00 committed by GitHub
commit 0d569f8f4a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -441,7 +441,7 @@ func (p *Init) checkpoint(ctx context.Context, r *CheckpointConfig) error {
}, actions...); err != nil {
dumpLog := filepath.Join(p.Bundle, "criu-dump.log")
if cerr := copyFile(dumpLog, filepath.Join(work, "dump.log")); cerr != nil {
log.G(ctx).Error(err)
log.G(ctx).WithError(cerr).Error("failed to copy dump.log to criu-dump.log")
}
return fmt.Errorf("%s path= %s", criuError(err), dumpLog)
}