Use a host volume to mount alloc and task dirs

host volumes are the preferred way to share data.
This commit is contained in:
Abhishek Chanda
2016-02-02 12:00:07 -08:00
committed by Abhishek Chanda
parent 8a9f5c26c8
commit 848404a48d

View File

@@ -163,7 +163,7 @@ func (d *RktDriver) Start(ctx *ExecContext, task *structs.Task) (DriverHandle, e
if !ok {
return nil, fmt.Errorf("Failed to find task local directory: %v", task.Name)
}
cmdArgs = append(cmdArgs, fmt.Sprintf("--volume %s,kind=empty,readOnly=false,source=%s --mount volume=data,target=%s", task.Name, local, ctx.AllocDir.SharedDir))
cmdArgs = append(cmdArgs, fmt.Sprintf("--volume %s,kind=host,readOnly=false,source=%s --mount volume=%s,target=%s", task.Name, local, task.Name, ctx.AllocDir.SharedDir))
// Check if the user has overriden the exec command.
if execCmd, ok := task.Config["command"]; ok {