Mount shared alloc dir, modified API and tests

This commit is contained in:
Alex Dadgar
2015-09-22 21:56:29 -07:00
parent aba801d68e
commit 9caa7ac077
12 changed files with 244 additions and 238 deletions

View File

@@ -106,9 +106,9 @@ func (d *JavaDriver) Start(ctx *ExecContext, task *structs.Task) (DriverHandle,
}
// Get the tasks local directory.
taskDir, err := ctx.AllocDir.TaskDir(d.DriverContext.taskName)
if err != nil {
return nil, err
taskDir, ok := ctx.AllocDir.TaskDirs[d.DriverContext.taskName]
if !ok {
return nil, fmt.Errorf("Could not find task directory for task: %v", d.DriverContext.taskName)
}
taskLocal := filepath.Join(taskDir, allocdir.TaskLocal)