Fix cases where we are wrapping a nil error
Signed-off-by: shechenglong <shechenglong@xfusion.com>
This commit is contained in:
parent
770c015253
commit
e6804bf910
37
1016-Fix-cases-where-we-are-wrapping-a-nil-error.patch
Normal file
37
1016-Fix-cases-where-we-are-wrapping-a-nil-error.patch
Normal file
@ -0,0 +1,37 @@
|
||||
From e2e670299f83699094c28add5a4366749d9bd34c Mon Sep 17 00:00:00 2001
|
||||
From: Brian Goff <cpuguy83@gmail.com>
|
||||
Date: Mon, 1 Apr 2024 21:30:43 +0000
|
||||
Subject: Fix cases where we are wrapping a nil error
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
This was using `errors.Wrap` when there was no error to wrap, meanwhile
|
||||
we are supposed to be creating a new error.
|
||||
|
||||
Found this while investigating some log corruption issues and
|
||||
unexpectedly getting a nil reader and a nil error from `getTailReader`.
|
||||
|
||||
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
|
||||
(cherry picked from commit 0a48d26fbcb33a84da7f767c2a62cae362df9505)
|
||||
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
|
||||
---
|
||||
daemon/logger/local/read.go | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/daemon/logger/local/read.go b/daemon/logger/local/read.go
|
||||
index 6a0b166103..cb5f9f0cd3 100644
|
||||
--- a/daemon/logger/local/read.go
|
||||
+++ b/daemon/logger/local/read.go
|
||||
@@ -66,7 +66,7 @@ func getTailReader(ctx context.Context, r loggerutils.SizeReaderAt, req int) (io
|
||||
}
|
||||
|
||||
if msgLen != binary.BigEndian.Uint32(buf) {
|
||||
- return nil, 0, errdefs.DataLoss(errors.Wrap(err, "log message header and footer indicate different message sizes"))
|
||||
+ return nil, 0, errdefs.DataLoss(errors.New("log message header and footer indicate different message sizes"))
|
||||
}
|
||||
|
||||
found++
|
||||
--
|
||||
2.27.0
|
||||
|
||||
@ -7,7 +7,7 @@
|
||||
|
||||
Name: moby
|
||||
Version: 25.0.3
|
||||
Release: 27
|
||||
Release: 28
|
||||
Summary: The open-source application container engine
|
||||
License: Apache-2.0
|
||||
URL: https://www.docker.com
|
||||
@ -39,6 +39,7 @@ Patch1012: 1012-fix-CVE-2024-36623.patch
|
||||
Patch1013: 1013-Don-t-enforce-new-validation-rules-for-existing-netw.patch
|
||||
Patch1014: 1014-daemon-overlay2-remove-world-writable-permission-fro.patch
|
||||
Patch1015: 1015-rootless-fix-open-etc-docker-plugins-permission-deni.patch
|
||||
Patch1016: 1016-Fix-cases-where-we-are-wrapping-a-nil-error.patch
|
||||
# Patch 2001-2999 for tini
|
||||
Patch2001: 2001-tini.c-a-function-declaration-without-a-prototype-is.patch
|
||||
Requires(meta): %{name}-engine = %{version}-%{release}
|
||||
@ -230,6 +231,9 @@ fi
|
||||
%systemd_postun_with_restart docker.service
|
||||
|
||||
%changelog
|
||||
* Sat Apr 19 2025 shechenglong <shechenglong@xfusion.com> - 25.0.3-28
|
||||
- rootless: Fix cases where we are wrapping a nil error
|
||||
|
||||
* Thu Apr 17 2025 shechenglong <shechenglong@xfusion.com> - 25.0.3-27
|
||||
- rootless: fix `open /etc/docker/plugins: permission denied`
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user