From 18bb9bf11f85cdcc31dcbc068d46c3e39cf992d1 Mon Sep 17 00:00:00 2001 From: guojunding Date: Fri, 5 Jul 2024 16:51:45 +0800 Subject: [PATCH] Suppress noisy basic auth token deletion log --- ...-noisy-basic-auth-token-deletion-log.patch | 30 +++++++++++++++++++ etcd.spec | 7 ++++- 2 files changed, 36 insertions(+), 1 deletion(-) create mode 100644 0010-backport-Suppress-noisy-basic-auth-token-deletion-log.patch diff --git a/0010-backport-Suppress-noisy-basic-auth-token-deletion-log.patch b/0010-backport-Suppress-noisy-basic-auth-token-deletion-log.patch new file mode 100644 index 0000000..4ba9fcb --- /dev/null +++ b/0010-backport-Suppress-noisy-basic-auth-token-deletion-log.patch @@ -0,0 +1,30 @@ +From 0a960a272d46fa3c1d4929543efdfb673f47d37f Mon Sep 17 00:00:00 2001 +From: Ahmet Alp Balkan +Date: Fri, 28 Jun 2024 12:10:04 -0700 +Subject: [PATCH] Suppress noisy basic auth token deletion log + +Right now the basic auth tokens that are deleted after `--auth-token-ttl` +cause info-level logs to be emitted. Change this to debug. This helps with +the issue at #18244 where calling `/readyz` frequently pollutes the etcd server +logs with this log message. + +Fixes #18244. + +Signed-off-by: Ahmet Alp Balkan +--- + server/auth/simple_token.go | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/server/auth/simple_token.go b/server/auth/simple_token.go +index be706522a53..a657d9daefc 100644 +--- a/server/auth/simple_token.go ++++ b/server/auth/simple_token.go +@@ -167,7 +167,7 @@ func (t *tokenSimple) enable() { + + delf := func(tk string) { + if username, ok := t.simpleTokens[tk]; ok { +- t.lg.Info( ++ t.lg.Debug( + "deleted a simple token", + zap.String("user-name", username), + zap.String("token", tk), diff --git a/etcd.spec b/etcd.spec index e2e87be..c33a6f8 100644 --- a/etcd.spec +++ b/etcd.spec @@ -31,7 +31,7 @@ system.} %global gosupfiles integration/fixtures/* etcdserver/api/v2http/testdata/* Name: etcd -Release: 12 +Release: 13 Summary: Distributed reliable key-value store for the most critical data of a distributed system # Upstream license specification: Apache-2.0 @@ -53,6 +53,7 @@ Patch6: 0006-fix-CVE-2023-39325.patch Patch7: 0007-fix-CVE-2022-34038.patch Patch8: 0008-fix-CVE-2023-32082.patch Patch9: 0009-fix-CVE-2021-28235.patch +Patch10: 0010-backport-Suppress-noisy-basic-auth-token-deletion-log.patch BuildRequires: golang BuildRequires: python3-devel @@ -76,6 +77,7 @@ Requires(pre): shadow-utils %patch7 -p1 %patch8 -p1 %patch9 -p1 +%patch10 -p1 %ifarch sw_64 %patch3 -p1 %endif @@ -164,6 +166,9 @@ getent passwd %{name} >/dev/null || useradd -r -g %{name} -d %{_sharedstatedir}/ %endif %changelog +* Fri Jul 5 2024 guojunding - 3.4.14-13 +- Suppress noisy basic auth token deletion log + * Wed Apr 24 2024 zhangbowei - 3.4.14-12 - Type:bugfix - CVE:NA -- Gitee