diff --git a/CHANGELOG.md b/CHANGELOG.md index d6b4a535b0..6a773d6694 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Singularity Changelog +## v3.8.3 - [2021-09-07] + +### Bug fixes + + - Fix the display of false warning and avoid repeated bind mounts. + ## v3.8.2 - [2021-08-31] ### Bug fixes diff --git a/INSTALL.md b/INSTALL.md index 6a95e6c387..758a744b05 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -87,7 +87,7 @@ $ mkdir -p ${GOPATH}/src/github.com/hpcng && \ To build a stable version of Singularity, check out a [release tag](https://github.com/hpcng/singularity/tags) before compiling: ``` -$ git checkout v3.8.2 +$ git checkout v3.8.3 ``` ## Compiling Singularity @@ -130,7 +130,7 @@ as shown above. Then download the latest and use it to install the RPM like this: ``` -$ export VERSION=3.8.2 # this is the singularity version, change as you need +$ export VERSION=3.8.3 # this is the singularity version, change as you need $ wget https://github.com/hpcng/singularity/releases/download/v${VERSION}/singularity-${VERSION}.tar.gz && \ rpmbuild -tb singularity-${VERSION}.tar.gz && \ @@ -146,7 +146,7 @@ tarball and use it to install Singularity: $ cd $GOPATH/src/github.com/hpcng/singularity && \ ./mconfig && \ make -C builddir rpm && \ - sudo rpm -ivh ~/rpmbuild/RPMS/x86_64/singularity-3.8.2*.x86_64.rpm # or whatever version you built + sudo rpm -ivh ~/rpmbuild/RPMS/x86_64/singularity-3.8.3*.x86_64.rpm # or whatever version you built ``` To build an rpm with an alternative install prefix set RPMPREFIX on the diff --git a/e2e/actions/actions.go b/e2e/actions/actions.go index 75986fe5ef..14feae8e9d 100644 --- a/e2e/actions/actions.go +++ b/e2e/actions/actions.go @@ -2270,6 +2270,7 @@ func E2ETests(env e2e.TestEnv) testhelper.Tests { "issue 5599": c.issue5599, // https://github.com/hpcng/singularity/issues/5599 "issue 5631": c.issue5631, // https://github.com/hpcng/singularity/issues/5631 "issue 5690": c.issue5690, // https://github.com/hpcng/singularity/issues/5690 + "issue 6165": c.issue6165, // https://github.com/hpcng/singularity/issues/6165 "network": c.actionNetwork, // test basic networking "binds": c.actionBinds, // test various binds "exit and signals": c.exitSignals, // test exit and signals propagation diff --git a/e2e/actions/regressions.go b/e2e/actions/regressions.go index 8236710537..92ae5aeed8 100644 --- a/e2e/actions/regressions.go +++ b/e2e/actions/regressions.go @@ -684,3 +684,36 @@ func (c actionTests) invalidRemote(t *testing.T) { ) } + +// Check that a bind mount without a destination is not added two times. +func (c actionTests) issue6165(t *testing.T) { + e2e.EnsureImage(t, c.env) + + workspace, cleanup := e2e.MakeTempDir(t, c.env.TestDir, "issue6165-", "") + defer e2e.Privileged(cleanup) + + hostCanaryFile := filepath.Join(workspace, "file") + + if err := fs.Touch(hostCanaryFile); err != nil { + t.Fatalf("failed to create canary_file: %s", err) + } + + c.env.RunSingularity( + t, + e2e.WithProfile(e2e.UserProfile), + e2e.WithCommand("exec"), + e2e.WithArgs( + "--contain", + "--bind", hostCanaryFile, + c.env.ImagePath, + "test", "-f", hostCanaryFile, + ), + e2e.ExpectExit( + 0, + e2e.ExpectError( + e2e.UnwantedContainMatch, + "destination is already in the mount point list", + ), + ), + ) +} diff --git a/pkg/runtime/engine/singularity/config/config.go b/pkg/runtime/engine/singularity/config/config.go index 402571c8de..8f8070de0b 100644 --- a/pkg/runtime/engine/singularity/config/config.go +++ b/pkg/runtime/engine/singularity/config/config.go @@ -408,6 +408,8 @@ func ParseBindPath(paths []string) ([]BindPath, error) { } binds = append(binds, bp) elem = 0 + bind = "" + continue } // new bind path bind = s