The following pull request was submitted through Github. It can be accessed and reviewed at: https://github.com/lxc/lxd/pull/7570
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 #7563 Signed-off-by: Stéphane Graber <stgra...@ubuntu.com>
From 406eff43a98c95621342f61645df12f142c455dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Graber?= <stgra...@ubuntu.com> Date: Mon, 22 Jun 2020 17:32:33 -0400 Subject: [PATCH] lxd/images: Set arch names when downloading MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Closes #7563 Signed-off-by: Stéphane Graber <stgra...@ubuntu.com> --- lxd/images.go | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/lxd/images.go b/lxd/images.go index 7e278ca1b5..cb38fb9dae 100644 --- a/lxd/images.go +++ b/lxd/images.go @@ -390,13 +390,17 @@ func imgPostURLInfo(d *Daemon, req api.ImagesPost, op *operations.Operation, pro return nil, err } - architecturesStr := []string{} - for _, arch := range d.os.Architectures { - architecturesStr = append(architecturesStr, fmt.Sprintf("%d", arch)) + architectures := []string{} + for _, architecture := range d.os.Architectures { + architectureName, err := osarch.ArchitectureName(architecture) + if err != nil { + return nil, err + } + architectures = append(architectures, architectureName) } head.Header.Set("User-Agent", version.UserAgent) - head.Header.Set("LXD-Server-Architectures", strings.Join(architecturesStr, ", ")) + head.Header.Set("LXD-Server-Architectures", strings.Join(architectures, ", ")) head.Header.Set("LXD-Server-Version", version.Version) raw, err := myhttp.Do(head)
_______________________________________________ lxc-devel mailing list lxc-devel@lists.linuxcontainers.org http://lists.linuxcontainers.org/listinfo/lxc-devel