[lxc-devel] [lxd/master] lxd/device/disk: Ignore ErrNotRunning for virtfs-proxy-helper

monstermunchkin on Github lxc-bot at linuxcontainers.org
Thu Nov 19 07:20:28 UTC 2020


A non-text attachment was scrubbed...
Name: not available
Type: text/x-mailbox
Size: 301 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20201118/0ff5aa03/attachment.bin>
-------------- next part --------------
From c91e2679b2c04544c20d82bec6942ffb31b17495 Mon Sep 17 00:00:00 2001
From: Thomas Hipp <thomas.hipp at canonical.com>
Date: Thu, 19 Nov 2020 08:17:18 +0100
Subject: [PATCH] lxd/device/disk: Ignore ErrNotRunning for virtfs-proxy-helper

This removes a useless error message when the virtfs-proxy-helper has
already been terminated.

Signed-off-by: Thomas Hipp <thomas.hipp at canonical.com>
---
 lxd/device/disk.go | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lxd/device/disk.go b/lxd/device/disk.go
index 8a763693b2..ada3f82160 100644
--- a/lxd/device/disk.go
+++ b/lxd/device/disk.go
@@ -1293,7 +1293,7 @@ func (d *disk) stopVM() (*deviceConfig.RunConfig, error) {
 		}
 
 		err = proc.Stop()
-		if err != nil {
+		if err != nil && err != subprocess.ErrNotRunning {
 			return &deviceConfig.RunConfig{}, err
 		}
 


More information about the lxc-devel mailing list