The following pull request was submitted through Github. It can be accessed and reviewed at: https://github.com/lxc/lxd/pull/5442
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) === When importing a packed image, send 'fingerprint' and 'size' in metadata when an error occurs because the image already exists. Signed-off-by: Joel Hockey <joelhoc...@chromium.org>
From 0ed73c8a6fd08c2a83b2a58abbde404416c4b32b Mon Sep 17 00:00:00 2001 From: Joel Hockey <joelhoc...@chromium.org> Date: Tue, 29 Jan 2019 22:18:09 -0800 Subject: [PATCH] lxd: Send metadata in CreateImage error importing image When importing a packed image, send 'fingerprint' and 'size' in metadata when an error occurs because the image already exists. Signed-off-by: Joel Hockey <joelhoc...@chromium.org> --- lxd/images.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lxd/images.go b/lxd/images.go index 59dadf433a..8c4ecd0683 100644 --- a/lxd/images.go +++ b/lxd/images.go @@ -580,7 +580,7 @@ func getImgPostInfo(d *Daemon, r *http.Request, builddir string, project string, return nil, err } } else { - return nil, fmt.Errorf("Image with same fingerprint already exists") + return &info, fmt.Errorf("Image with same fingerprint already exists") } } else { // Create the database entry
_______________________________________________ lxc-devel mailing list lxc-devel@lists.linuxcontainers.org http://lists.linuxcontainers.org/listinfo/lxc-devel