The following pull request was submitted through Github.
It can be accessed and reviewed at: https://github.com/lxc/lxd/pull/8213

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) ===
Fixes issue introduced by github.com/lxc/lxd/pull/8199

Signed-off-by: Thomas Parrott <thomas.parr...@canonical.com>
From b34e3792dea0f790695a42448d464bd8eb1304b4 Mon Sep 17 00:00:00 2001
From: Thomas Parrott <thomas.parr...@canonical.com>
Date: Fri, 4 Dec 2020 09:07:01 +0000
Subject: [PATCH] lxd/instance/drivers: Fixes instanceType in instance logger

Signed-off-by: Thomas Parrott <thomas.parr...@canonical.com>
---
 lxd/instance/drivers/driver_lxc.go  | 4 ++--
 lxd/instance/drivers/driver_qemu.go | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/lxd/instance/drivers/driver_lxc.go 
b/lxd/instance/drivers/driver_lxc.go
index 7ce44fec2b..9b1f3dd757 100644
--- a/lxd/instance/drivers/driver_lxc.go
+++ b/lxd/instance/drivers/driver_lxc.go
@@ -155,7 +155,7 @@ func lxcCreate(s *state.State, args db.InstanceArgs) 
(instance.Instance, error)
                        lastUsedDate: args.LastUsedDate,
                        localConfig:  args.Config,
                        localDevices: args.Devices,
-                       logger:       logging.AddContext(logger.Log, 
log.Ctx{"instanceType": args.Type.String, "instance": args.Name, "project": 
args.Project}),
+                       logger:       logging.AddContext(logger.Log, 
log.Ctx{"instanceType": args.Type, "instance": args.Name, "project": 
args.Project}),
                        name:         args.Name,
                        node:         args.Node,
                        profiles:     args.Profiles,
@@ -375,7 +375,7 @@ func lxcInstantiate(s *state.State, args db.InstanceArgs, 
expandedDevices device
                        lastUsedDate: args.LastUsedDate,
                        localConfig:  args.Config,
                        localDevices: args.Devices,
-                       logger:       logging.AddContext(logger.Log, 
log.Ctx{"instanceType": args.Type.String, "instance": args.Name, "project": 
args.Project}),
+                       logger:       logging.AddContext(logger.Log, 
log.Ctx{"instanceType": args.Type, "instance": args.Name, "project": 
args.Project}),
                        name:         args.Name,
                        node:         args.Node,
                        profiles:     args.Profiles,
diff --git a/lxd/instance/drivers/driver_qemu.go 
b/lxd/instance/drivers/driver_qemu.go
index c2f9c04b44..8a5add66c5 100644
--- a/lxd/instance/drivers/driver_qemu.go
+++ b/lxd/instance/drivers/driver_qemu.go
@@ -113,7 +113,7 @@ func qemuInstantiate(s *state.State, args db.InstanceArgs, 
expandedDevices devic
                        lastUsedDate: args.LastUsedDate,
                        localConfig:  args.Config,
                        localDevices: args.Devices,
-                       logger:       logging.AddContext(logger.Log, 
log.Ctx{"instanceType": args.Type.String, "instance": args.Name, "project": 
args.Project}),
+                       logger:       logging.AddContext(logger.Log, 
log.Ctx{"instanceType": args.Type, "instance": args.Name, "project": 
args.Project}),
                        name:         args.Name,
                        node:         args.Node,
                        profiles:     args.Profiles,
@@ -167,7 +167,7 @@ func qemuCreate(s *state.State, args db.InstanceArgs) 
(instance.Instance, error)
                        lastUsedDate: args.LastUsedDate,
                        localConfig:  args.Config,
                        localDevices: args.Devices,
-                       logger:       logging.AddContext(logger.Log, 
log.Ctx{"instanceType": args.Type.String, "instance": args.Name, "project": 
args.Project}),
+                       logger:       logging.AddContext(logger.Log, 
log.Ctx{"instanceType": args.Type, "instance": args.Name, "project": 
args.Project}),
                        name:         args.Name,
                        node:         args.Node,
                        profiles:     args.Profiles,
_______________________________________________
lxc-devel mailing list
lxc-devel@lists.linuxcontainers.org
http://lists.linuxcontainers.org/listinfo/lxc-devel

Reply via email to