Actions
Feature #8464
closed[Crunch2] Support stdout redirection
Status:
Resolved
Priority:
Normal
Assigned To:
Radhika Chippada
Category:
-
Target version:
Start date:
05/09/2016
Due date:
% Done:
100%
Estimated time:
(Total: 0.00 h)
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
.
- In
SetupMounts
, on first time through runner.ContainerRecord.Mounts, ifbind
is "stdout" then make sure it is of kind "file". Extend SetupMounts to support "file" kind. - Before starting arv-mount, check that the "path" field under"stdout" starts with OutputPath. If not, it is an error
- strip off the leading "OutputPath" to get a relative path
- if there is a directory in the relative path, create the necessary subdirectories under "HostOutputDir"
- os.Open() the path for writing under HostOutputDir
- Assign the writer to ContainerRunner StdoutFile
- In
AttachStreams
, if StdoutFile is not nil, assign StdoutFile torunner.Stdout
instead of NewThrottledLogger (will need to change type of ContainerRunner.Stdout to be an io.WriteCloser)
That should be it.
Actions