projects
/
arvados.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
17840: Merge branch 'main'
[arvados.git]
/
lib
/
crunchrun
/
crunchrun.go
diff --git
a/lib/crunchrun/crunchrun.go
b/lib/crunchrun/crunchrun.go
index ba5673f917a54267916dddcb360f1b38cf548238..63a0ada54ee733629b8bd44b7e3bff6df5f7b793 100644
(file)
--- a/
lib/crunchrun/crunchrun.go
+++ b/
lib/crunchrun/crunchrun.go
@@
-414,11
+414,14
@@
func (runner *ContainerRunner) SetupMounts() (map[string]bindmount, error) {
arvMountCmd := []string{
"arv-mount",
"--foreground",
arvMountCmd := []string{
"arv-mount",
"--foreground",
- "--allow-other",
"--read-write",
"--storage-classes", strings.Join(runner.Container.OutputStorageClasses, ","),
fmt.Sprintf("--crunchstat-interval=%v", runner.statInterval.Seconds())}
"--read-write",
"--storage-classes", strings.Join(runner.Container.OutputStorageClasses, ","),
fmt.Sprintf("--crunchstat-interval=%v", runner.statInterval.Seconds())}
+ if runner.executor.Runtime() == "docker" {
+ arvMountCmd = append(arvMountCmd, "--allow-other")
+ }
+
if runner.Container.RuntimeConstraints.KeepCacheRAM > 0 {
arvMountCmd = append(arvMountCmd, "--file-cache", fmt.Sprintf("%d", runner.Container.RuntimeConstraints.KeepCacheRAM))
}
if runner.Container.RuntimeConstraints.KeepCacheRAM > 0 {
arvMountCmd = append(arvMountCmd, "--file-cache", fmt.Sprintf("%d", runner.Container.RuntimeConstraints.KeepCacheRAM))
}
@@
-614,10
+617,15
@@
func (runner *ContainerRunner) SetupMounts() (map[string]bindmount, error) {
}
if pdhOnly {
}
if pdhOnly {
- arvMountCmd = append(arvMountCmd, "--mount-by-pdh", "by_id")
+ // If we are only mounting collections by pdh, make
+ // sure we don't subscribe to websocket events to
+ // avoid putting undesired load on the API server
+ arvMountCmd = append(arvMountCmd, "--mount-by-pdh", "by_id", "--disable-event-listening")
} else {
arvMountCmd = append(arvMountCmd, "--mount-by-id", "by_id")
}
} else {
arvMountCmd = append(arvMountCmd, "--mount-by-id", "by_id")
}
+ // the by_uuid mount point is used by singularity when writing
+ // out docker images converted to SIF
arvMountCmd = append(arvMountCmd, "--mount-by-id", "by_uuid")
arvMountCmd = append(arvMountCmd, runner.ArvMountPoint)
arvMountCmd = append(arvMountCmd, "--mount-by-id", "by_uuid")
arvMountCmd = append(arvMountCmd, runner.ArvMountPoint)
@@
-1691,11
+1699,11
@@
func (command) RunCommand(prog string, args []string, stdin io.Reader, stdout, s
ignoreDetachFlag = true
}
ignoreDetachFlag = true
}
- if
err := flags.Parse(args); err == flag.ErrHelp
{
- return
0
- } else if
err != nil
{
-
log.Print(err
)
- return
1
+ if
ok, code := cmd.ParseFlags(flags, prog, args, "container-uuid", stderr); !ok
{
+ return
code
+ } else if
flags.NArg() != 1
{
+
fmt.Fprintf(stderr, "missing required argument: container-uuid (try -help)\n"
)
+ return
2
}
containerUUID := flags.Arg(0)
}
containerUUID := flags.Arg(0)