The following pull request was submitted through Github. It can be accessed and reviewed at: https://github.com/lxc/lxd/pull/7992
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 fixes a crash happening when all of those conditions are met: - Clustered environment - Image is downloaded using the LXD protocol - Source image is marked as private - Image was downloaded previously to the cluster - The server processing the download doesn't have the image Signed-off-by: Stéphane Graber <stgra...@ubuntu.com>
From fa9f3d3f4352d9c570e0ae97e41e2319297286d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Graber?= <stgra...@ubuntu.com> Date: Tue, 6 Oct 2020 15:40:43 -0400 Subject: [PATCH] lxd/images: Fix crash when no "info" struct MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This fixes a crash happening when all of those conditions are met: - Clustered environment - Image is downloaded using the LXD protocol - Source image is marked as private - Image was downloaded previously to the cluster - The server processing the download doesn't have the image Signed-off-by: Stéphane Graber <stgra...@ubuntu.com> --- lxd/daemon_images.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lxd/daemon_images.go b/lxd/daemon_images.go index d17e523d28..7e272a3a89 100644 --- a/lxd/daemon_images.go +++ b/lxd/daemon_images.go @@ -119,13 +119,13 @@ func (d *Daemon) ImageDownload(op *operations.Operation, server string, protocol if nodeAddress != "" { // The image is available from another node, let's try to import it. - err = instanceImageTransfer(d, project, info.Fingerprint, nodeAddress) + err = instanceImageTransfer(d, project, imgInfo.Fingerprint, nodeAddress) if err != nil { return nil, errors.Wrapf(err, "Failed transferring image") } // As the image record already exists in the project, just add the node ID to the image. - err = d.cluster.AddImageToLocalNode(project, info.Fingerprint) + err = d.cluster.AddImageToLocalNode(project, imgInfo.Fingerprint) if err != nil { return nil, errors.Wrapf(err, "Failed adding image to local node") }
_______________________________________________ lxc-devel mailing list lxc-devel@lists.linuxcontainers.org http://lists.linuxcontainers.org/listinfo/lxc-devel