[lxc-devel] [lxd/master] clarifications about "Error: Missing LXD-Image-Hash header"

emil-perhinschi on Github lxc-bot at linuxcontainers.org
Wed Jul 22 19:01:39 UTC 2020


A non-text attachment was scrubbed...
Name: not available
Type: text/x-mailbox
Size: 436 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20200722/b099dbcb/attachment.bin>
-------------- next part --------------
From 269484d7569de3bb29d124b5af1d5255162a9292 Mon Sep 17 00:00:00 2001
From: Emil Nicolaie Perhinschi <eperhinschi at symmetryinvestments.com>
Date: Wed, 22 Jul 2020 21:58:11 +0300
Subject: [PATCH] clarifications about "Error: Missing LXD-Image-Hash header"

---
 doc/image-handling.md | 4 +++-
 doc/rest-api.md       | 4 +++-
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/doc/image-handling.md b/doc/image-handling.md
index cf25fb02a9..9ad1fc9153 100644
--- a/doc/image-handling.md
+++ b/doc/image-handling.md
@@ -79,7 +79,9 @@ Tarball, can be compressed and contains:
  - `metadata.yaml`
  - `templates/` (optional)
 
-In this mode, the image identifier is the SHA-256 of the tarball.
+In this mode, the image identifier is the SHA-256 of the tarball. If the image 
+is hosted on a server, the server hosting the remote image should set the 
+LXD-Image-Hash header else the operation will fail with "Error: Missing LXD-Image-Hash header".
 
 ### Split tarballs
 Two (possibly compressed) tarballs. One for metadata, one for the rootfs.
diff --git a/doc/rest-api.md b/doc/rest-api.md
index 1444de1ba0..cb42de5f7f 100644
--- a/doc/rest-api.md
+++ b/doc/rest-api.md
@@ -1835,7 +1835,9 @@ In the remote image URL case, the following dict must be used:
 
 After the input is received by LXD, a background operation is started
 which will add the image to the store and possibly do some backend
-filesystem-specific optimizations.
+filesystem-specific optimizations. The server hosting the remote image 
+should set the LXD-Image-Hash header else the operation will fail with 
+"Error: Missing LXD-Image-Hash header".
 
 ### `/1.0/images/<fingerprint>`
 #### GET (optional `?secret=SECRET`)


More information about the lxc-devel mailing list