[prev in list] [next in list] [prev in thread] [next in thread]
List: lxc-devel
Subject: [lxc-devel] [lxd/master] lxd/dnsmasq: Don't fail file deletion if missing
From: stgraber on Github <lxc-bot () linuxcontainers ! org>
Date: 2019-07-31 18:17:34
Message-ID: 5d41db3e.1c69fb81.d460b.7196SMTPIN_ADDED_MISSING () mx ! google ! com
[Download RAW message or body]
[Attachment #2 (text/x-mailbox)]
The following pull request was submitted through Github.
It can be accessed and reviewed at: https://github.com/lxc/lxd/pull/6031
This e-mail was sent by the LXC bot, direct replies will not reach the author
unless they happen to be subscribed to this list.
=== Description (from pull-request) ===
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
[Attachment #3 (text/plain)]
From dd36fbe036639503ae646b24b2a6ab14e6828c82 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stéphane Graber?= <stgraber@ubuntu.com>
Date: Wed, 31 Jul 2019 14:17:16 -0400
Subject: [PATCH] lxd/dnsmasq: Don't fail file deletion if missing
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
---
lxd/dnsmasq/dnsmasq.go | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lxd/dnsmasq/dnsmasq.go b/lxd/dnsmasq/dnsmasq.go
index e5bf9fb5b4..b173bba61e 100644
--- a/lxd/dnsmasq/dnsmasq.go
+++ b/lxd/dnsmasq/dnsmasq.go
@@ -62,7 +62,7 @@ func UpdateStaticEntry(network string, projectName string, \
instanceName string, // RemoveStaticEntry removes a single dhcp-host line for a \
network/instance combination. func RemoveStaticEntry(network string, projectName \
string, instanceName string) error { err := os.Remove(shared.VarPath("networks", \
network, "dnsmasq.hosts", project.Prefix(projectName, instanceName)))
- if err != nil {
+ if err != nil && !os.IsNotExist(err) {
return err
}
[Attachment #4 (text/plain)]
_______________________________________________
lxc-devel mailing list
lxc-devel@lists.linuxcontainers.org
http://lists.linuxcontainers.org/listinfo/lxc-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic