The following pull request was submitted through Github.
It can be accessed and reviewed at: https://github.com/lxc/lxd/pull/3385

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) ===
Signed-off-by: Christian Brauner <[email protected]>
From da0a812a7daeeafde1ccac16a6d86d3da4d1aab4 Mon Sep 17 00:00:00 2001
From: Christian Brauner <[email protected]>
Date: Tue, 6 Jun 2017 01:24:42 +0200
Subject: [PATCH] dir: create symlink on freeze failure

Signed-off-by: Christian Brauner <[email protected]>
---
 lxd/storage_dir.go | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lxd/storage_dir.go b/lxd/storage_dir.go
index c8132a115..691390b41 100644
--- a/lxd/storage_dir.go
+++ b/lxd/storage_dir.go
@@ -607,7 +607,7 @@ func (s *storageDir) 
ContainerSnapshotCreate(snapshotContainer container, source
                err := sourceContainer.Freeze()
                if err != nil {
                        logger.Errorf("Trying to freeze and rsync again 
failed.")
-                       return nil
+                       goto onSuccess
                }
 
                err = rsync(snapshotContainer, sourceContainerMntPoint, 
targetContainerMntPoint, bwlimit)
@@ -618,6 +618,7 @@ func (s *storageDir) 
ContainerSnapshotCreate(snapshotContainer container, source
                defer sourceContainer.Unfreeze()
        }
 
+onSuccess:
        // Check if the symlink
        // ${LXD_DIR}/snapshots/<source_container_name> -> 
${POOL_PATH}/snapshots/<source_container_name>
        // exists and if not create it.
_______________________________________________
lxc-devel mailing list
[email protected]
http://lists.linuxcontainers.org/listinfo/lxc-devel

Reply via email to