Rkt driver clears task environment variables

This commit is contained in:
Alex Dadgar
2015-10-15 18:19:13 -07:00
parent fc9a148639
commit 6814c476b1
3 changed files with 8 additions and 2 deletions

View File

@@ -114,6 +114,11 @@ func (d *RktDriver) Start(ctx *ExecContext, task *structs.Task) (DriverHandle, e
// Inject the environment variables.
envVars := TaskEnvironmentVariables(ctx, task)
// Clear the task directories as they are not currently supported.
envVars.ClearTaskLocalDir()
envVars.ClearAllocDir()
for k, v := range envVars.Map() {
cmd_args = append(cmd_args, fmt.Sprintf("--set-env=%v=%v", k, v))
}

View File

@@ -30,7 +30,8 @@ hash, ACI address or docker registry.
The `Rkt` driver does not currently support mounting the `alloc/` and `local/`
directory. It is currently blocked by this [Rkt
issue](https://github.com/coreos/rkt/issues/761).
issue](https://github.com/coreos/rkt/issues/761). As such the coresponding
[environment variables](/docs/jobspec/environment.html#task_dir) are not set.
## Client Requirements

View File

@@ -56,7 +56,7 @@ exported as environment variables for consistency, e.g. `NOMAD_PORT_5000`.
Please see the relevant driver documentation for details.
### Task Directories
<a id="task_dir">### Task Directories</a>
Nomad makes the following two directories available to tasks: