Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add missing user-facing part to allow volume subpath mounts #22040

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Add tests for volume subpath mounts

6bbfcae
Select commit
Loading
Failed to load commit list.
Open

Add missing user-facing part to allow volume subpath mounts #22040

Add tests for volume subpath mounts
6bbfcae
Select commit
Loading
Failed to load commit list.
Cirrus CI / Build for fedora-38 failed Mar 16, 2024 in 8m 2s

Task Summary

Instruction postbuild failed in 00:45

Details

✅ 00:21 clone
✅ 00:45 prebuild
✅ 00:02 setup
✅ 06:03 main
❌ 00:45 postbuild

$SCRIPT_BASE/postbuild.sh
+ make .install.goimports  # ./contrib/cirrus/postbuild.sh:33 in main()
make -C test/tools build/goimports
make[1]: Entering directory '/var/tmp/go/src/github.com/containers/podman/test/tools'
go build -o build/goimports ./vendor/golang.org/x/tools/cmd/goimports
make[1]: Leaving directory '/var/tmp/go/src/github.com/containers/podman/test/tools'
+ make vendor  # ./contrib/cirrus/postbuild.sh:34 in main()
go mod tidy
go mod vendor
go mod verify
all modules verified
tree is dirty, please run 'make vendor' and commit all changes

 M vendor/github.com/containers/common/pkg/parse/parse.go

---------------------- Diff below ----------------------

diff --git a/vendor/github.com/containers/common/pkg/parse/parse.go b/vendor/github.com/containers/common/pkg/parse/parse.go
index 0c04c9d24..284751e52 100644
--- a/vendor/github.com/containers/common/pkg/parse/parse.go
+++ b/vendor/github.com/containers/common/pkg/parse/parse.go
@@ -14,7 +14,7 @@ import (
 
 // ValidateVolumeOpts validates a volume's options
 func ValidateVolumeOpts(options []string) ([]string, error) {
-	var foundRootPropagation, foundRWRO, foundLabelChange, bindType, foundExec, foundDev, foundSuid, foundChown, foundUpperDir, foundWorkDir, foundCopy, foundCopySymlink, foundVolumeSubpath int
+	var foundRootPropagation, foundRWRO, foundLabelChange, bindType, foundExec, foundDev, foundSuid, foundChown, foundUpperDir, foundWorkDir, foundCopy, foundCopySymlink int
 	finalOpts := make([]string, 0, len(options))
 	for _, opt := range options {
 		// support advanced options like upperdir=/path, workdir=/path
@@ -38,14 +38,6 @@ func ValidateVolumeOpts(options []string) ([]string, error) {
 			finalOpts = append(finalOpts, opt)
 			continue
 		}
-		if strings.HasPrefix(opt, "subpath") {
-			foundVolumeSubpath++
-			if foundVolumeSubpath > 1 {
-				return nil, fmt.Errorf("invalid options %q, can only specify 1 subpath per mount", strings.Join(options, ", "))
-			}
-			finalOpts = append(finalOpts, opt)
-			continue
-		}
 
 		switch opt {
 		case "noexec", "exec":