The following pull request was submitted through Github. It can be accessed and reviewed at: https://github.com/lxc/lxd/pull/3400
This e-mail was sent by the LXC bot, direct replies will not reach the author unless they happen to be subscribed to this list. === Description (from pull-request) === This ensures that we unfreeze the container even if rsync fails for some reason.
From 47ed6d9f378f74165f253f37d917c81179edcdf0 Mon Sep 17 00:00:00 2001 From: Leon Klingele <[email protected]> Date: Mon, 12 Jun 2017 18:23:09 +0200 Subject: [PATCH] dir: unfreeze on rsync error This ensures that we unfreeze the container even if rsync fails for some reason. --- lxd/storage_dir.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lxd/storage_dir.go b/lxd/storage_dir.go index 691390b41..2e801c55d 100644 --- a/lxd/storage_dir.go +++ b/lxd/storage_dir.go @@ -609,13 +609,12 @@ func (s *storageDir) ContainerSnapshotCreate(snapshotContainer container, source logger.Errorf("Trying to freeze and rsync again failed.") goto onSuccess } + defer sourceContainer.Unfreeze() err = rsync(snapshotContainer, sourceContainerMntPoint, targetContainerMntPoint, bwlimit) if err != nil { return err } - - defer sourceContainer.Unfreeze() } onSuccess:
_______________________________________________ lxc-devel mailing list [email protected] http://lists.linuxcontainers.org/listinfo/lxc-devel
