The following pull request was submitted through Github. It can be accessed and reviewed at: https://github.com/lxc/lxd/pull/3783
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 adc6d744b5849c5e9c075e65c54c3aab41ed5c73 Mon Sep 17 00:00:00 2001 From: Christian Brauner <[email protected]> Date: Thu, 7 Sep 2017 22:43:49 +0200 Subject: [PATCH] dir: use correct function Signed-off-by: Christian Brauner <[email protected]> --- lxd/storage_dir.go | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/lxd/storage_dir.go b/lxd/storage_dir.go index 656fc02ba..681cbfb31 100644 --- a/lxd/storage_dir.go +++ b/lxd/storage_dir.go @@ -789,14 +789,16 @@ func (s *storageDir) ContainerSnapshotCreateEmpty(snapshotContainer container) e // Check if the symlink // ${LXD_DIR}/snapshots/<source_container_name> -> ${POOL_PATH}/snapshots/<source_container_name> // exists and if not create it. - sourceContainerName, _, _ := containerGetParentAndSnapshotName(targetContainerName) - sourceContainerSymlink := shared.VarPath("snapshots", sourceContainerName) - sourceContainerSymlinkTarget := getSnapshotMountPoint(s.pool.Name, sourceContainerName) - if !shared.PathExists(sourceContainerSymlink) { - err := os.Symlink(sourceContainerSymlinkTarget, sourceContainerSymlink) - if err != nil { - return err - } + targetContainerMntPoint = getSnapshotMountPoint(s.pool.Name, + targetContainerName) + sourceName, _, _ := containerGetParentAndSnapshotName(targetContainerName) + snapshotMntPointSymlinkTarget := shared.VarPath("storage-pools", + s.pool.Name, "snapshots", sourceName) + snapshotMntPointSymlink := shared.VarPath("snapshots", sourceName) + err = createSnapshotMountpoint(targetContainerMntPoint, + snapshotMntPointSymlinkTarget, snapshotMntPointSymlink) + if err != nil { + return err } revert = false
_______________________________________________ lxc-devel mailing list [email protected] http://lists.linuxcontainers.org/listinfo/lxc-devel
