The following pull request was submitted through Github. It can be accessed and reviewed at: https://github.com/lxc/lxd/pull/5298
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) === Closes #5297 Signed-off-by: Stéphane Graber <stgra...@ubuntu.com>
From 08b527bc4088a2b0315b6f59ca19e62cd8df1097 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Graber?= <stgra...@ubuntu.com> Date: Wed, 21 Nov 2018 14:41:16 -0500 Subject: [PATCH] lxd/db: Avoid un-needed query on container move MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Closes #5297 Signed-off-by: Stéphane Graber <stgra...@ubuntu.com> --- lxd/db/containers.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lxd/db/containers.go b/lxd/db/containers.go index 0961f3c14a..512535fa52 100644 --- a/lxd/db/containers.go +++ b/lxd/db/containers.go @@ -441,6 +441,11 @@ func (c *ClusterTx) ContainerNodeMove(oldName, newName, newNode string) error { } } + // No need to update storage_volumes if the name is identical + if newName == oldName { + return nil + } + // Update the container's and snapshots' storage volume name (since this is ceph, // there's a clone of the volume for each node). count, err := c.NodesCount()
_______________________________________________ lxc-devel mailing list lxc-devel@lists.linuxcontainers.org http://lists.linuxcontainers.org/listinfo/lxc-devel