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

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) ===
Should help with #7393

Signed-off-by: Free Ekanayaka <free.ekanay...@canonical.com>
From aaa6a4c9bcff74e314acc83b6bf9f73ebe8b25c0 Mon Sep 17 00:00:00 2001
From: Free Ekanayaka <free.ekanay...@canonical.com>
Date: Wed, 20 May 2020 11:29:05 +0100
Subject: [PATCH] lxd/operations: Improve error message when database insertion
 fails

Should help with #7393

Signed-off-by: Free Ekanayaka <free.ekanay...@canonical.com>
---
 lxd/operations/linux.go | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lxd/operations/linux.go b/lxd/operations/linux.go
index 5c74a33eea..10005a57ec 100644
--- a/lxd/operations/linux.go
+++ b/lxd/operations/linux.go
@@ -18,7 +18,7 @@ func registerDBOperation(op *Operation, opType 
db.OperationType) error {
                return err
        })
        if err != nil {
-               return errors.Wrapf(err, "failed to add Operation %s to 
database", op.id)
+               return errors.Wrapf(err, "failed to add %q Operation %s to 
database", opType.Description(), op.id)
        }
 
        return nil
_______________________________________________
lxc-devel mailing list
lxc-devel@lists.linuxcontainers.org
http://lists.linuxcontainers.org/listinfo/lxc-devel

Reply via email to