Don't check source exists with CreateMountpoint
Signed-off-by: shechenglong <shechenglong@xfusion.com>
This commit is contained in:
parent
a0366d4758
commit
644f041567
@ -0,0 +1,37 @@
|
|||||||
|
From a72294a6688d747dcfec8751c3e2616cad703a31 Mon Sep 17 00:00:00 2001
|
||||||
|
From: =?UTF-8?q?Pawe=C5=82=20Gronowski?= <pawel.gronowski@docker.com>
|
||||||
|
Date: Mon, 19 Feb 2024 15:16:07 +0100
|
||||||
|
Subject: [PATCH] mounts/validate: Don't check source exists with
|
||||||
|
CreateMountpoint
|
||||||
|
MIME-Version: 1.0
|
||||||
|
Content-Type: text/plain; charset=UTF-8
|
||||||
|
Content-Transfer-Encoding: 8bit
|
||||||
|
|
||||||
|
Don't error out when mount source doesn't exist and mounts has
|
||||||
|
`CreateMountpoint` option enabled.
|
||||||
|
|
||||||
|
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
|
||||||
|
(cherry picked from commit 05b883bdc836a2fd621452f58a2a2c02d253718c)
|
||||||
|
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
|
||||||
|
---
|
||||||
|
volume/mounts/linux_parser.go | 4 +++-
|
||||||
|
1 file changed, 3 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/volume/mounts/linux_parser.go b/volume/mounts/linux_parser.go
|
||||||
|
index 1b64c23935..e7e8ad80f3 100644
|
||||||
|
--- a/volume/mounts/linux_parser.go
|
||||||
|
+++ b/volume/mounts/linux_parser.go
|
||||||
|
@@ -85,7 +85,9 @@ func (p *linuxParser) validateMountConfigImpl(mnt *mount.Mount, validateBindSour
|
||||||
|
if err != nil {
|
||||||
|
return &errMountConfig{mnt, err}
|
||||||
|
}
|
||||||
|
- if !exists {
|
||||||
|
+
|
||||||
|
+ createMountpoint := mnt.BindOptions != nil && mnt.BindOptions.CreateMountpoint
|
||||||
|
+ if !exists && !createMountpoint {
|
||||||
|
return &errMountConfig{mnt, errBindSourceDoesNotExist(mnt.Source)}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
--
|
||||||
|
2.33.0
|
||||||
|
|
||||||
@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
Name: docker
|
Name: docker
|
||||||
Version: 25.0.3
|
Version: 25.0.3
|
||||||
Release: 17
|
Release: 18
|
||||||
Summary: The open-source application container engine
|
Summary: The open-source application container engine
|
||||||
License: ASL 2.0
|
License: ASL 2.0
|
||||||
URL: https://www.docker.com
|
URL: https://www.docker.com
|
||||||
@ -29,6 +29,7 @@ Patch0006: 0006-tini.c-a-function-declaration-without-a-prototype-is.patch
|
|||||||
Patch0007: 0007-fix-libnetwork-osl-test-TestAddRemoveInterface.patch
|
Patch0007: 0007-fix-libnetwork-osl-test-TestAddRemoveInterface.patch
|
||||||
Patch0008: 0008-api-omit-missing-Created-field-from-ImageInspect-res.patch
|
Patch0008: 0008-api-omit-missing-Created-field-from-ImageInspect-res.patch
|
||||||
Patch0009: 0009-integration-Add-container-output-utility.patch
|
Patch0009: 0009-integration-Add-container-output-utility.patch
|
||||||
|
Patch0010: 0010-mounts-validate-Don-t-check-source-exists-with-Creat.patch
|
||||||
Requires(meta): %{name}-engine = %{version}-%{release}
|
Requires(meta): %{name}-engine = %{version}-%{release}
|
||||||
Requires(meta): %{name}-client = %{version}-%{release}
|
Requires(meta): %{name}-client = %{version}-%{release}
|
||||||
|
|
||||||
@ -101,6 +102,7 @@ Docker client binary and related utilities
|
|||||||
%patch 0007 -p1
|
%patch 0007 -p1
|
||||||
%patch 0008 -p1
|
%patch 0008 -p1
|
||||||
%patch 0009 -p1
|
%patch 0009 -p1
|
||||||
|
%patch 0010 -p1
|
||||||
%setup -q -T -n %{_source_docker_init} -b 2
|
%setup -q -T -n %{_source_docker_init} -b 2
|
||||||
%patch 0006 -p1
|
%patch 0006 -p1
|
||||||
|
|
||||||
@ -205,6 +207,9 @@ fi
|
|||||||
%systemd_postun_with_restart docker.service
|
%systemd_postun_with_restart docker.service
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Fri Nov 08 2024 shechenglong <shechenglong@xfusion.com> - 25.0.3-18
|
||||||
|
- DESC: Don't check source exists with CreateMountpoint
|
||||||
|
|
||||||
* Fri Nov 08 2024 shechenglong <shechenglong@xfusion.com> - 25.0.3-17
|
* Fri Nov 08 2024 shechenglong <shechenglong@xfusion.com> - 25.0.3-17
|
||||||
- DESC: move group creation into pre section rather than post section
|
- DESC: move group creation into pre section rather than post section
|
||||||
change requires into meta dependency for its actual use
|
change requires into meta dependency for its actual use
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user