[lxc-devel] [lxc/master] commands: don't flood logs

brauner on Github lxc-bot at linuxcontainers.org
Thu Jun 25 14:32:50 UTC 2020


A non-text attachment was scrubbed...
Name: not available
Type: text/x-mailbox
Size: 470 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20200625/929a9d6a/attachment.bin>
-------------- next part --------------
From 769b88ea067422b689fe2e1d4d91c96a6810d349 Mon Sep 17 00:00:00 2001
From: Christian Brauner <christian.brauner at ubuntu.com>
Date: Thu, 25 Jun 2020 16:30:09 +0200
Subject: [PATCH] commands: don't flood logs

We're ignoring commands that we don't know about. They used to be fatal. Not
anymore.

Closes: #3459.
Signed-off-by: Christian Brauner <christian.brauner at ubuntu.com>
---
 src/lxc/commands.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/lxc/commands.c b/src/lxc/commands.c
index 4c21c752d1..d735b5ff6a 100644
--- a/src/lxc/commands.c
+++ b/src/lxc/commands.c
@@ -1508,7 +1508,7 @@ static int lxc_cmd_process(int fd, struct lxc_cmd_req *req,
 	};
 
 	if (req->cmd >= LXC_CMD_MAX)
-		return log_error_errno(-1, ENOENT, "Undefined command id %d", req->cmd);
+		return log_trace_errno(-1, EINVAL, "Invalid command id %d", req->cmd);
 
 	return cb[req->cmd](fd, req, handler, descr);
 }


More information about the lxc-devel mailing list