[ARVADOS] created: 43d1a5d0b9272f6e57a3d0afd59b956054ff4d7a
Git user
git at public.curoverse.com
Mon May 1 10:03:05 EDT 2017
at 43d1a5d0b9272f6e57a3d0afd59b956054ff4d7a (commit)
commit 43d1a5d0b9272f6e57a3d0afd59b956054ff4d7a
Author: Peter Amstutz <peter.amstutz at curoverse.com>
Date: Mon May 1 10:02:56 2017 -0400
11469: Docker-managed volumes go in "Volumes" not "Binds".
diff --git a/services/crunch-run/crunchrun.go b/services/crunch-run/crunchrun.go
index fd2ce3f..d1c24a5 100644
--- a/services/crunch-run/crunchrun.go
+++ b/services/crunch-run/crunchrun.go
@@ -145,6 +145,7 @@ type ContainerRunner struct {
HostOutputDir string
CleanupTempDir []string
Binds []string
+ Volumes map[string]struct{}
OutputPDH *string
SigChan chan os.Signal
ArvMountExit chan error
@@ -336,6 +337,7 @@ func (runner *ContainerRunner) SetupMounts() (err error) {
collectionPaths := []string{}
runner.Binds = nil
+ runner.Volumes = make(map[string]struct{})
needCertMount := true
var binds []string
@@ -445,7 +447,7 @@ func (runner *ContainerRunner) SetupMounts() (err error) {
runner.Binds = append(runner.Binds, fmt.Sprintf("%s:%s", runner.HostOutputDir, bind))
case mnt.Kind == "tmp":
- runner.Binds = append(runner.Binds, bind)
+ runner.Volumes[bind] = struct{}{}
case mnt.Kind == "json":
jsondata, err := json.Marshal(mnt.Content)
@@ -793,6 +795,8 @@ func (runner *ContainerRunner) CreateContainer() error {
runner.ContainerConfig.Env = append(runner.ContainerConfig.Env, k+"="+v)
}
+ runner.ContainerConfig.Volumes = runner.Volumes
+
runner.HostConfig = dockercontainer.HostConfig{
Binds: runner.Binds,
Cgroup: dockercontainer.CgroupSpec(runner.setCgroupParent),
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list