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

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) ===
The DB record of the image source does not include the image type, this
needs to be instead retrieved from the image info itself.

Signed-off-by: Stéphane Graber <stgra...@ubuntu.com>
From 445a40afc38d1644e0e525666763c4e49a464a32 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?St=C3=A9phane=20Graber?= <stgra...@ubuntu.com>
Date: Mon, 30 Sep 2019 14:28:11 -0400
Subject: [PATCH] lxd/images: Fix image type during refresh
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

The DB record of the image source does not include the image type, this
needs to be instead retrieved from the image info itself.

Signed-off-by: Stéphane Graber <stgra...@ubuntu.com>
---
 lxd/images.go | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lxd/images.go b/lxd/images.go
index c48c7b65dc..28ec1797a5 100644
--- a/lxd/images.go
+++ b/lxd/images.go
@@ -1085,7 +1085,7 @@ func autoUpdateImage(d *Daemon, op *operations.Operation, 
id int, info *api.Imag
        // Update the image on each pool where it currently exists.
        hash := fingerprint
        for _, poolName := range poolNames {
-               newInfo, err := d.ImageDownload(op, source.Server, 
source.Protocol, source.Certificate, "", source.Alias, source.ImageType, false, 
true, poolName, false, project)
+               newInfo, err := d.ImageDownload(op, source.Server, 
source.Protocol, source.Certificate, "", source.Alias, info.Type, false, true, 
poolName, false, project)
 
                if err != nil {
                        logger.Error("Failed to update the image", 
log.Ctx{"err": err, "fp": fingerprint})
_______________________________________________
lxc-devel mailing list
lxc-devel@lists.linuxcontainers.org
http://lists.linuxcontainers.org/listinfo/lxc-devel

Reply via email to