Project

General

Profile

Actions

Feature #8464

closed

[Crunch2] Support stdout redirection

Added by Peter Amstutz about 8 years ago. Updated almost 8 years ago.

Status:
Resolved
Priority:
Normal
Assigned To:
Radhika Chippada
Category:
-
Target version:
Story points:
0.5
Release:
Release relationship:
Auto

Description

https://dev.arvados.org/projects/arvados/wiki/Containers_API

"mounts": {
 "stdout":{
  "kind":"regular_file",
  "path":"/tmp/a.out" 
 }
}

Add a new field to ContainerRunner called StdoutFile of type io.WriteCloser.

  1. In SetupMounts, on first time through runner.ContainerRecord.Mounts, if bind is "stdout" then make sure it is of kind "file". Extend SetupMounts to support "file" kind.
  2. Before starting arv-mount, check that the "path" field under"stdout" starts with OutputPath. If not, it is an error
  3. strip off the leading "OutputPath" to get a relative path
  4. if there is a directory in the relative path, create the necessary subdirectories under "HostOutputDir"
  5. os.Open() the path for writing under HostOutputDir
  6. Assign the writer to ContainerRunner StdoutFile
  7. In AttachStreams, if StdoutFile is not nil, assign StdoutFile to runner.Stdout instead of NewThrottledLogger (will need to change type of ContainerRunner.Stdout to be an io.WriteCloser)

That should be it.


Subtasks 1 (0 open1 closed)

Task #9095: Review branch 8464-crunch2-stdoutResolvedPeter Amstutz05/09/2016Actions
Actions

Also available in: Atom PDF