From 80902d0929b2ac5f4a01a0bd2803704ffbf34d42 Mon Sep 17 00:00:00 2001 From: Ivan Shvedunov Date: Wed, 20 Feb 2019 15:46:13 +0300 Subject: [PATCH] Fix Virtlet crash upon killing both virtlet and qemu processes Don't store bogus File objects in the metadata db. --- pkg/network/csn.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkg/network/csn.go b/pkg/network/csn.go index d095d33eb..a89271dfd 100644 --- a/pkg/network/csn.go +++ b/pkg/network/csn.go @@ -42,7 +42,9 @@ type InterfaceDescription struct { // namespace or to control file in sysfs for sr-iov VF. // It may be nil if the interface was recovered after restarting Virtlet. // It's only needed during the initial VM startup. - Fo *os.File + // The json tag is here so that bogus File object doesn't get stored + // in the metadata db. + Fo *os.File `json:"-"` // Name contains original interface name for sr-iov interface. Name string // HardwareAddr contains original hardware address for CNI-created