[lxc-devel] [lxd/master] dir: delete image from database

brauner on Github lxc-bot at linuxcontainers.org
Tue Feb 21 00:12:21 UTC 2017


A non-text attachment was scrubbed...
Name: not available
Type: text/x-mailbox
Size: 364 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20170221/571f5ba2/attachment.bin>
-------------- next part --------------
From a9b7f0be96813205c06fa0d9218d18c489484548 Mon Sep 17 00:00:00 2001
From: Christian Brauner <christian.brauner at ubuntu.com>
Date: Tue, 21 Feb 2017 01:10:56 +0100
Subject: [PATCH] dir: delete image from database

Signed-off-by: Christian Brauner <christian.brauner at ubuntu.com>
---
 lxd/storage_dir.go | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/lxd/storage_dir.go b/lxd/storage_dir.go
index 96d3e54..453ebbe 100644
--- a/lxd/storage_dir.go
+++ b/lxd/storage_dir.go
@@ -635,6 +635,11 @@ func (s *storageDir) ImageCreate(fingerprint string) error {
 }
 
 func (s *storageDir) ImageDelete(fingerprint string) error {
+	err := s.deleteImageDbPoolVolume(fingerprint)
+	if err != nil {
+		return err
+	}
+
 	return nil
 }
 


More information about the lxc-devel mailing list