[lxc-devel] [lxd/master] networks: Update dnsmasq on container renames

stgraber on Github lxc-bot at linuxcontainers.org
Wed Sep 20 21:51:29 UTC 2017


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/20170920/131e7fd1/attachment.bin>
-------------- next part --------------
From bf2a221d1e8f7493dc8bb78cb7471966d1c34c5a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?St=C3=A9phane=20Graber?= <stgraber at ubuntu.com>
Date: Wed, 20 Sep 2017 17:50:53 -0400
Subject: [PATCH] networks: Update dnsmasq on container renames
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/container_lxc.go | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/lxd/container_lxc.go b/lxd/container_lxc.go
index a7fa9ba99..8ec835560 100644
--- a/lxd/container_lxc.go
+++ b/lxd/container_lxc.go
@@ -3013,6 +3013,9 @@ func (c *containerLXC) Rename(newName string) error {
 	// Invalidate the go-lxc cache
 	c.c = nil
 
+	// Update lease files
+	networkUpdateStatic(c.state, "")
+
 	logger.Info("Renamed container", ctxMap)
 
 	return nil


More information about the lxc-devel mailing list