[lxc-devel] [lxd/master] networks/utils: Remove unused state.State from networkClearLease()

tomponline on Github lxc-bot at linuxcontainers.org
Thu Jul 4 16:11:28 UTC 2019


A non-text attachment was scrubbed...
Name: not available
Type: text/x-mailbox
Size: 361 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20190704/7d9f3f84/attachment.bin>
-------------- next part --------------
From c52869480c65b67075920e72b4cc762169f85450 Mon Sep 17 00:00:00 2001
From: Thomas Parrott <thomas.parrott at canonical.com>
Date: Thu, 4 Jul 2019 17:10:28 +0100
Subject: [PATCH] networks/utils: Remove unused state.State from
 networkClearLease()

Signed-off-by: Thomas Parrott <thomas.parrott at canonical.com>
---
 lxd/container_lxc.go  | 2 +-
 lxd/networks_utils.go | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/lxd/container_lxc.go b/lxd/container_lxc.go
index d739e7523c..a3e7106d55 100644
--- a/lxd/container_lxc.go
+++ b/lxd/container_lxc.go
@@ -4380,7 +4380,7 @@ func (c *containerLXC) Delete() error {
 				continue
 			}
 
-			err = networkClearLease(c.state, c.name, m["parent"], m["hwaddr"])
+			err = networkClearLease(c.name, m["parent"], m["hwaddr"])
 			if err != nil {
 				logger.Error("Failed to delete DHCP lease", log.Ctx{"name": c.Name(), "err": err, "device": k, "hwaddr": m["hwaddr"]})
 			}
diff --git a/lxd/networks_utils.go b/lxd/networks_utils.go
index fd25fd75f1..d94b63d17e 100644
--- a/lxd/networks_utils.go
+++ b/lxd/networks_utils.go
@@ -1568,7 +1568,7 @@ func networkGetMacSlice(hwaddr string) []string {
 	return buf
 }
 
-func networkClearLease(s *state.State, name string, network string, hwaddr string) error {
+func networkClearLease(name string, network string, hwaddr string) error {
 	leaseFile := shared.VarPath("networks", network, "dnsmasq.leases")
 
 	// Check that we are in fact running a dnsmasq for the network


More information about the lxc-devel mailing list