[lxc-devel] [lxd/master] lxd/storage: Apply rename template

stgraber on Github lxc-bot at linuxcontainers.org
Fri Nov 13 15:18:54 UTC 2020


A non-text attachment was scrubbed...
Name: not available
Type: text/x-mailbox
Size: 354 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20201113/5af53bf1/attachment.bin>
-------------- next part --------------
From 62ddd106c7c439f1da44846a175363e91ee10cd7 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?St=C3=A9phane=20Graber?= <stgraber at ubuntu.com>
Date: Fri, 13 Nov 2020 10:18:24 -0500
Subject: [PATCH] lxd/storage: Apply rename template
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Signed-off-by: Stéphane Graber <stgraber at ubuntu.com>
---
 lxd/storage/backend_lxd.go | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/lxd/storage/backend_lxd.go b/lxd/storage/backend_lxd.go
index 37662b9bd4..c3cb209740 100644
--- a/lxd/storage/backend_lxd.go
+++ b/lxd/storage/backend_lxd.go
@@ -1307,6 +1307,11 @@ func (b *lxdBackend) RenameInstance(inst instance.Instance, newName string, op *
 		}
 	}
 
+	err = inst.DeferTemplateApply("rename")
+	if err != nil {
+		return err
+	}
+
 	revert.Success()
 	return nil
 }


More information about the lxc-devel mailing list